Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | Public Attributes | List of all members
internal::TriangulationImplementation::NumberCache< 2 > Struct Reference

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

Inheritance diagram for internal::TriangulationImplementation::NumberCache< 2 >:
[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< 1 >
 NumberCache ()
 
std::size_t memory_consumption () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Public Attributes

unsigned int n_quads
 
std::vector< unsigned intn_quads_level
 
unsigned int n_active_quads
 
std::vector< unsigned intn_active_quads_level
 
- Public Attributes inherited from internal::TriangulationImplementation::NumberCache< 1 >
unsigned int n_levels
 
unsigned int n_lines
 
std::vector< unsigned intn_lines_level
 
unsigned int n_active_lines
 
std::vector< unsigned intn_active_lines_level
 

Detailed Description

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 quads. Due to the inheritance from the base class NumberCache<1>, the numbers of lines 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 iterator. 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 217 of file tria.h.

Constructor & Destructor Documentation

◆ NumberCache()

Constructor. Set values to zero by default.

Definition at line 120 of file tria.cc.

Member Function Documentation

◆ memory_consumption()

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

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

Definition at line 130 of file tria.cc.

◆ serialize()

template<class Archive >
void internal::TriangulationImplementation::NumberCache< 2 >::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

◆ n_quads

Number of used quads in the whole triangulation.

Definition at line 222 of file tria.h.

◆ n_quads_level

std::vector<unsigned int> internal::TriangulationImplementation::NumberCache< 2 >::n_quads_level

Array holding the number of used quads on each level.

Definition at line 227 of file tria.h.

◆ n_active_quads

Number of active quads in the whole triangulation.

Definition at line 232 of file tria.h.

◆ n_active_quads_level

std::vector<unsigned int> internal::TriangulationImplementation::NumberCache< 2 >::n_active_quads_level

Array holding the number of active quads on each level.

Definition at line 237 of file tria.h.


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