MeshingCriteria_2

Definition

The concept MeshingCriteria_2 defines the meshing criteria to be used in the algorithm. It provides a predicate Is_bad that tests a triangle according to criteria. The return type of Is_bad is an enum Mesh_2::Face_badness.

The possible values of Mesh_2::Face_badness are NOT_BAD, BAD and IMPERATIVELY_BAD. If the predicate returns BAD, the triangle is marked as bad and the algorithm will try to destroy it. If the predicates returns IMPERATIVELY_BAD, the algorithm will destroy the triangle unconditionally during its execution.

The termination of the algorithm is guaranteed when criteria are shape criteria corresponding to a bound on smallest angles not less than 20.7 degrees (this corresponds to a radius-edge ratio bound not less than sqrt(2)). Any size criteria that are satisfied by small enough tetrahedra can be added to the set of criteria without compromising the termination.

Note that, in the presence of input angles smaller than 60 degrees, some bad shaped triangles can appear in the finale mesh in the neighboring of small angles. To achieve termination and the respect of size criteria everywhere, the Is_bad predicate has to return IMPERATIVELY_BAD when size criteria are not satisfied, and BAD when shape criteria are not satisfied.

MeshingCriteria_2 also provides a type Quality designed to code a quality measure for triangles. The type Quality must be less-than comparable as the meshing algorithm will order bad triangles by quality, to split those with smallest quality first. The predicate Is_bad computes the quality of the triangle as a by-product.

Types

MeshingCriteria_2::Face_handle
Handle to a face of the triangulation.


MeshingCriteria_2::Quality
Default constructible, copy constructible, assignable, and less-than comparable type.


MeshingCriteria_2::Is_bad
Predicate object. Must provide two operators. The first operator Mesh_2::Face_badness operator()(Face_handle fh, Quality& q) returns NOT_BAD if it satisfies the desired criteria for mesh triangles, BAD if it does not, and IMPERATIVELY_BAD if it does not and should be refined unconditionally. In addition, this operator assigns to q a value measuring the quality of the triangle pointed by fh. The second operator Mesh_2::Face_badness operator()(Quality q) returns NOT_BAD if q is the quality of a good triangle, BAD if the q represents a poor quality, and IMPERATIVELY_BAD if q represents the quality of a bad triangle that should be refined unconditionally.

Access to predicate and constructor objects

Is_bad traits.is_bad_object ()

Has Models

Delaunay_mesh_criteria_2<CDT>
Delaunay_mesh_size_criteria_2<CDT>