I have a 2D mesh on which i want to define a 3D GridFunction by interpolating a CF. This works for vector-valued functions, but for matrix-valued functions I get the error
netgen.libngpy._meshing.NgException: Dimensions do not match.
, despite the CF and GF having the same dimensions.
from ngsolve import *
mesh = Mesh(unit_square.GenerateMesh())
f = CF((0,0,0))
F = Id(3)
fes_Vector = L2(mesh)**3
fes_Matrix = (L2(mesh)**3)**3
f_pp = GridFunction(fes_Vector)
F_pp = GridFunction(fes_Matrix)
f_pp.Interpolate(f) # -> works
F_pp.Interpolate(F) # -> netgen.libngpy._meshing.NgException: Dimensions do not match.
Thank you in advance.