*/
const Quadrature<dim-1> & get_quadrature () const;
+ /**
+ * Determine an estimate for the
+ * memory consumption (in bytes)
+ * of this object.
+ */
+ unsigned int memory_consumption () const;
+
protected:
/**
* Store a copy of the quadrature
};
+
/**
* Finite element evaluated in quadrature points on a face.
*
* cell-independent fields.
*/
bool first_cell;
+
+ /**
+ * Return an estimate (in
+ * bytes) or the memory
+ * consumption of this
+ * object.
+ */
+ virtual unsigned int memory_consumption () const;
};
/**
*/
InternalData (const Quadrature<dim> &quadrature);
+ /**
+ * Return an estimate (in
+ * bytes) or the memory
+ * consumption of this
+ * object.
+ */
+ virtual unsigned int memory_consumption () const;
+
/**
* Length of the cell in
* different coordinate
*/
InternalData (const unsigned int n_shape_functions);
+
+ /**
+ * Return an estimate (in
+ * bytes) or the memory
+ * consumption of this
+ * object.
+ */
+ virtual unsigned int memory_consumption () const;
+
/**
* Unit normal vectors. Used
* for the alternative
*/
Tensor<1,dim> &derivative (const unsigned int qpoint,
const unsigned int shape_nr);
+
+ /**
+ * Return an estimate (in
+ * bytes) or the memory
+ * consumption of this
+ * object.
+ */
+ virtual unsigned int memory_consumption () const;
/**
* Values of shape
unsigned int
FEValuesBase<dim>::memory_consumption () const
{
-//TODO:[WB] check whether this is up to date
return (MemoryConsumption::memory_consumption (shape_values) +
MemoryConsumption::memory_consumption (shape_gradients) +
MemoryConsumption::memory_consumption (shape_2nd_derivatives) +
MemoryConsumption::memory_consumption (JxW_values) +
MemoryConsumption::memory_consumption (quadrature_points) +
+ MemoryConsumption::memory_consumption (normal_vectors) +
+ MemoryConsumption::memory_consumption (boundary_forms) +
sizeof(update_flags) +
MemoryConsumption::memory_consumption (present_cell) +
- MemoryConsumption::memory_consumption (fe));
+ MemoryConsumption::memory_consumption (n_quadrature_points) +
+ MemoryConsumption::memory_consumption (dofs_per_cell) +
+ MemoryConsumption::memory_consumption (mapping) +
+ MemoryConsumption::memory_consumption (fe) +
+ MemoryConsumption::memory_consumption (mapping_data) +
+ MemoryConsumption::memory_consumption (*mapping_data) +
+ MemoryConsumption::memory_consumption (fe_data) +
+ MemoryConsumption::memory_consumption (*fe_data));
};
unsigned int
FEValues<dim>::memory_consumption () const
{
-//TODO:[WB] check whether this is up to date
- return FEValuesBase<dim>::memory_consumption ();
+ return (FEValuesBase<dim>::memory_consumption () +
+ MemoryConsumption::memory_consumption (quadrature));
};
};
+
+template <int dim>
+unsigned int
+FEFaceValuesBase<dim>::memory_consumption () const
+{
+ return (FEValuesBase<dim>::memory_consumption () +
+ MemoryConsumption::memory_consumption (quadrature) +
+ MemoryConsumption::memory_consumption (present_face));
+};
+
+
/*------------------------------- FEFaceValues -------------------------------*/
{}
+
+template <int dim>
+unsigned int
+Mapping<dim>::InternalDataBase::memory_consumption () const
+{
+ return sizeof(*this);
+}
+
+
/*------------------------------ InternalData ------------------------------*/
+template <int dim>
+unsigned int
+MappingCartesian<dim>::InternalData::memory_consumption () const
+{
+ return (Mapping<dim>::InternalDataBase::memory_consumption() +
+ MemoryConsumption::memory_consumption (length) +
+ MemoryConsumption::memory_consumption (quadrature_points) +
+ MemoryConsumption::memory_consumption (unit_tangentials) +
+ MemoryConsumption::memory_consumption (aux));
+};
+
+
+
+
template <int dim>
UpdateFlags
MappingCartesian<dim>::update_once (const UpdateFlags) const
#include <fe/fe_q.h>
#include <base/quadrature.h>
#include <base/quadrature_lib.h>
+#include <base/memory_consumption.h>
#include <base/tensor_product_polynomials.h>
#include <lac/full_matrix.h>
#include <grid/tria_iterator.h>
}
+
+template<int dim>
+unsigned int
+MappingQ<dim>::InternalData::memory_consumption () const
+{
+ return (MappingQ1<dim>::InternalData::memory_consumption () +
+ MemoryConsumption::memory_consumption (unit_normals) +
+ MemoryConsumption::memory_consumption (use_mapping_q1_on_current_cell) +
+ MemoryConsumption::memory_consumption (mapping_q1_data));
+};
+
+
+
#if deal_II_dimension == 1
// in 1d, it is irrelevant which polynomial degree to use, since all
#include <base/tensor.h>
#include <base/quadrature.h>
+#include <base/memory_consumption.h>
#include <lac/full_matrix.h>
#include <grid/tria.h>
#include <grid/tria_iterator.h>
+template <int dim>
+unsigned int
+MappingQ1<dim>::InternalData::memory_consumption () const
+{
+ return (Mapping<dim>::InternalDataBase::memory_consumption() +
+ MemoryConsumption::memory_consumption (shape_values) +
+ MemoryConsumption::memory_consumption (shape_derivatives) +
+ MemoryConsumption::memory_consumption (covariant) +
+ MemoryConsumption::memory_consumption (contravariant) +
+ MemoryConsumption::memory_consumption (unit_tangentials) +
+ MemoryConsumption::memory_consumption (aux) +
+ MemoryConsumption::memory_consumption (mapping_support_points) +
+ MemoryConsumption::memory_consumption (cell_of_current_support_points) +
+ MemoryConsumption::memory_consumption (is_mapping_q1_data) +
+ MemoryConsumption::memory_consumption (n_shape_functions));
+};
+
+
+
template <int dim>
MappingQ1<dim>::MappingQ1 ()
{};