Function

CGAL::make_mesh_3

Definition

The function make_mesh_3 is a 3D mesh generator. It produces simplicial meshes which discretize 3D domains.

The mesh generation algorithm is a Delaunay refinement process followed by an optimization phase. The criteria driving the Delaunay refinement process may be tuned to achieve the user needs with respect to the size of mesh elements, the accuracy of boundaries approximation, etc.

The optimization phase is a sequence of optimization processes, including possibly a Lloyd smoothing, an odt-smoothing, a perturber and an exuder. Each optimization process can be activated or not, according to the user requirements and available time. By default, only the perturber and the exuder are activated. Note that the benefits of the exuder will be lost if the mesh is further refined afterward.

The function outputs the mesh to an object which provides iterators to traverse the resulting mesh data structure or can be written to a file (see 50.3).

template <class C3T3, class MeshDomain_3, class MeshCriteria>
C3T3
make_mesh_3 ( MeshDomain_3 domain,
MeshCriteria criteria,
Features features = parameters::features(domain),
Lloyd lloyd = parameters::no_lloyd(),
Odt odt = parameters::no_odt(),
Perturb perturb = parameters::perturb(),
Exude exude = parameters::exude())

Parameters

Parameter C3T3 is required to be a model of the concept MeshComplex_3InTriangulation_3. This is the return type.

The type C3T3 is in particular required to provide a nested type C3T3::Triangulation for the 3D triangulation embedding the mesh. The vertex and cell base classes of the triangulation C3T3::Triangulation are required to be models of the concepts MeshVertexBase_3 and MeshCellBase_3 respectively.

Template parameter MeshDomain_3 is required to be a model of the concept MeshDomain_3, or of the refined concept MeshDomainWithFeatures_3 if the domain has corners and curve segments that need to be accurately represented in the mesh. The argument domain is the sole link through which the domain to be discretized is known by the mesh generation algorithm.

The parameter features allows the user to specify if 0 and 1-dimensional features actually have to be taken into account or not when the domain is a model of MeshDomainWithFeatures_3. The type Features of this parameter is an internal undescribed type. The library provides functions to construct appropriate values of that type.

The template parameter MeshCriteria has to be a model of the concept MeshCriteria_3, or a model of the refined concept MeshCriteriaWithFeatures_3 if the domain has exposed features. The argument criteria of type MeshCriteria specifies the size and shape requirements for mesh tetrahedra and surface facets. These criteria form the rules which drive the refinement process. All mesh elements satisfy those criteria at the end of the refinement process. In addition, if the domain has features, the argument criteria provides a sizing field to guide the discretization of 1-dimensional exposed features.

The four additional parameters are optimization parameters. They control which optimization processes are performed and allow the user to tune the parameters of the optimization processes. We do not describe the types of optimization parameters as they are internal types. The package defines two global functions for each optimization parameter to generate appropriate value of this parameter.

The optimization parameters can be passed in random order. If one parameter is not passed, its default value is used. The default values are no_lloyd(), no_odt(), perturb() and exude().

Note that whatever may be the optimization processes activated, they are always launched in the order that is a suborder of the following (see user manual for further details): lloyd, odt, perturb, exude.

Also beware, that optimization of the mesh is obtained by perturbing mesh vertices and modifying the mesh connectivity and that this has an impact on the strict compliance to the refinement criteria. Though a strict compliance to mesh criteria is granted at the end of the Delaunay refinement, this may no longer be true after some optimization processes. Also beware that the default behavior does involve some optimization processes.

See Also

refine_mesh_3
parameters::features
parameters::no_features
exude_mesh_3
perturb_mesh_3
lloyd_optimize_mesh_3
odt_optimize_mesh_3
parameters::exude
parameters::no_exude
parameters::perturb
parameters::no_perturb
parameters::lloyd
parameters::no_lloyd
parameters::odt
parameters::no_odt