Why is the solution a scalar function, when it's defined on a VectorFunctionSpace?

When you solve a Finite element problem, it being on a vector, tensor or mixed space, the data is always flattened. This is because you are solving a system on linear equations on the form Au=b,u is the vector containing the degrees of freedom.

To print it as a set of vectors, you can use the strategy shown in: How to get the solution obtained by fenics as a vector? - #7 by dokken

1 Like