Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Public Attributes | List of all members
CellData< structdim > Struct Template Reference

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

Inheritance diagram for CellData< structdim >:
[legend]

Public Member Functions

 CellData ()
 

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 35 of file grid_in.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

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 141 of file tria.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 160 of file tria.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 171 of file tria.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 182 of file tria.h.


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