Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Visualizing FacetFESpace

More
2 years 1 week ago #4321 by alex.v
I am having trouble exporting a GridFunction from a FacetFESpace using VTKOutput.

I am calling it as:VTKOutput(ma=mesh,
coefs=[gfu],
names=,
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
More
2 years 1 week ago #4323 by walker_tr9
Replied by walker_tr9 on topic Visualizing FacetFESpace
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.
Time to create page: 0.142 seconds