Hello,
Sorry for the delay.
If I understand well, you want to use a level-set function to define your initial 3D face mesh inside the mesh sphere and then be able to discretize the surface mesh (ie the 3D face mesh) inside the sphere mesh.
Here are the steps to follow:
-
compute the signed distance function that represent your surface mesh inside the sphere mesh (for each node of the sphere mesh, you must compute the minimal euclidean distance between the node and your surface mesh).
This function must be 0 at the surface mesh, negative inside and positive outside.
Save the discrete signed distance function at the sphere mesh nodes at the medit solution format (if you work with a medit mesh) or as $NodeData inside a gmsh mesh.
-
discretize the implicit function using mmg3d:
mmg3d_O3 -ls 0 sphere.mesh -nr
The -nr
option specify that after the implicit surface discretization, during the mesh optimization, we don’t want to detect sharp angle. The reason is simple: the distance function is a smooth function.
This process will work but I think that you will not recover a good representation of your aircraft because this geometry is very hard to capture with an implicit function (lot of sharp angles that will be lost during the process, airfoils (which means very thin volumes)… )…
The level-set discretization is more adapted to shape optimization.
I hope this will help,
Best Regards,
Algiane