Visualizing FacetFESpace

I am having trouble exporting a GridFunction from a FacetFESpace using VTKOutput.

I am calling it as:VTKOutput(ma=mesh,
coefs=[gfu],
names=[‘edge_labels’],
filename=‘val’).Do()

Where gfu is a GridFuntion on a FacetFESpace with some values on it.
What is the correct way to get this exported for visualization in Paraview?

Alex

You will need to extend the function to the bulk, then export that. For example:

fes_BDY = FacetFESpace(mesh, order=0, definedon=“”, definedonbound=BDY_name)
gf_u_bdy = GridFunction(fes_BDY)
fes_BULK = H1(mesh, order=1)

gf_u_bdy_ext = GridFunction(fes_BULK)
gf_u_bdy_ext.Set(gf_u_bdy, definedon=mesh.Boundaries(BDY_name))

Then try: Draw(gf_u_bdy_ext, mesh, “u_bdy_ext”) in the netgen gui.

If that works, then you could just export that.