MeshComplex_3InTriangulation_3

Definition

The concept MeshComplex_3InTriangulation_3 provides a data structure to represent and maintain a 3D complex embedded in a 3D triangulation. The data structure includes a 3D triangulation and marks for each cell of the triangulation whether or not such cell belongs to the 3D complex. In Cgal 3D mesh generator, this data structure is used to maintain, during the refinement process, the current approximation of the domain to be discretized and to represent the final mesh. Each subdomain is approximated as the union of some cells of the embedding triangulation. The 3D complex is always a pure 3D complex, i.e., it includes a subset of the cells of the triangulations as well as their subfaces.

The data structure also represents a 2D complex, the boundary complex, embedded in the same 3D triangulation, and representing the boundary of the 3D complex. This 2D complex includes, for each surface patch of the input domain, a set of triangulation facets, forming an approximation of the surface patch. Facets in the boundary complex are called surface facets or boundary facets.

Types

MeshComplex_3InTriangulation_3::Triangulation
Type of the embedding 3D triangulation. Must be a 3D regular triangulation of Cgal.

typedef Triangulation::Vertex_handle
Vertex_handle; Type of the embedding triangulation vertex handles.
typedef Triangulation::Cell_handle
Cell_handle; Type of the embedding triangulation cell handles.
typedef Triangulation::Facet Facet; Type of the embedding triangulation facets.
typedef Triangulation::Edge Edge; Type of the embedding triangulation edges.
typedef Triangulation::size_type size_type; Size type (unsigned integral type).

MeshComplex_3InTriangulation_3::Subdomain_index
Must match the type MeshDomain_3::Subdomain_index of the mesh generation process.

MeshComplex_3InTriangulation_3::Surface_Index
Must match the type MeshDomain_3::Surface_index of the mesh generation process.

MeshComplex_3InTriangulation_3::Index
Must match the type MeshDomain_3::Index of the mesh generation process.


MeshComplex_3InTriangulation_3::Cell_iterator
Iterator type to visit the cells of the triangulation belonging to the 3D complex.

MeshComplex_3InTriangulation_3::Facet_iterator
Iterator type to visit the facets of the 2D boundary complex.

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. There is no copy of embedded triangulation, thus this method runs in constant time. This method should be preferred to c3t3=rhs or c3t3(rhs) when rhs is deleted after that.

Access Functions

Triangulation c3t3.triangulation () 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)
Adds cell c of index index to the 3D complex.
void c3t3.add_to_complex ( Facet f, Surface_index index)
Adds facet f with surface index index) to the 2D boundary complex.
void c3t3.add_to_complex ( Cell_handle c, int i, Surface_index index)
Same as above with f=(c,i).

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

void c3t3.set_subdomain_index ( Cell_handle c, Subdomain_index index)
Sets the subdomain index of a cell.
void c3t3.set_surface_index ( Facet f, Surface_index index)
Sets the surface index of the facet f.
void c3t3.set_surface_index ( Cell_handle c, int i, Surface_index index)
Same as above with f=(c,i).
void c3t3.set_index ( Vertex_handle v, Index index)
Sets the index of a vertex.
void c3t3.set_dimension ( Vertex_handle v)
Sets the dimension of vertex v.

Queries

Queries on the 3D and 2D complexes.

size_type c3t3.number_of_cells () Returns the number of cells that belong to the 3D complex.

size_type c3t3.number_of_facets () Returns the number of facets that belong to the boundary 2D complex.

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 of the input domain containing the cell c (i.e., its circumcenter). The default subdomain index is returned if the cell c is outside the domain.

Surface_index c3t3.surface_index ( Facet f) For a surface facet, returns the index of the surface patch of the input complex intersection the dual Voronoi edge of the facet. For a facet that is not a surface facet, the default Surface_index value is returned.

Surface_index c3t3.surface_index ( Cell_handle c, int i)
Same as above with f=(c,i).

int c3t3.in_dimension ( Vertex_handle v)
Returns the dimension of the lowest dimensional face of the domain complex that contains the vertex v.

Index c3t3.index ( Vertex_handle v) Returns the index of the lowest dimensional face of the input domain that contains 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.

Cell_iterator c3t3.cells_begin () Returns a Cell_iterator to visit the cells of the triangulation contained in the input domain.
Cell_iterator c3t3.cells_end () Returns the past-the-end iterator for the above iterator.

Facet_iterator c3t3.facets_begin () Returns a Facet_iterator to visit the facets of the 2D complex.
Facet_iterator c3t3.facets_end () Returns the past-the-end iterator for the above iterator.

Has Models

CGAL::Mesh_complex_3_in_triangulation_3<Tr>

See Also

MeshDomain_3
CGAL::make_mesh_3