MeshComplex_3InTriangulation_3

Definition

The concept MeshComplex_3InTriangulation_3 describes a data structure to represent and maintain a 3D complex embedded in a 3D triangulation. More precisely, the concept MeshComplex_3InTriangulation_3 is a minimal version designed to represent 3D complexes that have only faces with dimension 2 and 3. Embedded 3D complexes with faces of dimension 0, 1, 2 and 3, are more conveniently represented by the refined concept MeshComplexWithFeatures_3InTriangulation_3.

The data structure includes a 3D triangulation which is itself a 3D complex. To distinguish the faces of the embedded 3D complex from the faces of the triangulation, we call the faces of the embedded complex respectively subdomains, for 3D faces and surface patches, for 2D faces, while the triangulations faces are called respectively cells, facets, edges and vertices.

Each subdomain of the embedded 3D complex is a union of triangulation cells. Cells that belong to some subdomain are said to belong to the embedded complex. Each surface patch is a union of triangulation facets. Triangulation facets that belong to some surface patch are called surface facets. The concept MeshComplex_3InTriangulation_3 handles the marking and retrieval of the cells of the triangulation belonging to the subdomains and of the facets of the triangulation belonging to the surface patches. The concept MeshComplex_3InTriangulation_3 also includes an index type for vertices of the triangulation and attaches an integer, called the dimension to each vertex. When used by the meshing algorithm, the index and the dimension of each vertex are used to store respectively the lowest dimensional face of the input complex including the vertex and the dimension of this face.

In the 3D mesh generator, the concept MeshComplex_3InTriangulation_3 is used when the domain to be meshed has no feature with dimension 0 and 1. Such a data structure is used internally by the mesh generator to maintain the current approximation of each subdomain and each boundary surface patch. The data structure encodes the final mesh at the end of the meshing process.

Types

MeshComplex_3InTriangulation_3::Triangulation
Type of the embedding 3D triangulation. This type must be a 3D regular triangulation of Cgal when used for 3D mesh generation.

typedef Triangulation::Vertex_handle
Vertex_handle; Type Vertex_handle type of the triangulation.
typedef Triangulation::Cell_handle
Cell_handle; The Cell_handle type of the triangulation.
typedef Triangulation::Facet Facet; The Facet type of the triangulation.
typedef Triangulation::Edge Edge; The Edge type of the triangulation.
typedef Triangulation::size_type size_type; Size type (unsigned integral type).

MeshComplex_3InTriangulation_3::Subdomain_index
A type for indices of subdomains. This type must match the type MeshDomain_3::Subdomain_index when the concept is used for mesh generation.

MeshComplex_3InTriangulation_3::Surface_patch_index
A type for indices of surface patches. This type must match the type MeshDomain_3::Surface_patch_index when the concept is used for mesh generation.

MeshComplex_3InTriangulation_3::Index
A type for indexing vertices that belong to some surface patches or subdomains. This type must match the type MeshDomain_3::Index when the concept is used for mesh generation.


MeshComplex_3InTriangulation_3::Cells_in_complex_iterator
An iterator type to visit the cells of the triangulation belonging to the 3D complex.

MeshComplex_3InTriangulation_3::Facets_in_complex_iterator
An iterator type to visit the surface facets.

Creation

MeshComplex_3InTriangulation_3 c3t3;
Builds an empty 3D complex.

MeshComplex_3InTriangulation_3 c3t3 ( rhs);
Copy constructor. Embedded triangulation is duplicated.

MeshComplex_3InTriangulation_3& c3t3 = rhs Assignment operator. Embedded triangulation is duplicated, and the former triangulation of rhs is deleted.

void c3t3.swap ( & rhs) Swaps c3t3 and rhs.

Access Functions

Triangulation c3t3.triangulation () const Returns a const reference to the triangulation.

Non const access

The responsibility of keeping a valid C3T3 belongs to the user when using advanced operations allowing a direct manipulation of the triangulation.

Triangulation& c3t3.triangulation () Returns a reference to the triangulation.

Modifiers

void c3t3.add_to_complex ( Cell_handle c, Subdomain_index index)
Sets the cell c as a cell of the subdomain index.
void c3t3.add_to_complex ( Facet f, Surface_patch_index index)
Adds the facet f as a facet of the surface patch index.)
void c3t3.add_to_complex ( Cell_handle c, int i, Surface_patch_index index)
Same as above with f=(c,i).

void c3t3.remove_from_complex ( Cell_handle c)
Removes cell c from the embedded complex.
void c3t3.remove_from_complex ( Facet f)
Removes facet f from the embedded complex.
void c3t3.remove_from_complex ( Cell_handle c, int i)
Same as above with f=(c,i).

void c3t3.set_dimension ( Vertex_handle v, int dimension)
Sets the ``dimension'' of vertex v. The dimension is an integer attached to the vertex. When the concept MeshComplex_3InTriangulation_3 is used for mesh generation this integer is used to store the dimension of the lowest dimensional face of the input complex including the vertex.
void c3t3.set_index ( Vertex_handle v, Index index)
Sets the index of a vertex.

Queries

Queries on the faces of the embedded complex.

size_type c3t3.number_of_cells () Returns the number of cells that belong to the embedded complex.
size_type c3t3.number_of_cells ( Subdomain_index index)
Returns the number of cells that belong to the subdomain of the embedded complex with index index.

size_type c3t3.number_of_facets () Returns the number of facets that are surface facets, i. e. belong to some surface patch of the embedded complex.
size_type c3t3.number_of_facets ( Surface_patch_index index)
Returns the number of facets that belong to the surface patch of the embedded complex with index index.

bool c3t3.is_in_complex ( Cell_handle c)
Returns true iff the cell c belongs to the 3D complex.
bool c3t3.is_in_complex ( Facet f) Returns true iff the facet f belongs to the boundary 2D complex.
bool c3t3.is_in_complex ( Cell_handle c, int i)
Same as above with f=(c,i).

Queries on the identifier of the face complex including triangulation cells, facets and vertices.

Subdomain_index c3t3.subdomain_index ( Cell_handle c)
Returns the index of the subdomain containing the cell c. The default subdomain index is returned if the cell c does not belong to the embedded complex.

Surface_patch_index c3t3.surface_patch_index ( Facet f)
For a surface facet, returns the index of the surface patch containing the facet. The default Surface_patch_index value is returned if the facet is not a surface facet.

Surface_patch_index c3t3.surface_patch_index ( Cell_handle c, int i)
Same as above with f=(c,i).

int c3t3.in_dimension ( Vertex_handle v) const
Returns the dimension of the vertex v.

Index c3t3.index ( Vertex_handle v) const
Returns the index of the vertex v.

Traversal of the complex

The data structure provides iterators to visit the cells and facets of the complex. All those iterators are bidirectional and non mutable.

Cells_in_complex_iterator c3t3.cells_in_complex_begin () Returns a Cell_in_complex_iterator to visit the cells of the triangulation contained in the embedded complex.
Cells_in_complex_iterator c3t3.cells_in_complex_end () Returns the past-the-end iterator for the above iterator.
Cells_in_complex_iterator c3t3.cells_in_complex_begin ( Subdomain_index index)
Returns a Cell_in_complex_iterator to visit the cells of the triangulation which belong to the approximation of subdomain of index index.
Cells_in_complex_iterator c3t3.cells_in_complex_end ( Subdomain_index index)
Returns the past-the-end iterator for the above iterator.

Facets_in_complex_iterator c3t3.facets_in_complex_begin () Returns a Facet_in_complex_iterator to visit the facets in the surface patches of the embedded complexes.
Facets_in_complex_iterator c3t3.facets_in_complex_end () Returns the past-the-end iterator for the above iterator.
Facets_in_complex_iterator c3t3.facets_in_complex_begin ( Surface_patch_index index)
Returns a Facet_in_complex_iterator to visit the facets of the triangulation which which belong to the approximation of surface patch of index index.
Facets_in_complex_iterator c3t3.facets_in_complex_end ( Surface_patch_index index)
Returns the past-the-end iterator for the above iterator.

Has Models

CGAL::Mesh_complex_3_in_triangulation_3<Tr,CornerIndex,CurveSegmentIndex>

See Also

MeshDomain_3
MeshComplexWithFeatures_3InTriangulation_3
CGAL::make_mesh_3