MGLevelObject< Object > Class Template Reference
[Multilevel support]

Inheritance diagram for MGLevelObject< Object >:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

template<class Object>
class MGLevelObject< Object >

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.

Author:
Wolfgang Bangerth, Guido Kanschat, 1999, 2005

Constructor & Destructor Documentation

template<class Object >
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().


Member Function Documentation

template<class Object >
Object & MGLevelObject< Object >::operator[] ( const unsigned int  level  )  [inline]

Access object on level level.

References Assert, MGLevelObject< Object >::minlevel, and MGLevelObject< Object >::objects.

template<class Object >
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.

template<class Object >
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().

template<class Object >
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.

template<class Object >
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.

template<class Object >
unsigned int MGLevelObject< Object >::get_minlevel (  )  const [inline]

Coarsest level for multigrid.

References MGLevelObject< Object >::minlevel.

template<class Object >
unsigned int MGLevelObject< Object >::get_maxlevel (  )  const [inline]
template<class Object >
unsigned int MGLevelObject< Object >::memory_consumption (  )  const [inline]

Memory used by this object.

References MGLevelObject< Object >::objects.


Member Data Documentation

template<class Object>
unsigned int MGLevelObject< Object >::minlevel [private]
template<class Object>
std::vector<std_cxx1x::shared_ptr<Object> > MGLevelObject< Object >::objects [private]

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

deal.II documentation generated on Mon Nov 23 22:57:56 2009 by doxygen 1.6.1