Mesh adaptation to a solution

We start from the holes.mesh mesh (see figure 1) and the associated size map (stored in the holes.sol file). This map prescribes a constant isotropic metric of 0.1 on each vertex.

Figure 1: Initial mesh.

Figure 1: Initial mesh.

Adaptation

To adapt the circle mesh to the prescribed size map you just need to run the mmg2d application:

mmg2d_O3 holes.mesh

We obtain the adapted mesh displayed figure 2.

Figure 2: Final mesh for a constant isotropic size map of 0.05.

Figure 2: Final mesh for a constant isotropic size map of 0.05.

You can specify a metric file with a different name than the mesh one using the -sol option:

mmg2d_O3 holes.mesh -sol myMetric.sol

Boundary approximation control

The boundary approximation is controlled by the Hausdorff parameter.  You can use the -hausd option to adapt the Hausdorff value to your needs (more infos about the -hausd option).  We obtain the result displayed figure 3 by asking for a maximal Hausdorff distance of 0.005 (our mesh has a bounding box of 1):

mmg2d_O3 -hausd 0.005 holes.mesh
Figure 3: Final mesh for a Hausdorff parameter of 0.005

Figure 3: Final mesh for a Hausdorff parameter of 0.005

Maximal edge size value

The -hmin and -hmax options allows to truncate the edge sizes to be (respectively) greater than a given value and lower than another one. The figure 4 shows the mesh obtained for a hmax value of 0.03 (more infos about the hmax parameter):

mmg2d_O3 holes.mesh -hmax 0.05
Figure 4: Final mesh for a hmax value of 0.03.

Figure 4: Final mesh for a hmax value of 0.03.

 Note that this hmax value is lower than the prescribed size, thus, we don’t respect our metric anymore.

Comments are closed