I need to plot a Function over just the surface of my problem. I have a FacetFunction which defines the surfaces, and am using the python interface.
Thanks!
BUMP
Hi,
you can create the mesh function on facet. Then write out the mesh function on facet to pvd file, which is used in Paraview. Then in Paraview, you can extract the surface easily according to the value of mesh function on the surface facet.
So I have the FacetFunction object and have written it out to ff.pvd.
This gives me a nice file with the surfaces highlighted. However, I need to extract the values of a different function over these surfaces.
Ideally, I would like to output this subset of the function directly with Fenics, independent of ParaView.
Is this possible?
Yes, if i understand correctly.
I would do the following:
u is the function type facet_domains is the meshfunction type with value on the surface
then get the value on "the facet" by returning an array by the following segment:
u_sub = u.vector().array()[facet_domains==value]
Now you extract the value on the surface and can do what you want to