*/
void block_read (std::istream &in);
- /**
- * Determine an estimate for the
- * memory consumption (in bytes)
- * of this object.
- */
- unsigned int memory_consumption () const;
-
- /** @addtogroup Exceptions
+ /** @addtogroup Exceptions
* @{ */
/**
#include <base/config.h>
-#include <base/memory_consumption.h>
#include <lac/block_vector.h>
#include <cmath>
#include <algorithm>
}
-template <typename Number>
-unsigned int
-BlockVector<Number>::memory_consumption () const
-{
- unsigned int mem = sizeof(this->n_blocks());
- for (unsigned int i=0; i<this->components.size(); ++i)
- mem += MemoryConsumption::memory_consumption (this->components[i]);
- mem += MemoryConsumption::memory_consumption (this->block_indices);
- return mem;
-}
-
-
DEAL_II_NAMESPACE_CLOSE
#include <base/config.h>
#include <base/exceptions.h>
#include <base/subscriptor.h>
+#include <base/memory_consumption.h>
#include <lac/exceptions.h>
#include <lac/block_indices.h>
-
#include <vector>
#include <iterator>
#include <cmath>
const value_type b, const BlockVectorBase& W);
/**
- * Estimate for the memory
- * consumption (not implemented
- * for this class).
+ * Determine an estimate for the
+ * memory consumption (in bytes)
+ * of this object.
*/
unsigned int memory_consumption () const;
template <class VectorType>
unsigned int BlockVectorBase<VectorType>::memory_consumption () const
{
- AssertThrow(false, ExcNotImplemented() );
- return 0;
+ unsigned int mem = sizeof(this->n_blocks());
+ for (unsigned int i=0; i<this->components.size(); ++i)
+ mem += MemoryConsumption::memory_consumption (this->components[i]);
+ mem += MemoryConsumption::memory_consumption (this->block_indices);
+ return mem;
}