This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Plotting subspaces of a mesh

0 votes

1) Is it possible to plot n-1 dimensional subspace of n-dimensional mesh?
2) Is it possible to plot only a part of the mesh with certain scalar mesh function greater or smaller than x?

asked Nov 18, 2015 by bp FEniCS Novice (520 points)

1 Answer

+1 vote
 
Best answer

1) You can use functions such as BoundaryMesh or SubMesh to define your n-1 dimensional mesh on which you then can define a new functionspace. You can interpolate or project functions from your n-dimensional functionspace onto your new n-1 dimensional one.
2) You can define a MeshFunction that is 1 or 0, depending on the comparison of your scalar function with x, and then use this MeshFunction to define a new SubMesh. This will work if you scalar function is piecewise constant (edit: within every element). If this is not the case, i.e. your scalar function equals x somewhere mid-element, you essentially need a new mesh, so I wouldn't know how to do it. If your goal is just to plot however (not to continue working on this new mesh), you can use a visualization program such as Paraview and clip above/below a certain value.

answered Nov 18, 2015 by maartent FEniCS User (3,910 points)
edited Nov 18, 2015 by maartent

Is there any possibility of implementing 4th and higher dimensional elements? Actually for space-time analysis - 3D x TIME?

There are some tutorials on time-dependent problems in the documentation here
http://fenicsproject.org/documentation/

If you mean treating space and time on the same footing, then you better post it as a new question, because I cannot help you there.

...