Reference documentation for deal.II version Git aa2075a 20170421 00:33:12 +0200

#include <deal.II/grid/cell_id.h>
Public Types  
typedef std::array< unsigned int, 4 >  binary_type 
Public Member Functions  
CellId (const unsigned int coarse_cell_id, const std::vector< unsigned char > &child_indices)  
CellId (const unsigned int coarse_cell_id, const unsigned int n_child_indices, const unsigned char *child_indices)  
CellId (const binary_type &binary_representation)  
CellId ()  
std::string  to_string () const 
template<int dim>  
binary_type  to_binary () const 
template<int dim, int spacedim>  
Triangulation< dim, spacedim >::cell_iterator  to_cell (const Triangulation< dim, spacedim > &tria) const 
bool  operator== (const CellId &other) const 
bool  operator!= (const CellId &other) const 
bool  operator< (const CellId &other) const 
Private Attributes  
unsigned int  coarse_cell_id 
unsigned int  n_child_indices 
std::array< char, internal::p4est::functions< 2 >::max_level >  child_indices 
Friends  
std::istream &  operator>> (std::istream &is, CellId &cid) 
std::ostream &  operator<< (std::ostream &os, const CellId &cid) 
A class to represent a unique ID for a cell in a Triangulation. This class stores the index of the coarse cell from which a cell is descendant, together with information on how to reach the cell from that coarse cell (i.e., which child index to take on each level when moving from one cell to its children). The important point about this class is that an object of the current class uniquely identifies a cell in triangulation, and it even does so in the context of objects of type parallel::distributed::Triangulation where the local portion of a mesh may not store all cells. For example, the CellId computed for a ghost cell on one processor will be exactly the same as the CellId computed for the very same cell on the processor that actually owns the cell, although the level and index of the iterators pointing to that cell within the triangulation stored on each of the processors may (and in general will) be different. In other words, CellId provides the tool with which it is possible to uniquely identify cells in a parallel triangulation, and consequently makes it possible to exchange data between processors tied to individual cells.
typedef std::array<unsigned int, 4> CellId::binary_type 
A type that is used to encode the CellId data in a compact and fast way (e.g. for MPI transfer to other processes). Note that it limits the number of children that can be transferred to 20 in 3D and 30 in 2D (using 2 times 32 bit for storage), a limitation that is identical to the one used by p4est.
CellId::CellId  (  const unsigned int  coarse_cell_id, 
const std::vector< unsigned char > &  child_indices  
) 
Construct a CellId object with a given coarse_cell_id
and vector of child indices. child_indices
is interpreted identical to the member variable with the same name, namely each entry denotes which child to pick from one refinement level to the next, starting with the coarse cell, until we get to the cell represented by the current object. Therefore, each entry should be a number between 0 and the number of children of a cell in the current space dimension.
Definition at line 40 of file cell_id.cc.
CellId::CellId  (  const unsigned int  coarse_cell_id, 
const unsigned int  n_child_indices,  
const unsigned char *  child_indices  
) 
Construct a CellId object with a given coarse_cell_id
and array of child indices provided in child_indices
. child_indices
is interpreted identical to the member variable with the same name, namely each entry denotes which child to pick from one refinement level to the next, starting with the coarse cell, until we get to the cell represented by the current object. Therefore, each entry should be a number between 0 and the number of children of a cell in the current space dimension. child_indices
shall have at least n_child_indices
valid entries.
Definition at line 53 of file cell_id.cc.
CellId::CellId  (  const binary_type &  binary_representation  ) 
Construct a CellId object with a given binary representation that was previously constructed by CellId::to_binary.
Definition at line 67 of file cell_id.cc.
CellId::CellId  (  ) 
Construct an invalid CellId.
Definition at line 25 of file cell_id.cc.
std::string CellId::to_string  (  )  const 
Return a human readable string representation of this CellId.
Definition at line 152 of file cell_id.cc.
CellId::binary_type CellId::to_binary  (  )  const 
Return a compact and fast binary representation of this CellId.
Definition at line 107 of file cell_id.cc.
Triangulation<dim,spacedim>::cell_iterator CellId::to_cell  (  const Triangulation< dim, spacedim > &  tria  )  const 
Return a cell_iterator to the cell represented by this CellId.

inline 

inline 

inline 

friend 

friend 

private 

private 

private 
An array of integers that denotes which child to pick from one refinement level to the next, starting with the coarse cell, until we get to the cell represented by the current object. Only the first n_child_indices entries are used, but we use a statically allocated array instead of a vector of size n_child_indices to speed up creation of this object. If the given dimensions ever become a limitation the array can be extended.