MmgTools / mmg

open source software for bidimensional and tridimensional remeshing
http://www.mmgtools.org
Other
362 stars 117 forks source link

Feature/surfls #185

Closed Algiane closed 1 year ago

Algiane commented 1 year ago

New -lssurf option to split mesh boundaries on an input level-set without splitting the interior domain

Illustration

Option can be enabled using the -lssurf command line argument. The value of the level-set that has to be discretized may be provided as option argument, otherwise, the 0 value is discretized. A multi-material map can be provided using a parameter file and the LSReferences keyword.

2D

The following test case is available in the continuous tests of Mmg under the mmg2d_OptLsSurf_multiMat_box name (sources are in the mmg2d/OptLsSurf_box folder).

The image on the left represents the input isovalue and the boundary references. The image on the right represent the output mesh with the split boundaries and the new references that are assigned.

2D-lssurf
Surface mesh

On surface mesh, this option discretizes the level-set along boundary lines.

The following test case is available in the continuous tests of Mmg under the mmg_OptLsSurf_peninsula_mmgs name (sources are in the mmg/OptLsSurf_peninsula folder).

Left image shows the references of mesh triangles and mesh edges (lines), the middle image shows the isovalue to discretize, the image on the right shows the ls discretization: lines have been split and new references have been assigned to edges while triangles references are unchanged.

S-lssurf
3D

The following test case is available in the continuous tests of Mmg under the mmg_OptLsSurf_peninsula_mmg3d name (sources are in the mmg/OptLsSurf_peninsula folder).

Left image shows the references of mesh triangles and mesh edges (lines), the middle image shows the isovalue to discretize, the image on the right shows the ls discretization: triangles have been split and new references have been assigned to triangles while tetra references are unchanged.

3D-lssurf

Future improvements

For now -rmc option is ignored.

Remarks

  1. This option has been tested:

    • in opnbdy mode for mmg3d;
    • with and without multi-material map;
  2. In ls mode, if a volume reference is provided in the multi-material map, the entire list of volume refs has to be provided. Following the same logic, in lssurf mode, if a boundary reference has been provided in the multi-material map, the entire list of boundary refs has to be provided.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: Algiane
:x: dapogny
You have signed the CLA already but the status is still pending? Let us recheck it.