Reference documentation for deal.II version 9.1.0-pre
Public Member Functions | Public Attributes | List of all members
internal::TriangulationImplementation::NumberCache< 3 > Struct Template Reference

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

Inheritance diagram for internal::TriangulationImplementation::NumberCache< 3 >:
[legend]

Public Member Functions

 NumberCache ()
 
std::size_t memory_consumption () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from internal::TriangulationImplementation::NumberCache< 2 >
 NumberCache ()
 
std::size_t memory_consumption () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from internal::TriangulationImplementation::NumberCache< 1 >
 NumberCache ()
 
std::size_t memory_consumption () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Public Attributes

unsigned int n_hexes
 
std::vector< unsigned int > n_hexes_level
 
unsigned int n_active_hexes
 
std::vector< unsigned int > n_active_hexes_level
 
- Public Attributes inherited from internal::TriangulationImplementation::NumberCache< 2 >
unsigned int n_quads
 
std::vector< unsigned int > n_quads_level
 
unsigned int n_active_quads
 
std::vector< unsigned int > n_active_quads_level
 
- Public Attributes inherited from internal::TriangulationImplementation::NumberCache< 1 >
unsigned int n_levels
 
unsigned int n_lines
 
std::vector< unsigned int > n_lines_level
 
unsigned int n_active_lines
 
std::vector< unsigned int > n_active_lines_level
 

Detailed Description

template<>
struct internal::TriangulationImplementation::NumberCache< 3 >

Cache class used to store the number of used and active elements (lines or quads etc) within the levels of a triangulation. This specialization stores the numbers of hexes. Due to the inheritance from the base class NumberCache<2>, the numbers of lines and quads are also within this class.

In the old days, whenever one wanted to access one of these numbers, one had to perform a loop over all lines, e.g., and count the elements until we hit the end . This is time consuming and since access to the number of lines etc is a rather frequent operation, this was not an optimal solution.

Author
Wolfgang Bangerth, 1999

Definition at line 447 of file tria.h.

Constructor & Destructor Documentation

Constructor. Set values to zero by default.

Definition at line 107 of file tria.cc.

Member Function Documentation

std::size_t internal::TriangulationImplementation::NumberCache< 3 >::memory_consumption ( ) const

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

Definition at line 117 of file tria.cc.

template<class Archive >
void internal::TriangulationImplementation::NumberCache< 3 >::serialize ( Archive &  ar,
const unsigned int  version 
)

Read or write the data of this object to or from a stream for the purpose of serialization

Member Data Documentation

Number of used hexes in the whole triangulation.

Definition at line 452 of file tria.h.

std::vector<unsigned int> internal::TriangulationImplementation::NumberCache< 3 >::n_hexes_level

Array holding the number of used hexes on each level.

Definition at line 457 of file tria.h.

unsigned int internal::TriangulationImplementation::NumberCache< 3 >::n_active_hexes

Number of active hexes in the whole triangulation.

Definition at line 462 of file tria.h.

std::vector<unsigned int> internal::TriangulationImplementation::NumberCache< 3 >::n_active_hexes_level

Array holding the number of active hexes on each level.

Definition at line 467 of file tria.h.


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