I'm trying to integrate a function over a subset of the domain, but I keep getting the following error
Code:
File "/usr/local/ngsxfem/lib/python3/dist-packages/xfem/__init__.py", line 304, in Integrate_X_special_args
heapsize=heapsize)
netgen.libngpy._meshing.NgException: lsets need to be GridFunctions!
The function is called using
Code:
stopcritval = sqrt(Integrate(levelset_domain=lset_haspos, cf=f, mesh=mesh))
where f is a GridFunction, and lset_haspos is defined by:
Code:
lsetp1 = GridFunction(H1(mesh,order=1))
InterpolateToP1(lset,lsetp1)
lset_haspos = { "levelset" : lsetp1, "domain_type" : HASPOS, "subdivlvl" : 0}
As far as I can tell, all arguments are of the right type, so I have no idea why I'm being told that "lsets need to be GridFunctions". Does anyone know what I'm doing wrong?
thanks,
Julien