Level-set for half geometries with a symmetry plane

Dear users and developers,

I am trying to use libmmg3D to extract the zero iso-surface. My geometry is a half-sphere. For the background mesh, I only want to generate the volume mesh outside the sphere, excluding the interior.

I have coded a distance function, but since there are no elements inside the sphere, the distance is zero on the surface and increases as we move toward the far-field. Let’s say I want to extract ls = 0, which should correspond exactly to my half-sphere surface. However, I am getting some unexpected results, not to mention the long runtime.

I am using the following command:

mmg3d_O3 cube -ls -hausd 0.005

I also tried using -nosurf to preserve the surface, but it did not resolve the issue. I understand that mmg required a signed distance for interpolations; however, in my case, I have explicitly set the values in the .sol file to zero for the nodes located on the surface.

Is there a way to interpolate only in the regions where we have a signed distance?

I have included my background mesh (cube.mesh), my level-set solution where the values are set to zero for all surface points (cubeClean.sol), and a second level-set solution for a contaminated surface where the values are set to zero for some surface points and we also had a region with negative distance (cubeMat.sol).

Thanks a lot,
Ramin

cube.7z (4.5 MB)


cubeClean.sol (1.3 MB)


cubeMat.sol (1.3 MB)

Dear Ramin,

Thank you very much for your question. I would like to ask a few questions to have a better understanding of the problem. In cube.mesh, the surface of the half-sphere is already represented by the boundaries of the domain. The zero level-set from cubeClean.sol seems to coincide with the surface of the sphere.

This means that the iso-surface that you are attempting to discretize is already represented by your initial mesh, am I correct ? I am not sure to understand what output mesh you are trying to produce.

If you need to discretize another level-set (i.e. for another value, let us say 3), you can do so by specifying the value to the ls option:

mmg3d_03 cube -ls 3 -hausd 0.005

Secondly, I would suggest to take a look at the integrity of your data: cubeClean.sol seems to have many points on the surface of the sphere that do not have a value 0. This could explain the inability of mmg to discretize the level-set.

I thank you in advance for your answers, and I would be glad to help you further.

Kind regards,
Corentin