I'm using the python interface of GetFEM. I am a bit confused about the behaviour of the function compute_gradient. I would expect to use it the following way (for a planar 2D mesh) :
V = gf.MeshFem(mesh_2D, 1)
VD = gf.MeshFem(V.linked_mesh(), 2) # HERE
f = some function over V
grad_f = gf.compute_gradient(V, f, VD)
However, when I do this, I have a Dimension mismatch, whereas there is no error when I put
VD = gf.MeshFem(V.linked_mesh(), 1)
even if grad_f is of size [2, VD.nbdof()] afterward.
Could you please explain this behaviour ?
LJK, PhD Student.