Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | Private Attributes | Friends | List of all members
CellId Class Reference

#include <cell_id.h>

Public Member Functions

 CellId (unsigned int coarse_cell_id_, std::vector< unsigned char > id_)
 
 CellId ()
 
bool operator== (const CellId &other) const
 
bool operator!= (const CellId &other) const
 

Private Attributes

unsigned int coarse_cell_id
 
std::vector< unsigned char > id
 

Friends

std::istream & operator>> (std::istream &is, CellId &cid)
 
std::ostream & operator<< (std::ostream &os, const CellId &cid)
 

Detailed Description

A class to represent a unique ID for a cell in a Triangulation. This class stores the index of the coarse cell together with the information on how to reach the cell from that coarse cell (which child index to take on each level). The internal representation is not exposed on purpose.

TODO: does it make sense to implement a more efficient representation (internally and/or as a string)? If yes, something like a 64bit int as in p4est would be a good option.

Definition at line 40 of file cell_id.h.

Constructor & Destructor Documentation

CellId::CellId ( unsigned int  coarse_cell_id_,
std::vector< unsigned char >  id_ 
)
inlineexplicit

construct CellId with a given coarse_cell_index and list of child indices

Definition at line 46 of file cell_id.h.

CellId::CellId ( )
inline

construct an empty CellId.

Definition at line 53 of file cell_id.h.

Member Function Documentation

bool CellId::operator== ( const CellId other) const
inline

compare two CellIds

Definition at line 116 of file cell_id.h.

bool CellId::operator!= ( const CellId other) const
inline

compare two CellIds

Definition at line 127 of file cell_id.h.

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  is,
CellId cid 
)
friend

read CellId from a stream

Definition at line 89 of file cell_id.h.

std::ostream& operator<< ( std::ostream &  os,
const CellId cid 
)
friend

output CellId into a stream

Definition at line 78 of file cell_id.h.


The documentation for this class was generated from the following file: