
Public Member Functions | |
| MGLevelObject (const unsigned int minlevel=0, const unsigned int maxlevel=0) | |
| Object & | operator[] (const unsigned int level) |
| const Object & | operator[] (const unsigned int level) const |
| void | resize (const unsigned int new_minlevel, const unsigned int new_maxlevel) |
| MGLevelObject< Object > & | operator= (const double d) |
| void | clear () |
| unsigned int | min_level () const |
| unsigned int | max_level () const |
| unsigned int | get_minlevel () const |
| unsigned int | get_maxlevel () const |
| unsigned int | memory_consumption () const |
Private Attributes | |
| unsigned int | minlevel |
| std::vector < std_cxx1x::shared_ptr < Object > > | objects |
An array with an object for each level. The purpose of this class is mostly to store objects and allow access by level number, even if the lower levels are not used and therefore have no object at all; this is done by simply shifting the given index by the minimum level we have stored.
In most cases, the objects which are stored on each levels, are either matrices or vectors.
| MGLevelObject< Object >::MGLevelObject | ( | const unsigned int | minlevel = 0, |
| const unsigned int | maxlevel = 0 |
||
| ) |
Constructor allowing to initialize the number of levels. By default, the object is created empty.
References MGLevelObject< Object >::resize().
| Object & MGLevelObject< Object >::operator[] | ( | const unsigned int | level | ) |
Access object on level level.
References Assert, and StandardExceptions::ExcIndexRange().
| const Object & MGLevelObject< Object >::operator[] | ( | const unsigned int | level | ) | const |
Access object on level level. Constant version.
References Assert, and StandardExceptions::ExcIndexRange().
| void MGLevelObject< Object >::resize | ( | const unsigned int | new_minlevel, |
| const unsigned int | new_maxlevel | ||
| ) |
Delete all previous contents of this object and reset its size according to the values of new_minlevel and new_maxlevel.
References Assert, and StandardExceptions::ExcInternalError().
Referenced by MGLevelObject< Object >::MGLevelObject(), MGMatrixBlockVector< MATRIX >::reinit_edge(), MGMatrixBlockVector< MATRIX >::reinit_edge_flux(), and MGMatrixBlockVector< MATRIX >::reinit_matrix().
| MGLevelObject< Object > & MGLevelObject< Object >::operator= | ( | const double | d | ) |
Call operator = (s) on all objects stored by this object. This is particularly useful for e.g. Object==Vector<T>
| void MGLevelObject< Object >::clear | ( | ) |
Call clear on all objects stored by this object. This function is only implemented for some Object classes, e.g. the PreconditionBlockSOR and similar classes.
| unsigned int MGLevelObject< Object >::min_level | ( | ) | const |
Coarsest level for multigrid.
Referenced by MGMatrixBlockVector< MATRIX >::clear_object(), mg::Matrix< VECTOR >::initialize(), MeshWorker::LocalResults< number >::initialize_matrices(), MGMatrixBlockVector< MATRIX >::reinit_edge(), MGMatrixBlockVector< MATRIX >::reinit_edge_flux(), and MGMatrixBlockVector< MATRIX >::reinit_matrix().
| unsigned int MGLevelObject< Object >::max_level | ( | ) | const |
Finest level for multigrid.
Referenced by MGMatrixBlockVector< MATRIX >::clear_object(), mg::Matrix< VECTOR >::initialize(), MGMatrixBlockVector< MATRIX >::reinit_edge(), MGMatrixBlockVector< MATRIX >::reinit_edge_flux(), and MGMatrixBlockVector< MATRIX >::reinit_matrix().
| unsigned int MGLevelObject< Object >::get_minlevel | ( | ) | const |
| unsigned int MGLevelObject< Object >::get_maxlevel | ( | ) | const |
| unsigned int MGLevelObject< Object >::memory_consumption | ( | ) | const |
Memory used by this object.
unsigned int MGLevelObject< Object >::minlevel [private] |
Level of first component.
std::vector<std_cxx1x::shared_ptr<Object> > MGLevelObject< Object >::objects [private] |
Array of the objects to be held.
documentation generated on Fri Aug 12 2011 15:01:05 by
doxygen
1.7.4