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 | 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 |
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 | |||
) | [inline] |
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 | ) | [inline] |
Access object on level level
.
References Assert, MGLevelObject< Object >::minlevel, and MGLevelObject< Object >::objects.
const Object & MGLevelObject< Object >::operator[] | ( | const unsigned int | level | ) | const [inline] |
Access object on level level
. Constant version.
References Assert, MGLevelObject< Object >::minlevel, and MGLevelObject< Object >::objects.
void MGLevelObject< Object >::resize | ( | const unsigned int | new_minlevel, | |
const unsigned int | new_maxlevel | |||
) | [inline] |
Delete all previous contents of this object and reset its size according to the values of new_minlevel
and new_maxlevel
.
References Assert, MGLevelObject< Object >::minlevel, and MGLevelObject< Object >::objects.
Referenced by MGLevelObject< Object >::MGLevelObject().
MGLevelObject< Object > & MGLevelObject< Object >::operator= | ( | const double | d | ) | [inline] |
Call operator = (s)
on all objects stored by this object. This is particularly useful for e.g. Object==Vector<T>
References MGLevelObject< Object >::objects.
void MGLevelObject< Object >::clear | ( | ) | [inline] |
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.
References MGLevelObject< Object >::objects.
unsigned int MGLevelObject< Object >::get_minlevel | ( | ) | const [inline] |
Coarsest level for multigrid.
References MGLevelObject< Object >::minlevel.
unsigned int MGLevelObject< Object >::get_maxlevel | ( | ) | const [inline] |
Ignored
References MGLevelObject< Object >::minlevel, and MGLevelObject< Object >::objects.
unsigned int MGLevelObject< Object >::memory_consumption | ( | ) | const [inline] |
Memory used by this object.
References MGLevelObject< Object >::objects.
unsigned int MGLevelObject< Object >::minlevel [private] |
Level of first component.
Referenced by MGLevelObject< Object >::get_maxlevel(), MGLevelObject< Object >::get_minlevel(), MGLevelObject< Object >::operator[](), and MGLevelObject< Object >::resize().
std::vector<std_cxx1x::shared_ptr<Object> > MGLevelObject< Object >::objects [private] |
Array of the objects to be held.
Referenced by MGLevelObject< Object >::clear(), MGLevelObject< Object >::get_maxlevel(), MGLevelObject< Object >::memory_consumption(), MGLevelObject< Object >::operator=(), MGLevelObject< Object >::operator[](), and MGLevelObject< Object >::resize().