I am trying to evaluate the GridFunction on a deformed mesh using mesh points like mesh(x,y).
As far as I understand, (x,y) are the points in the original mesh.
Am I correct? The following is the script I used.
I expected to obtain 0.5, but obtained 1.0 instead.
from ngsolve import *
from netgen.occ import *
from ngsolve.webgui import Draw
Rect = MoveTo(0.0, 0.0).Rectangle(1.0, 1.0).Face()
Rect.bc('Air')
mesh = Mesh(OCCGeometry(Rect, dim=2).GenerateMesh(maxh=0.1, quad_dominated=True))
fes = VectorH1(mesh, order=1)
gfu = GridFunction(fes)
gfu.Set(CF((0, y)), definedon=mesh.Materials('Air'))
print(gfu(mesh(0.5, 0.5)))
Draw (gfu, mesh)
mesh.SetDeformation(gfu)
gfu = GridFunction(fes)
gfu.Set(CF((0, y)), definedon=mesh.Materials('Air'))
print(gfu(mesh(0.5, 0.5)))
Draw (gfu, mesh)