Hi Manuel,
the vector of the GridFunction saves the coefficients of the polynomial basis used for the TangentialFacetSpace, which should be the Nedelec basis functions. As they are not e.g. (1,0,0), but u*grad(v)-v*grad(u) with u,v barycentric coordinates, the coefficient vector does not include ones.
For more information about the computation of these coefficients (local L2 projection or usage of dual shapes) see
this tutorial
.
If you are unsure if the interpolation is correct, you can test it with
Code:
u = CoefficientFunction((1,0,0))
gfu = GridFunction(Nh)
gfu.Set(u, definedon=mesh.Boundaries('top') )
print(sqrt(Integrate((gfu-u)*(gfu-u), mesh, definedon=mesh.Boundaries('top'))))
Best,
Michael