In Section 1.6 of the FEniCS book, there is a comparison between the calculated value u
and the exact solution u0
. In particular u0(coor[i])
returns the value of u0 at vertex with global number i.
If
V = FunctionSpace(mesh, 'Lagrange', 1)
u = Function(V)
why is
u.vector().array()[i] != u(mesh.coordinates()[i])?
From running an example I see that the values are permuted.
And does
u0(mesh.coordinates()[i])
gives the correctly ordered result because u0
is an Expression
?
Is this related to the ordering of the degrees of freedom as in http://fenicsproject.org/qa/207/how-to-interpolate-data-at-vertices-of-3d-cells
http://fenicsproject.org/qa/465/interpolate-function-given-matrix-on-finite-element-basis?