*/
unsigned int base_element(unsigned int i) const;
+ /**
+ * Determine an estimate for the
+ * memory consumption (in bytes)
+ * of this object.
+ */
+ unsigned int memory_consumption () const;
+
private:
/**
* @brief The block structure
//---------------------------------------------------------------------------
+#include <base/memory_consumption.h>
#include <dofs/block_info.h>
#include <dofs/dof_handler.h>
#include <dofs/dof_tools.h>
}
+unsigned int
+BlockInfo::memory_consumption () const
+{
+ unsigned int mem = (MemoryConsumption::memory_consumption (bi_global) +
+ MemoryConsumption::memory_consumption (levels) +
+ MemoryConsumption::memory_consumption (bi_local) +
+ MemoryConsumption::memory_consumption (base_elements)
+ );
+
+ return mem;
+}
+
+
+
template void BlockInfo::initialize(const DoFHandler<deal_II_dimension,deal_II_dimension>&);
template void BlockInfo::initialize(const MGDoFHandler<deal_II_dimension,deal_II_dimension>&, bool);
template void BlockInfo::initialize_local(const DoFHandler<deal_II_dimension,deal_II_dimension>&);
{
unsigned int mem = (MemoryConsumption::memory_consumption (tria) +
MemoryConsumption::memory_consumption (selected_fe) +
- MemoryConsumption::memory_consumption (tria) +
+ MemoryConsumption::memory_consumption (block_info_object) +
MemoryConsumption::memory_consumption (levels) +
MemoryConsumption::memory_consumption (*faces) +
+ MemoryConsumption::memory_consumption (faces) +
MemoryConsumption::memory_consumption (used_dofs) +
MemoryConsumption::memory_consumption (vertex_dofs));
for (unsigned int i=0; i<levels.size(); ++i)
mem += MemoryConsumption::memory_consumption (*levels[i]);
- mem += MemoryConsumption::memory_consumption (*faces);
return mem;
}