16 #ifndef dealii_mg_level_object_h 17 #define dealii_mg_level_object_h 48 template <
class Object>
73 template <
class... Args>
75 const unsigned int maxlevel,
83 const unsigned int maxlevel = 0);
96 const Object &
operator[](
const unsigned int level)
const;
111 template <
class... Args>
113 resize(
const unsigned int new_minlevel,
114 const unsigned int new_maxlevel,
159 template <
typename ActionFunctionObjectType>
161 apply(ActionFunctionObjectType action);
185 template <
class Object>
186 template <
class... Args>
188 const unsigned int max,
192 resize(min, max, std::forward<Args>(args)...);
196 template <
class Object>
198 const unsigned int max)
205 template <
class Object>
214 template <
class Object>
223 template <
class Object>
224 template <
class... Args>
227 const unsigned int new_maxlevel,
238 for (
unsigned int i = 0; i < new_maxlevel - new_minlevel + 1; ++i)
239 objects.push_back(std::make_shared<Object>(std::forward<Args>(args)...));
243 template <
class Object>
247 typename std::vector<std::shared_ptr<Object>>::iterator v;
254 template <
class Object>
258 typename std::vector<std::shared_ptr<Object>>::iterator v;
264 template <
class Object>
272 template <
class Object>
279 template <
class Object>
280 template <
typename ActionFunctionObjectType>
286 action(lvl, (*
this)[lvl]);
291 template <
class Object>
295 std::size_t result =
sizeof(*this);
296 using Iter =
typename std::vector<std::shared_ptr<Object>>::const_iterator;
299 result += (*o)->memory_consumption();
unsigned int max_level() const
Object & operator[](const unsigned int level)
std::vector< std::shared_ptr< Object > > objects
void resize(const unsigned int new_minlevel, const unsigned int new_maxlevel, Args &&... args)
void apply(ActionFunctionObjectType action)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
std::size_t memory_consumption() const
unsigned int min_level() const
#define Assert(cond, exc)
#define DEAL_II_NAMESPACE_CLOSE
VectorType::value_type * end(VectorType &V)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
MGLevelObject< Object > & operator=(const double d)
#define DEAL_II_NAMESPACE_OPEN
T min(const T &t, const MPI_Comm &mpi_communicator)
MGLevelObject(const unsigned int minlevel, const unsigned int maxlevel, Args &&... args)
T max(const T &t, const MPI_Comm &mpi_communicator)
static ::ExceptionBase & ExcInternalError()