Hello, 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) V.set_fem(gf.Fem("FEM_PK(2, 1)")) VD = gf.MeshFem(V.linked_mesh(), 2) # HERE VD.set_fem(gf.Fem("FEM_PK_DISCONTINUOUS(2, 0)")) 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 ? Sincerly yours, Eloi MARTINET, LJK, PhD Student.