Prismatic mesh - handling pyramids

Hello,
I generated a prismatic mesh from a surface mesh patch.
Not all the elements are prisms (the major part is): the algorithm generates a small number of tets and pyramids, as usual.
Once (quasi) prismatic mesh is done, i would lilke to remesh the tetrahedral mesh connected to that, since some tets are very stretched. I would like to use mmg3D (as library).

I know experiments, and from:

that

“Mmg preserves the prisms entities but it doesn’t re-mesh it : it re-meshes the tetrahedral part of the mesh and preserves the interface with the prisms entities. This feature is useful for example if your initial mesh contains a prismatic boundary layer.”

however, unfortunately, as stated in

“Mmg doesn’t allow to preserve pyramids. Since the version [5.4.1] of Mmg you can provide and preserve “orphan points”, i.e. points that are not connected to the mesh if you specify these points as required […]”

Now, after the (quasi) prismatic mesh has been generated, I would like to preserve it during an overall re-meshing process, and this is possible only if the prismatic mesh is really fully prismatic (no pyramid inside).

Question:

  1. when inizialiting the mesh, could I use

MMG3D_Set_prism

for a pyramid, by => defining <= is a degenerated prism?

  1. will mmg3D “jump” over this degenerate prism == pyramid during remeshing and preserve it?

The same question for a tetrahedron initially belonging to the (quasi) prismatic mesh: could this be defined as a degenerated prism, so that mmg3D jumps over it and preserve it?

Grazie mille
Giovanni

Dear Giovanni,

To both of your questions, I would answer yes: you can define a prism by calling the function MMG3D_Set_prism and put the same vertex twice to create a pyramid, or the same vertex three times to define a tetrahedron. Since MMG ignores the prisms during remeshing, they will be preserved.
However, for tetrahedra, you can also use the function MMG3D_Set_requiredTetrahedron to label a tetrahedron as required and ensure that it will not be modified by remeshing.
I would rather advise for this solution in general, because the output mesh containing degenerate entities might not be suitable for your applications.
Corentin