internal::Triangulation::TriaLevel< dim > Class Template Reference
[Grid classes]

List of all members.

Classes

class  ExcMemoryInexact
class  ExcMemoryWasted

Public Member Functions

void reserve_space (const unsigned int total_cells, const unsigned int dimension)
void monitor_memory (const unsigned int true_dimension) const
unsigned int memory_consumption () const

Public Attributes

std::vector< unsigned char > refine_flags
std::vector< boolcoarsen_flags
std::vector< std::pair< int,
int > > 
neighbors
std::vector< unsigned intsubdomain_ids
TriaObjects< TriaObject< dim > > cells


Detailed Description

template<int dim>
class internal::Triangulation::TriaLevel< dim >

Store all information which belongs to one level of the multilevel hierarchy.

In TriaLevel, all cell data is stored which is not dependent on the dimension, e.g. a field to store the refinement flag for the cells (what a cell actually is is declared elsewhere), etc. See also TriaObjects for non leveloriented data.

There is another field, which may fit in here, namely the material data (for cells) or the boundary indicators (for faces), but since we need for a line or quad either boundary information or material data, we store them with the lines and quads rather than with the common data. Likewise, in 3d, we need boundary indicators for lines and quads (we need to know how to refine a line if the two adjacent faces have different boundary indicators), and material data for cells.

Author:
Wolfgang Bangerth, Guido Kanschat, 1998, 2007

Member Function Documentation

template<int dim>
void internal::Triangulation::TriaLevel< dim >::reserve_space ( const unsigned int  total_cells,
const unsigned int  dimension 
)

Reserve enough space to accomodate total_cells cells on this level. Since there are no used flags on this level, you have to give the total number of cells, not only the number of newly to accomodate ones, like in the TriaLevel<N>::reserve_space functions, with N>0.

Since the number of neighbors per cell depends on the dimensions, you have to pass that additionally.

template<int dim>
void internal::Triangulation::TriaLevel< dim >::monitor_memory ( const unsigned int  true_dimension  )  const

Check the memory consistency of the different containers. Should only be called with the prepro flag DEBUG set. The function should be called from the functions of the higher TriaLevel classes.

template<int dim>
unsigned int internal::Triangulation::TriaLevel< dim >::memory_consumption (  )  const

Determine an estimate for the memory consumption (in bytes) of this object.


Member Data Documentation

template<int dim>
std::vector<unsigned char> internal::Triangulation::TriaLevel< dim >::refine_flags

RefinementCase<dim>::Type flags for the cells to be refined with or not (RefinementCase<dim>::no_refinement). The meaning what a cell is, is dimension specific, therefore also the length of this vector depends on the dimension: in one dimension, the length of this vector equals the length of the lines vector, in two dimensions that of the quads vector, etc.

template<int dim>
std::vector<bool> internal::Triangulation::TriaLevel< dim >::coarsen_flags

Same meaning as the one above, but specifies whether a cell must be coarsened.

template<int dim>
std::vector<std::pair<int,int> > internal::Triangulation::TriaLevel< dim >::neighbors

Levels and indices of the neighbors of the cells. Convention is, that the neighbors of the cell with index i are stored in the fields following $i*(2*real_space_dimension)$, e.g. in one spatial dimension, the neighbors of cell 0 are stored in neighbors[0] and neighbors[1], the neighbors of cell 1 are stored in neighbors[2] and neighbors[3], and so on.

In neighbors, neighbors[i].first is the level, while neighbors[i].first is the index of the neighbor.

If a neighbor does not exist (cell is at the boundary), level=index=-1 is set.

Conventions: The ith neighbor of a cell is the one which shares the ith face (Line in 2D, Quad in 3D) of this cell.

The neighbor of a cell has at most the same level as this cell, i.e. it may or may not be refined.

In one dimension, a neighbor may have any level less or equal the level of this cell. If it has the same level, it may be refined an arbitrary number of times, but the neighbor pointer still points to the cell on the same level, while the neighbors of the childs of the neighbor may point to this cell or its children.

In two and more dimensions, the neighbor is either on the same level and refined (in which case its children have neighbor pointers to this cell or its direct children), unrefined on the same level or one level down (in which case its neighbor pointer points to the mother cell of this cell).

template<int dim>
std::vector<unsigned int> internal::Triangulation::TriaLevel< dim >::subdomain_ids

One integer per cell to store which subdomain it belongs to. This field is most often used in parallel computations, where it denotes which processor shall work on the cells with a given subdomain number.

The object containing the data on lines and related functions


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

deal.II documentation generated on Sat Aug 15 16:52:39 2009 by doxygen 1.5.9