mirror of https://github.com/CGAL/cgal
clean up make_mesh_3 and refine_mesh_3
This commit is contained in:
parent
bab2d0c280
commit
b740c31bc1
|
|
@ -41,7 +41,7 @@ namespace CGAL {
|
||||||
* if called, must be the last optimizer to be called. If the mesh is refined after
|
* if called, must be the last optimizer to be called. If the mesh is refined after
|
||||||
* this optimization has been performed, all improvements will be lost.
|
* this optimization has been performed, all improvements will be lost.
|
||||||
*
|
*
|
||||||
* @tparam C3T3 is required to be a model of the concept `MeshComplex_3InTriangulation_3`.
|
* @tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3`.
|
||||||
* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
||||||
*
|
*
|
||||||
* @param c3t3 the initial mesh that will be modified by the algorithm to represent the final optimized mesh.
|
* @param c3t3 the initial mesh that will be modified by the algorithm to represent the final optimized mesh.
|
||||||
|
|
|
||||||
|
|
@ -51,21 +51,12 @@ namespace CGAL {
|
||||||
* in a special way so as to preserve an accurate
|
* in a special way so as to preserve an accurate
|
||||||
* representation of the domain boundaries.
|
* representation of the domain boundaries.
|
||||||
*
|
*
|
||||||
* \tparam C3T3 is required to be a model of the concept
|
* \tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3`.
|
||||||
* `MeshComplex_3InTriangulation_3`.
|
* \tparam MD a model of the concept `MeshDomain_3`.
|
||||||
* The argument `c3t3`, passed by
|
|
||||||
* reference, provides the initial mesh
|
|
||||||
* and is modified by the algorithm
|
|
||||||
* to represent the final optimized mesh.
|
|
||||||
*
|
|
||||||
* \tparam MD is required to be a model of the concept
|
|
||||||
* `MeshDomain_3`. The argument `domain` must be the `MD`
|
|
||||||
* object used to create the `c3t3` parameter.
|
|
||||||
*
|
|
||||||
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
||||||
*
|
*
|
||||||
* @param c3t3 the initial mesh that will be modified by the algorithm to represent the final optimized mesh.
|
* @param c3t3 the initial mesh that will be modified by the algorithm to represent the final optimized mesh.
|
||||||
* @param domain the domain to be discretized
|
* @param domain the domain used to create the `c3t3` parameter
|
||||||
* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below:
|
* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below:
|
||||||
*
|
*
|
||||||
* \cgalNamedParamsBegin
|
* \cgalNamedParamsBegin
|
||||||
|
|
|
||||||
|
|
@ -361,176 +361,159 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false >
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgMesh3Functions
|
* \ingroup PkgMesh3Functions
|
||||||
|
*
|
||||||
The function `make_mesh_3()` is a 3D
|
* The function `make_mesh_3()` is a 3D
|
||||||
mesh generator. It produces simplicial meshes which discretize
|
* mesh generator. It produces simplicial meshes which discretize
|
||||||
3D domains.
|
* 3D domains.
|
||||||
|
*
|
||||||
The mesh generation algorithm is a Delaunay refinement process
|
* The mesh generation algorithm is a Delaunay refinement process
|
||||||
followed by an optimization phase.
|
* followed by an optimization phase.
|
||||||
The criteria driving the Delaunay refinement
|
* The criteria driving the Delaunay refinement
|
||||||
process may be tuned to achieve the user needs with respect to
|
* process may be tuned to achieve the user needs with respect to
|
||||||
the size of mesh elements, the accuracy of boundaries approximation,
|
* the size of mesh elements, the accuracy of boundaries approximation,
|
||||||
etc.
|
* etc.
|
||||||
|
*
|
||||||
The optimization phase is a sequence of optimization processes,
|
* The optimization phase is a sequence of optimization processes,
|
||||||
amongst the following available optimizers: an ODT-smoothing,
|
* amongst the following available optimizers: an ODT-smoothing,
|
||||||
a Lloyd-smoothing, a sliver perturber, and a sliver exuder.
|
* a Lloyd-smoothing, a sliver perturber, and a sliver exuder.
|
||||||
Each optimization process
|
* Each optimization process
|
||||||
can be activated or not,
|
* can be activated or not,
|
||||||
according to the user requirements
|
* according to the user requirements
|
||||||
and available time.
|
* and available time.
|
||||||
By default, only the perturber and the exuder are activated.
|
* By default, only the perturber and the exuder are activated.
|
||||||
Note that the benefits of the exuder will be lost if the mesh
|
* Note that the benefits of the exuder will be lost if the mesh
|
||||||
is further refined afterward, and that ODT-smoothing, Lloyd-smoothing,
|
* is further refined afterward, and that ODT-smoothing, Lloyd-smoothing,
|
||||||
and sliver perturber should never be called after the sliver exuder.
|
* and sliver perturber should never be called after the sliver exuder.
|
||||||
In the case of further refinement, only the sliver exuder can be used.
|
* In the case of further refinement, only the sliver exuder can be used.
|
||||||
|
*
|
||||||
The function outputs the mesh to an object which provides iterators to
|
* 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
|
* traverse the resulting mesh data structure or can be written to a file
|
||||||
(see \ref Mesh_3_section_examples ).
|
* (see \ref Mesh_3_section_examples ).
|
||||||
|
*
|
||||||
|
* \tparam C3T3 either a model of the concept `MeshComplex_3InTriangulation_3` or
|
||||||
\tparam C3T3 is required to be a model of
|
* of `MeshComplexWithFeatures_3InTriangulation_3` if `MD`
|
||||||
the concept `MeshComplex_3InTriangulation_3`,
|
* is a model of `MeshDomainWithFeatures_3`.
|
||||||
and a model of `MeshComplexWithFeatures_3InTriangulation_3`
|
* The type `C3T3` is in particular required to provide a nested type
|
||||||
if the domain is a model of `MeshDomainWithFeatures_3`.
|
* `C3T3::Triangulation` for the 3D triangulation
|
||||||
This is the return type.
|
* embedding the mesh. The vertex and cell base classes of the
|
||||||
The type `C3T3` is in particular required to provide a nested type
|
* triangulation `C3T3::Triangulation` are required to be models of the
|
||||||
`C3T3::Triangulation` for the 3D triangulation
|
* concepts `MeshVertexBase_3` and `MeshCellBase_3` respectively.
|
||||||
embedding the mesh. The vertex and cell base classes of the
|
*
|
||||||
triangulation `C3T3::Triangulation` are required to be models of the
|
* \tparam MD either a model of the concept `MeshDomain_3` or of
|
||||||
concepts `MeshVertexBase_3` and `MeshCellBase_3`
|
* `MeshDomainWithFeatures_3` if 0 and 1-dimensional features
|
||||||
respectively.
|
* of the input complex have to be accurately represented in the mesh.
|
||||||
|
*
|
||||||
\tparam MD is required to be a model of
|
* \tparam MC either a model of the concept `MeshCriteria_3` or a model
|
||||||
the concept `MeshDomain_3`, or of the refined concept
|
* of `MeshCriteriaWithFeatures_3` if the domain has exposed features.
|
||||||
`MeshDomainWithFeatures_3`
|
*
|
||||||
if the domain has corners and curves that need to be accurately represented in the mesh.
|
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
||||||
The argument `domain`
|
*
|
||||||
is the sole link through which the domain
|
* \param domain the domain used to create the `c3t3` parameter. It is the sole link through which the domain
|
||||||
to be discretized is known by the mesh generation algorithm.
|
* to be discretized is known by the mesh generation algorithm.
|
||||||
|
* \param criteria specifies the size and shape requirements for mesh tetrahedra
|
||||||
\tparam MC has to be a model of the concept
|
* and surface facets. These criteria form the rules which drive
|
||||||
`MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3` if the domain has exposed features.
|
* the refinement process. All mesh elements satisfy those criteria
|
||||||
The argument `criteria` of type `MC` specifies the
|
* at the end of the refinement process.
|
||||||
size and shape requirements for mesh tetrahedra
|
* In addition, if the domain has features, the argument
|
||||||
and surface facets. These criteria
|
* `criteria` provides a sizing field to guide the discretization
|
||||||
form the rules which drive the refinement process. All mesh elements
|
* of 1-dimensional exposed features.
|
||||||
satisfy those criteria at the end of the refinement process.
|
*
|
||||||
In addition, if the domain has features, the argument
|
* \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below:
|
||||||
`criteria` provides a sizing field to guide the discretization
|
*
|
||||||
of 1-dimensional exposed features.
|
* \cgalNamedParamsBegin
|
||||||
|
* \cgalParamNBegin{Feature preservation options}
|
||||||
\tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
* \cgalParamDescription{If the domain is a model of `MeshDomainWithFeatures_3`, 0 and 1-dimensional features can be
|
||||||
|
* taken into account while generating the mesh. The following two named parameters control
|
||||||
@param domain the domain to be discretized
|
* this option:
|
||||||
@param criteria the criteria
|
* <UL>
|
||||||
@param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below:
|
* <LI>\link parameters::features() `parameters::features(domain)` \endlink
|
||||||
|
* <LI>`parameters::no_features()`
|
||||||
\cgalNamedParamsBegin
|
* </UL>}
|
||||||
\cgalParamNBegin{features_options}
|
* \cgalParamDefault{`parameters::features(domain)`}
|
||||||
\cgalParamDescription{allows the user to specify whether 0 and 1-dimensional features have to be
|
* \cgalParamNEnd
|
||||||
taken into account or not
|
* \cgalParamNBegin{Topological options (manifoldness)}
|
||||||
when the domain is a model of `MeshDomainWithFeatures_3`.
|
* \cgalParamDescription{In order to drive the meshing algorithm and ensure that the output mesh follows a desired topological criterion,
|
||||||
The type `Features` of this parameter is an internal undescribed type.
|
* three named parameters control this option:
|
||||||
The library provides functions to construct appropriate values of that type.
|
* <UL>
|
||||||
<UL>
|
* <LI>`parameters::manifold()`
|
||||||
<LI>\link parameters::features() `parameters::features(domain)` \endlink sets `features` according to the domain,
|
* <LI>`parameters::manifold_with_boundary()`
|
||||||
i.e.\ 0 and 1-dimensional features are taken into account if `domain` is a
|
* <LI>`parameters::non_manifold()`
|
||||||
`MeshDomainWithFeatures_3`. This is the default behavior
|
* </UL>
|
||||||
if parameter `features` is not specified.
|
* Note that the meshing algorithm cannot generate a manifold surface if the input surface is not manifold.}
|
||||||
<LI>`parameters::no_features()` prevents the representation
|
* \cgalParamDefault{`parameters::non_manifold()`}
|
||||||
of 0 and 1-dimensional features in the mesh.
|
* \cgalParamNEnd
|
||||||
</UL>}
|
* \cgalParamNBegin{Lloyd optimization}
|
||||||
\cgalParamType{`parameters::features()' OR `parameters::features(domain)`}
|
* \cgalParamDescription{`lloyd_optimize_mesh_3()` can optionally be called after the meshing process.
|
||||||
\cgalParamDefault{`parameters::features(domain)`}
|
* Two named parameters control this behavior:
|
||||||
|
* <UL>
|
||||||
\cgalParamNBegin{manifold_option}
|
* <LI> `parameters::no_lloyd()`
|
||||||
\cgalParamDescription{allows the user to drive the meshing algorithm,
|
* <LI> `parameters::lloyd_optimize_mesh_3()`
|
||||||
and ensure that the output mesh surface follows the given manifold criterion.
|
* </UL>}
|
||||||
It can be activated with `parameters::manifold()`, `parameters::manifold_with_boundary()`
|
* \cgalParamDefault{`parameters::no_lloyd()`}
|
||||||
and `parameters::non_manifold()`. Note that the meshing algorithm cannot generate a manifold
|
* \cgalParamNEnd
|
||||||
surface if the input surface is not manifold.}
|
* \cgalParamNBegin{ODT optimization}
|
||||||
\cgalParamType{`parameters::manifold()` OR `parameters::manifold_with_boundary()` OR `parameters::non_manifold()`}
|
* \cgalParamDescription{`odt_optimize_mesh_3()` can optionally be called after the meshing process.
|
||||||
\cgalParamDefault{`parameters::non_manifold()`}
|
* Two named parameters control this behavior:
|
||||||
|
* <UL>
|
||||||
\cgalParamNBegin{lloyd_options}
|
* <LI> `parameters::no_odt()`
|
||||||
\cgalParamDescription{`parameters::lloyd()` and `parameters::no_lloyd()` are designed to
|
* <LI> `parameters::odt()`
|
||||||
trigger or not a call to `lloyd_optimize_mesh_3()` function and to set the
|
* </UL>}
|
||||||
parameters of this optimizer. If one parameter is not set, the default value of
|
* \cgalParamDefault{`parameters::no_odt()`}
|
||||||
`lloyd_optimize_mesh_3()` is used for this parameter.}
|
* \cgalParamNEnd
|
||||||
\cgalParamType{`parameters::lloyd()` OR `parameters::no_lloyd()`}
|
* \cgalParamNBegin{Mesh perturbation}
|
||||||
\cgalParamDefault{`parameters::no_lloyd()`}
|
* \cgalParamDescription{`perturb_mesh_3()` can optionally be called after the meshing process.
|
||||||
|
* Two named parameters control this behavior:
|
||||||
\cgalParamNBegin{odt_options}
|
* <UL>
|
||||||
\cgalParamDescription{`parameters::odt()` and `parameters::no_odt()` are designed to
|
* <LI> `parameters::no_perturb()`
|
||||||
trigger or not a call to `odt_optimize_mesh_3()` function and
|
* <LI> `parameters::perturb()`
|
||||||
to set the parameters of this optimizer.
|
* </UL>}
|
||||||
If one parameter is not set, the default value of
|
* \cgalParamDefault{`parameters::perturb()`}
|
||||||
`odt_optimize_mesh_3()` is used for this parameter.}
|
* \cgalParamNEnd
|
||||||
\cgalParamType{`parameters::odt()` OR `parameters::no_odt()`}
|
* \cgalParamNBegin{Mesh exudation}
|
||||||
\cgalParamDefault{`parameters::no_odt()`}
|
* \cgalParamDescription{`exude_mesh_3()` can optionally be called after the meshing process.
|
||||||
|
* Two named parameters control this behavior:
|
||||||
\cgalParamNBegin{perturb_options}
|
* <UL>
|
||||||
\cgalParamDescription{`parameters::perturb()` and `parameters::no_perturb()` are designed to
|
* <LI> `parameters::exude()`
|
||||||
trigger or not a call to `perturb_mesh_3()` function and
|
* <LI> `parameters::no_exude()`
|
||||||
to set the parameters of this optimizer. If one parameter is not set, the default value of
|
* </UL>}
|
||||||
`perturb_mesh_3()` is used for this parameter, except for the time bound which is set to be
|
* \cgalParamDefault{`parameters::exude()`}
|
||||||
equal to the refinement CPU time.}
|
* \cgalParamNEnd
|
||||||
\cgalParamType{`parameters::perturb()` and `parameters::no_perturb()`}
|
* \cgalNamedParamsEnd
|
||||||
\cgalParamDefault{`parameters::no_perturb`}
|
*
|
||||||
|
* Note that whatever may be the optimization processes activated,
|
||||||
\cgalParamNBegin{exude_options}
|
* they are always launched in the order that is a suborder
|
||||||
\cgalParamDescription{parameters::exude()` and `parameters::no_exude()` are designed to
|
* of the following (see user manual for further
|
||||||
trigger or not a call to `exude_mesh_3()` function and to override to set the
|
* details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*.
|
||||||
parameters of this optimizer. If one parameter is not set, the default value of
|
*
|
||||||
`exude_mesh_3()` is used for this parameter, except for the time bound which is set to be
|
* Beware that optimization of the mesh is obtained
|
||||||
equal to the refinement CPU time.}
|
* by perturbing mesh vertices and modifying the mesh connectivity
|
||||||
\cgalParamType{`parameters::exude()` and `parameters::no_exude()`}
|
* and that this has an impact
|
||||||
\cgalParamDefault{`parameters::no_exude`}
|
* on the strict compliance to the refinement criteria.
|
||||||
|
* Though a strict compliance to mesh criteria
|
||||||
\cgalNamedParamsEnd
|
* is guaranteed 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
|
||||||
The optimization parameters can be passed in an arbitrary order. If one parameter
|
* optimization processes.
|
||||||
is not passed, its default value is used. The default values are
|
*
|
||||||
`no_lloyd()`, `no_odt()`, `perturb()` and `exude()`.
|
* \sa `refine_mesh_3()`
|
||||||
|
* \sa `parameters::features()`
|
||||||
Note that whatever may be the optimization processes activated,
|
* \sa `parameters::no_features()`
|
||||||
they are always launched in the order that is a suborder
|
* \sa `parameters::manifold()`
|
||||||
of the following (see user manual for further
|
* \sa `parameters::manifold_with_boundary()`
|
||||||
details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*.
|
* \sa `parameters::non_manifold()`
|
||||||
|
* \sa `exude_mesh_3()`
|
||||||
Beware that optimization of the mesh is obtained
|
* \sa `perturb_mesh_3()`
|
||||||
by perturbing mesh vertices and modifying the mesh connectivity
|
* \sa `lloyd_optimize_mesh_3()`
|
||||||
and that this has an impact
|
* \sa `odt_optimize_mesh_3()`
|
||||||
on the strict compliance to the refinement criteria.
|
* \sa `parameters::exude()`
|
||||||
Though a strict compliance to mesh criteria
|
* \sa `parameters::no_exude()`
|
||||||
is guaranteed at the end of the Delaunay refinement, this may no longer be true after
|
* \sa `parameters::perturb()`
|
||||||
some optimization processes. Also beware that the default behavior does involve some
|
* \sa `parameters::no_perturb()`
|
||||||
optimization processes.
|
* \sa `parameters::lloyd()`
|
||||||
|
* \sa `parameters::no_lloyd()`
|
||||||
\sa `refine_mesh_3()`
|
* \sa `parameters::odt()`
|
||||||
\sa `parameters::features()`
|
* \sa `parameters::no_odt()`
|
||||||
\sa `parameters::no_features()`
|
*/
|
||||||
\sa `parameters::manifold()`
|
|
||||||
\sa `parameters::manifold_with_boundary()`
|
|
||||||
\sa `parameters::non_manifold()`
|
|
||||||
\sa `exude_mesh_3()`
|
|
||||||
\sa `perturb_mesh_3()`
|
|
||||||
\sa `lloyd_optimize_mesh_3()`
|
|
||||||
\sa `odt_optimize_mesh_3()`
|
|
||||||
\sa `parameters::exude()`
|
|
||||||
\sa `parameters::no_exude()`
|
|
||||||
\sa `parameters::perturb()`
|
|
||||||
\sa `parameters::no_perturb()`
|
|
||||||
\sa `parameters::lloyd()`
|
|
||||||
\sa `parameters::no_lloyd()`
|
|
||||||
\sa `parameters::odt()`
|
|
||||||
\sa `parameters::no_odt()`
|
|
||||||
*/
|
|
||||||
|
|
||||||
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||||
C3T3 make_mesh_3(MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
C3T3 make_mesh_3(MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ namespace CGAL {
|
||||||
*
|
*
|
||||||
* @tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3`
|
* @tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3`
|
||||||
* @tparam MeshDomain a model of the concept `MeshDomain_3`
|
* @tparam MeshDomain a model of the concept `MeshDomain_3`
|
||||||
*
|
|
||||||
* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
||||||
*
|
*
|
||||||
* @param c3t3 the initial mesh and is modified by the algorithm to represent the final optimized mesh.
|
* @param c3t3 the initial mesh and is modified by the algorithm to represent the final optimized mesh.
|
||||||
|
|
@ -102,6 +101,7 @@ namespace CGAL {
|
||||||
* \cgalParamDefault{true}
|
* \cgalParamDefault{true}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
|
*
|
||||||
* \return a value of type `CGAL::Mesh_optimization_return_code` which is:
|
* \return a value of type `CGAL::Mesh_optimization_return_code` which is:
|
||||||
* <UL>
|
* <UL>
|
||||||
* <LI>`CGAL::TIME_LIMIT_REACHED` when the time limit is reached.
|
* <LI>`CGAL::TIME_LIMIT_REACHED` when the time limit is reached.
|
||||||
|
|
|
||||||
|
|
@ -101,176 +101,165 @@ private:
|
||||||
} // namespace details
|
} // namespace details
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgMesh3Functions
|
* \ingroup PkgMesh3Functions
|
||||||
|
*
|
||||||
The function `refine_mesh_3()` is a 3D
|
* The function `refine_mesh_3()` is a 3D
|
||||||
mesh generator. It produces simplicial meshes which discretize
|
* mesh generator. It produces simplicial meshes which discretize
|
||||||
3D domains.
|
* 3D domains.
|
||||||
|
*
|
||||||
The mesh generation algorithm is a Delaunay refinement process
|
* The mesh generation algorithm is a Delaunay refinement process
|
||||||
followed by an optimization phase.
|
* followed by an optimization phase.
|
||||||
The criteria driving the Delaunay refinement
|
* The criteria driving the Delaunay refinement
|
||||||
process may be tuned to achieve the user needs with respect to
|
* process may be tuned to achieve the user needs with respect to
|
||||||
the size of mesh elements, the accuracy of boundaries approximation,
|
* the size of mesh elements, the accuracy of boundaries approximation,
|
||||||
etc.
|
* etc.
|
||||||
|
*
|
||||||
The optimization phase is a sequence of optimization processes,
|
* The optimization phase is a sequence of optimization processes,
|
||||||
amongst the following available optimizers: an ODT-smoothing,
|
* amongst the following available optimizers: an ODT-smoothing,
|
||||||
a Lloyd smoothing, a sliver perturber, and a sliver exuder.
|
* a Lloyd smoothing, a sliver perturber, and a sliver exuder.
|
||||||
Each optimization process
|
* Each optimization process
|
||||||
can be activated or not,
|
* can be activated or not,
|
||||||
according to the user requirements
|
* according to the user requirements
|
||||||
and available time.
|
* and available time.
|
||||||
By default, only the perturber and the exuder are activated.
|
* By default, only the perturber and the exuder are activated.
|
||||||
Note that the benefits of the exuder will be lost if the mesh
|
* Note that the benefits of the exuder will be lost if the mesh
|
||||||
is further refined afterward.
|
* is further refined afterward.
|
||||||
|
*
|
||||||
\attention The function template `refine_mesh_3()` may be used to refine a previously
|
* \attention The function template `refine_mesh_3()` may be used to refine a previously
|
||||||
computed mesh, e.g.:
|
* computed mesh, e.g.:
|
||||||
\code{.cpp}
|
* \code{.cpp}
|
||||||
C3T3 c3t3 = CGAL::make_mesh_3<C3T3>(domain,criteria);
|
* C3T3 c3t3 = CGAL::make_mesh_3<C3T3>(domain,criteria);
|
||||||
|
*
|
||||||
CGAL::refine_mesh_3(c3t3, domain, new_criteria);
|
* CGAL::refine_mesh_3(c3t3, domain, new_criteria);
|
||||||
\endcode
|
* \endcode
|
||||||
|
*
|
||||||
Please note that we guarantee the result if and only if the domain does
|
* Please note that we guarantee the result if and only if the domain does
|
||||||
not change from one refinement to the next one.
|
* not change from one refinement to the next one.
|
||||||
|
*
|
||||||
|
*
|
||||||
\tparam C3T3 is required to be a model of
|
* \tparam C3T3 either a model of the concept `MeshComplex_3InTriangulation_3` or
|
||||||
the concept
|
* of `MeshComplexWithFeatures_3InTriangulation_3` if `MD`
|
||||||
`MeshComplex_3InTriangulation_3`,
|
* is a model of `MeshDomainWithFeatures_3`.
|
||||||
and a model of `MeshComplexWithFeatures_3InTriangulation_3`
|
* The type `C3T3` is in particular required to provide a nested type
|
||||||
if the domain is a model of `MeshDomainWithFeatures_3`.
|
* `C3T3::Triangulation` for the 3D triangulation
|
||||||
The argument `c3t3` is passed by
|
* embedding the mesh. The vertex and cell base classes of the
|
||||||
reference as this object is modified by the refinement process. As the
|
* triangulation `C3T3::Triangulation` are required to be models of the
|
||||||
refinement process only adds points to the triangulation, all
|
* concepts `MeshVertexBase_3` and `MeshCellBase_3` respectively.
|
||||||
vertices of the triangulation of `c3t3` remain in the
|
*
|
||||||
mesh during the refinement process. Object `c3t3` can be used to insert
|
* \tparam MD either a model of the concept `MeshDomain_3` or of
|
||||||
specific points in the domain to ensure that they will be contained in the
|
* `MeshDomainWithFeatures_3` if 0 and 1-dimensional features
|
||||||
final triangulation.
|
* of the input complex have to be accurately represented in the mesh.
|
||||||
The type `C3T3` is in particular required to provide a nested type
|
*
|
||||||
`C3T3::Triangulation` for the 3D triangulation
|
* \tparam MC either a model of the concept `MeshCriteria_3` or a model
|
||||||
embedding the mesh. The vertex and cell base classes of the
|
* of `MeshCriteriaWithFeatures_3` if the domain has exposed features.
|
||||||
triangulation `C3T3::Triangulation` are required to be models of the
|
*
|
||||||
concepts `MeshVertexBase_3` and `MeshCellBase_3`
|
* \param c3t3 the mesh to be refined that is modified by the refinement process.
|
||||||
respectively.
|
* As the refinement process only adds points to the triangulation, all
|
||||||
|
* vertices of the triangulation of `c3t3` remain in the
|
||||||
\tparam MD is required to be a model of
|
* mesh during the refinement process. `c3t3` can be used to insert
|
||||||
the concept `MeshDomain_3` or of the refined concept
|
* specific points in the domain to ensure that they will be contained in the
|
||||||
`MeshDomainWithFeatures_3` if 0 and 1-dimensional features
|
* final triangulation.
|
||||||
of the input complex have to be accurately represented in the mesh.
|
* \param domain the domain used to create the `c3t3` parameter. It is the sole link through which the domain
|
||||||
The argument `domain`
|
* to be discretized is known by the mesh generation algorithm.
|
||||||
is the sole link through which the domain
|
* \param criteria specifies the size and shape requirements for mesh tetrahedra
|
||||||
to be discretized is known by the mesh generation algorithm.
|
* and surface facets. These criteria form the rules which drive
|
||||||
|
* the refinement process. All mesh elements satisfy those criteria
|
||||||
\tparam MC is required to be a model of the concept
|
* at the end of the refinement process.
|
||||||
`MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3`
|
* In addition, if the domain has features, the argument
|
||||||
if the domain has exposed features. The argument `criteria` of
|
* `criteria` provides a sizing field to guide the discretization
|
||||||
type `MC` specifies the
|
* of 1-dimensional exposed features.
|
||||||
size and shape requirements for mesh tetrahedra
|
* \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below.
|
||||||
and surface facets. These criteria
|
* They control which optimization processes are performed
|
||||||
form the rules which drive the refinement process. All mesh elements
|
* and allow the user to tune the parameters of the optimization processes.
|
||||||
satisfy those criteria at the end of the refinement process.
|
* Individual optimization parameters are not described here as they are
|
||||||
In addition, if the domain has features, the argument
|
* internal types (see instead the documentation page of each optimizer).
|
||||||
`criteria` provides a sizing field to guide the discretization
|
* For each optimization algorithm, there exist two global functions
|
||||||
of 1-dimensional exposed features.
|
* that allow to enable or disable the optimizer.
|
||||||
|
*
|
||||||
\param c3t3 the mesh to be refined.
|
* \cgalNamedParamsBegin
|
||||||
\param domain the domain to be discretized
|
* \cgalParamNBegin{Topological options (manifoldness)}
|
||||||
\param criteria the criteria
|
* \cgalParamDescription{In order to drive the meshing algorithm and ensure that the output mesh follows a desired topological criterion,
|
||||||
\param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below.
|
* three named parameters control this option:
|
||||||
|
* <UL>
|
||||||
The following four parameters are optional optimization parameters.
|
* <LI>`parameters::manifold()`
|
||||||
They control which optimization processes are performed
|
* <LI>`parameters::manifold_with_boundary()`
|
||||||
and allow the user to tune the parameters of the optimization processes.
|
* <LI>`parameters::non_manifold()`
|
||||||
Individual optimization parameters are not described here as they are
|
* </UL>
|
||||||
internal types (see instead the documentation page of each optimizer).
|
* Note that the meshing algorithm cannot generate a manifold surface if the input surface is not manifold.}
|
||||||
For each optimization algorithm, there exist two global functions
|
* \cgalParamDefault{`parameters::non_manifold()`}
|
||||||
that allow to enable or disable the optimizer:
|
* \cgalParamNEnd
|
||||||
|
* \cgalParamNBegin{Lloyd optimization}
|
||||||
\cgalNamedParamsBegin
|
* \cgalParamDescription{`lloyd_optimize_mesh_3()` can optionally be called after the meshing process.
|
||||||
\cgalParamNBegin{manifold_option}
|
* Two named parameters control this behavior:
|
||||||
\cgalParamDescription{allows the user to drive the meshing algorithm,
|
* <UL>
|
||||||
and ensure that the output mesh surface follows the given manifold criterion.
|
* <LI> `parameters::no_lloyd()`
|
||||||
It can be activated with `parameters::manifold()`, `parameters::manifold_with_boundary()`
|
* <LI> `parameters::lloyd_optimize_mesh_3()`
|
||||||
and `parameters::non_manifold()`. Note that the meshing algorithm cannot generate a manifold
|
* </UL>}
|
||||||
surface if the input surface is not manifold.}
|
* \cgalParamDefault{`parameters::no_lloyd()`}
|
||||||
\cgalParamType{`parameters::manifold()` OR `parameters::manifold_with_boundary()` OR `parameters::non_manifold()`}
|
* \cgalParamNEnd
|
||||||
\cgalParamDefault{`parameters::non_manifold()`}
|
* \cgalParamNBegin{ODT optimization}
|
||||||
|
* \cgalParamDescription{`odt_optimize_mesh_3()` can optionally be called after the meshing process.
|
||||||
\cgalParamNBegin{lloyd_options}
|
* Two named parameters control this behavior:
|
||||||
\cgalParamDescription{`parameters::lloyd()` and `parameters::no_lloyd()` are designed to
|
* <UL>
|
||||||
trigger or not a call to `lloyd_optimize_mesh_3()` function and to set the
|
* <LI> `parameters::no_odt()`
|
||||||
parameters of this optimizer. If one parameter is not set, the default value of
|
* <LI> `parameters::odt()`
|
||||||
`lloyd_optimize_mesh_3()` is used for this parameter.}
|
* </UL>}
|
||||||
\cgalParamType{`parameters::lloyd()` OR `parameters::no_lloyd()`}
|
* \cgalParamDefault{`parameters::no_odt()`}
|
||||||
\cgalParamDefault{'parameters::no_lloyd()'}
|
* \cgalParamNEnd
|
||||||
|
* \cgalParamNBegin{Mesh perturbation}
|
||||||
\cgalParamNBegin{odt_options}
|
* \cgalParamDescription{`perturb_mesh_3()` can optionally be called after the meshing process.
|
||||||
\cgalParamDescription{`parameters::odt()` and `parameters::no_odt()` are designed to
|
* Two named parameters control this behavior:
|
||||||
trigger or not a call to `odt_optimize_mesh_3()` function and
|
* <UL>
|
||||||
to set the parameters of this optimizer.
|
* <LI> `parameters::no_perturb()`
|
||||||
If one parameter is not set, the default value of
|
* <LI> `parameters::perturb()`
|
||||||
`odt_optimize_mesh_3()` is used for this parameter.}
|
* </UL>}
|
||||||
\cgalParamType{`parameters::odt()` OR `parameters::no_odt()`}
|
* \cgalParamDefault{`parameters::perturb()`}
|
||||||
\cgalParamDefault{`parameters::no_odt()`}
|
* \cgalParamNEnd
|
||||||
|
* \cgalParamNBegin{Mesh exudation}
|
||||||
\cgalParamNBegin{perturb_options}
|
* \cgalParamDescription{`exude_mesh_3()` can optionally be called after the meshing process.
|
||||||
\cgalParamDescription{`parameters::perturb()` and `parameters::no_perturb()` are designed to
|
* Two named parameters control this behavior:
|
||||||
trigger or not a call to `perturb_mesh_3()` function and
|
* <UL>
|
||||||
to set the parameters of this optimizer. If one parameter is not set, the default value of
|
* <LI> `parameters::exude()`
|
||||||
`perturb_mesh_3()` is used for this parameter, except for the time bound which is set to be
|
* <LI> `parameters::no_exude()`
|
||||||
equal to the refinement CPU time.}
|
* </UL>}
|
||||||
\cgalParamType{`parameters::perturb()` and `parameters::no_perturb()`}
|
* \cgalParamDefault{`parameters::exude()`}
|
||||||
\cgalParamDefault{'parameters::no_perturb`}
|
* \cgalParamNEnd
|
||||||
|
* \cgalNamedParamsEnd
|
||||||
\cgalParamNBegin{exude_options}
|
*
|
||||||
\cgalParamDescription{parameters::exude()` and `parameters::no_exude()` are designed to
|
* The optimization parameters can be passed in arbitrary order. If one parameter
|
||||||
trigger or not a call to `exude_mesh_3()` function and to override to set the
|
* is not passed, its default value is used. The default values are
|
||||||
parameters of this optimizer. If one parameter is not set, the default value of
|
* `no_lloyd()`, `no_odt()`, `perturb()` and `exude()`.
|
||||||
`exude_mesh_3()` is used for this parameter, except for the time bound which is set to be
|
* Note that whatever may be the optimization processes activated,
|
||||||
equal to the refinement CPU time.}
|
* they are always launched in the order that is a suborder
|
||||||
\cgalParamType{`parameters::exude()` and `parameters::no_exude()`}
|
* of the following (see user manual for further
|
||||||
\cgalParamDefault{'parameters::no_exude`}
|
* details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*.
|
||||||
|
*
|
||||||
\cgalNamedParamsEnd
|
* Beware that optimization of the mesh is obtained
|
||||||
|
* by perturbing mesh vertices and modifying the mesh connectivity
|
||||||
The optimization parameters can be passed in arbitrary order. If one parameter
|
* and that this has an impact
|
||||||
is not passed, its default value is used. The default values are
|
* on the strict compliance to the refinement criteria.
|
||||||
`no_lloyd()`, `no_odt()`, `perturb()` and `exude()`.
|
* Though a strict compliance to mesh criteria
|
||||||
Note that whatever may be the optimization processes activated,
|
* is guaranteed at the end of the Delaunay refinement, this may no longer be true after
|
||||||
they are always launched in the order that is a suborder
|
* some optimization processes. Also beware that the default behavior does involve some
|
||||||
of the following (see user manual for further
|
* optimization processes.
|
||||||
details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*.
|
*
|
||||||
|
* \sa `CGAL::make_mesh_3()`
|
||||||
Beware that optimization of the mesh is obtained
|
* \sa `CGAL::parameters::manifold`
|
||||||
by perturbing mesh vertices and modifying the mesh connectivity
|
* \sa `CGAL::parameters::manifold_with_boundary`
|
||||||
and that this has an impact
|
* \sa `CGAL::parameters::non_manifold`
|
||||||
on the strict compliance to the refinement criteria.
|
* \sa `CGAL::exude_mesh_3()`
|
||||||
Though a strict compliance to mesh criteria
|
* \sa `CGAL::perturb_mesh_3()`
|
||||||
is guaranteed at the end of the Delaunay refinement, this may no longer be true after
|
* \sa `CGAL::lloyd_optimize_mesh_3()`
|
||||||
some optimization processes. Also beware that the default behavior does involve some
|
* \sa `CGAL::odt_optimize_mesh_3()`
|
||||||
optimization processes.
|
* \sa `CGAL::parameters::exude`
|
||||||
|
* \sa `CGAL::parameters::no_exude`
|
||||||
\sa `CGAL::make_mesh_3()`
|
* \sa `CGAL::parameters::perturb`
|
||||||
\sa `CGAL::parameters::manifold`
|
* \sa `CGAL::parameters::no_perturb`
|
||||||
\sa `CGAL::parameters::manifold_with_boundary`
|
* \sa `CGAL::parameters::lloyd`
|
||||||
\sa `CGAL::parameters::non_manifold`
|
* \sa `CGAL::parameters::no_lloyd`
|
||||||
\sa `CGAL::exude_mesh_3()`
|
* \sa `CGAL::parameters::odt`
|
||||||
\sa `CGAL::perturb_mesh_3()`
|
* \sa `CGAL::parameters::no_odt`
|
||||||
\sa `CGAL::lloyd_optimize_mesh_3()`
|
|
||||||
\sa `CGAL::odt_optimize_mesh_3()`
|
|
||||||
\sa `CGAL::parameters::exude`
|
|
||||||
\sa `CGAL::parameters::no_exude`
|
|
||||||
\sa `CGAL::parameters::perturb`
|
|
||||||
\sa `CGAL::parameters::no_perturb`
|
|
||||||
\sa `CGAL::parameters::lloyd`
|
|
||||||
\sa `CGAL::parameters::no_lloyd`
|
|
||||||
\sa `CGAL::parameters::odt`
|
|
||||||
\sa `CGAL::parameters::no_odt`
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||||
void refine_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
void refine_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||||
{
|
{
|
||||||
|
|
@ -307,7 +296,7 @@ void refine_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria, const
|
||||||
* @brief This function refines the mesh c3t3 wrt domain & criteria
|
* @brief This function refines the mesh c3t3 wrt domain & criteria
|
||||||
*
|
*
|
||||||
* @param c3t3 the mesh to be refined.
|
* @param c3t3 the mesh to be refined.
|
||||||
* @param domain the domain to be discretized
|
* @param domain the domain used to create the `c3t3` parameter
|
||||||
* @param criteria the criteria
|
* @param criteria the criteria
|
||||||
* @param exude if \c true, an exudation step will be done at
|
* @param exude if \c true, an exudation step will be done at
|
||||||
* the end of the Delaunay refinement process
|
* the end of the Delaunay refinement process
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue