Reference documentation for deal.II version 9.5.0

#include <deal.II/grid/tria_description.h>
Public Member Functions  
CellData (const unsigned int n_vertices=ReferenceCells::get_hypercube< structdim >().n_vertices())  
bool  operator== (const CellData< structdim > &other) const 
template<class Archive >  
void  serialize (Archive &ar, const unsigned int version) 
Public Attributes  
std::vector< unsigned int >  vertices  
union {  
types::material_id material_id  
types::boundary_id boundary_id  
};  
types::manifold_id  manifold_id  
The CellData class (and the related SubCellData class) is used to provide a comprehensive, but minimal, description of the cells when creating a triangulation via Triangulation::create_triangulation(). Specifically, each CellData object – describing one cell in a triangulation – has member variables for indices of the \(2^d\) vertices (the actual coordinates of the vertices are described in a separate vector passed to Triangulation::create_triangulation(), so the CellData object only needs to store indices into that vector), the material id of the cell that can be used in applications to describe which part of the domain a cell belongs to (see the glossary entry on material ids), and a manifold id that is used to describe the geometry object that is responsible for this cell (see the glossary entry on manifold ids) to describe the manifold this object belongs to.
This structure is also used to represent data for faces and edges when used as a member of the SubCellData class. In this case, the template argument structdim
of an object will be less than the dimension dim
of the triangulation. If this is so, then vertices array represents the indices of the vertices of one face or edge of one of the cells passed to Triangulation::create_triangulation(). Furthermore, for faces the material id has no meaning, and the material_id
field is reused to store a boundary_id
instead to designate which part of the boundary the face or edge belongs to (see the glossary entry on boundary ids).
An example showing how this class can be used is in the create_coarse_grid()
function of step14. There are also many more use cases in the implementation of the functions of the GridGenerator namespace.
Definition at line 79 of file tria_description.h.
CellData< structdim >::CellData  (  const unsigned int  n_vertices = ReferenceCells::get_hypercube<structdim>().n_vertices()  ) 
Default constructor. Sets the member variables to the following values:
By default, the constructor initializes the vertices
member variable to have as many entries as it takes to describe a hypercube cell (i.e., a ReferenceCells::Line, ReferenceCells::Quadrilateral, or ReferenceCells::Hexahedron). This is historical and dates back to the time where deal.II could only deal with these kinds of cells. If you want an object of the current type to describe, for example, a triangle or tetrahedron, then you either have to call this constructor with an explicit argument different from the default value, or manually resize the vertices
member variable after construction.
Definition at line 35 of file tria_description.cc.
bool CellData< structdim >::operator==  (  const CellData< structdim > &  other  )  const 
Comparison operator.
Definition at line 45 of file tria_description.cc.
void CellData< structdim >::serialize  (  Archive &  ar, 
const unsigned int  version  
) 
Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.
Definition at line 281 of file tria_description.h.
Indices of the vertices of this cell. These indices correspond to entries in the vector of vertex locations passed to Triangulation::create_triangulation().
By default, the constructor of this class initializes this variable to have as many entries as it takes to describe a hypercube cell (i.e., a ReferenceCells::Line, ReferenceCells::Quadrilateral, or ReferenceCells::Hexahedron). This is historical and dates back to the time where deal.II could only deal with these kinds of cells. If you want an object of the current type to describe, for example, a triangle or tetrahedron, then you either have to call this constructor with an explicit argument different from the default value, or manually resize the vertices
member variable after construction.
The kind of cell described by the current object is then determined by calling ReferenceCell::n_vertices_to_type() on the number of vertices described by this array.
Definition at line 100 of file tria_description.h.
types::material_id CellData< structdim >::material_id 
The material id of the cell being described. See the documentation of the CellData class for examples of how to use this field.
This variable can only be used if the current object is used to describe a cell, i.e., if structdim
equals the dimension dim
of a triangulation.
Definition at line 119 of file tria_description.h.
types::boundary_id CellData< structdim >::boundary_id 
The boundary id of a face or edge being described. See the documentation of the CellData class for examples of how to use this field.
This variable can only be used if the current object is used to describe a face or edge, i.e., if structdim
is less than the dimension dim
of a triangulation. In this case, the CellData object this variable belongs to will be part of a SubCellData object.
Definition at line 130 of file tria_description.h.
union { ... } CellData< structdim > 
Material or boundary indicator of this cell. This field is a union that stores either a boundary or a material id, depending on whether the current object is used to describe a cell (in a vector of CellData objects) or a face or edge (as part of a SubCellData object).
types::manifold_id CellData< structdim >::manifold_id 
Manifold identifier of this object. This identifier should be used to identify the manifold to which this object belongs, and from which this object will collect information on how to add points upon refinement.
See the documentation of the CellData class for examples of how to use this field.
Definition at line 141 of file tria_description.h.