Reference documentation for deal.II version Git 283ce71 2014-12-19 22:22:25 +0100
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Attributes | List of all members
MGLevelObject< Object > Class Template Reference

#include <deal.II/base/mg_level_object.h>

Inheritance diagram for MGLevelObject< Object >:
[legend]

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 DEAL_II_DEPRECATED
 
unsigned int get_maxlevel () const DEAL_II_DEPRECATED
 
std::size_t memory_consumption () const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

unsigned int minlevel
 
std::vector
< std_cxx11::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, 2010

Definition at line 41 of file mg_level_object.h.

Constructor & Destructor Documentation

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

Definition at line 123 of file mg_level_object.h.

Member Function Documentation

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

Access object on level level.

Definition at line 134 of file mg_level_object.h.

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

Access object on level level. Constant version.

Definition at line 144 of file mg_level_object.h.

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

Definition at line 154 of file mg_level_object.h.

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

Definition at line 172 of file mg_level_object.h.

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

Definition at line 183 of file mg_level_object.h.

template<class Object >
unsigned int MGLevelObject< Object >::min_level ( ) const

Coarsest level for multigrid.

Definition at line 209 of file mg_level_object.h.

template<class Object >
unsigned int MGLevelObject< Object >::max_level ( ) const

Finest level for multigrid.

Definition at line 217 of file mg_level_object.h.

template<class Object >
unsigned int MGLevelObject< Object >::get_minlevel ( ) const
Deprecated:
Replaced by min_level()

Definition at line 193 of file mg_level_object.h.

template<class Object >
unsigned int MGLevelObject< Object >::get_maxlevel ( ) const
Deprecated:
Replaced by max_level()

Definition at line 201 of file mg_level_object.h.

template<class Object >
std::size_t MGLevelObject< Object >::memory_consumption ( ) const

Memory used by this object.

Definition at line 225 of file mg_level_object.h.

Member Data Documentation

template<class Object>
unsigned int MGLevelObject< Object >::minlevel
private

Level of first component.

Definition at line 110 of file mg_level_object.h.

template<class Object>
std::vector<std_cxx11::shared_ptr<Object> > MGLevelObject< Object >::objects
private

Array of the objects to be held.

Definition at line 115 of file mg_level_object.h.


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