Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | Public Attributes | List of all members
CellData< structdim > Struct Template Reference

#include <deal.II/grid/tria_description.h>

Inheritance diagram for CellData< structdim >:
[legend]

Public Member Functions

 CellData ()
 
bool operator== (const CellData< structdim > &other) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Public Attributes

unsigned int vertices [GeometryInfo< structdim >::vertices_per_cell]
 
union {
   types::material_id   material_id
 
   types::boundary_id   boundary_id
 
}; 
 
types::manifold_id manifold_id
 

Detailed Description

template<int structdim>
struct CellData< structdim >

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 step-14. There are also many more use cases in the implementation of the functions of the GridGenerator namespace.

Definition at line 67 of file tria_description.h.

Constructor & Destructor Documentation

◆ CellData()

template<int structdim>
CellData< structdim >::CellData

Default constructor. Sets the member variables to the following values:

  • vertex indices to invalid values
  • boundary or material id zero (the default for boundary or material ids)
  • manifold id to numbers::flat_manifold_id

Definition at line 48 of file tria.cc.

Member Function Documentation

◆ operator==()

template<int structdim>
bool CellData< structdim >::operator== ( const CellData< structdim > &  other) const

Comparison operator.

Definition at line 61 of file tria.cc.

◆ serialize()

template<int structdim>
template<class Archive >
void CellData< structdim >::serialize ( Archive &  ar,
const unsigned int  version 
)

Boost serialization function

Definition at line 233 of file tria_description.h.

Member Data Documentation

◆ vertices

template<int structdim>
unsigned int CellData< structdim >::vertices[GeometryInfo< structdim >::vertices_per_cell]

Indices of the vertices of this cell. These indices correspond to entries in the vector of vertex locations passed to Triangulation::create_triangulation().

Definition at line 74 of file tria_description.h.

◆ material_id

template<int structdim>
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 93 of file tria_description.h.

◆ boundary_id

template<int structdim>
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 104 of file tria_description.h.

◆ @1

union { ... }

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).

◆ manifold_id

template<int structdim>
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 115 of file tria_description.h.


The documentation for this struct was generated from the following files: