17 #ifndef __deal2__mg_level_object_h 18 #define __deal2__mg_level_object_h 20 #include <deal.II/base/subscriptor.h> 23 #include <deal.II/base/std_cxx1x/shared_ptr.h> 42 template<
class Object>
53 const unsigned int maxlevel = 0);
64 const Object &
operator[] (
const unsigned int level)
const;
73 void resize (
const unsigned int new_minlevel,
74 const unsigned int new_maxlevel);
136 template<class Object>
138 const
unsigned int max)
146 template<
class Object>
156 template<
class Object>
166 template<
class Object>
169 const unsigned int new_maxlevel)
179 for (
unsigned int i=0; i<new_maxlevel-new_minlevel+1; ++i)
180 objects.push_back(std_cxx1x::shared_ptr<Object> (
new Object));
184 template<
class Object>
188 typename std::vector<std_cxx1x::shared_ptr<Object> >::iterator v;
195 template<
class Object>
199 typename std::vector<std_cxx1x::shared_ptr<Object> >::iterator v;
205 template<
class Object>
213 template<
class Object>
221 template<
class Object>
229 template<
class Object>
237 template<
class Object>
241 std::size_t result =
sizeof(*this);
242 typedef typename std::vector<std_cxx1x::shared_ptr<Object> >::const_iterator Iter;
243 const Iter end =
objects.end();
244 for (Iter o=
objects.begin(); o!=end; ++o)
245 result += (*o)->memory_consumption();
250 DEAL_II_NAMESPACE_CLOSE
Object & operator[](const unsigned int level)
std::vector< std_cxx1x::shared_ptr< Object > > objects
MGLevelObject(const unsigned int minlevel=0, const unsigned int maxlevel=0)
std::size_t memory_consumption() const
#define Assert(cond, exc)
unsigned int max_level() const
::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
MGLevelObject< Object > & operator=(const double d)
unsigned int min_level() const
unsigned int get_minlevel() const DEAL_II_DEPRECATED
void resize(const unsigned int new_minlevel, const unsigned int new_maxlevel)
unsigned int get_maxlevel() const DEAL_II_DEPRECATED
::ExceptionBase & ExcInternalError()