// ---------------------------------------------------------------------
//
-// Copyright (C) 1999 - 2013 by the deal.II authors
+// Copyright (C) 1999 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
*/
void set_debug (const unsigned int level);
-private:
+protected:
/**
- * The memory object to be used if none is given to the constructor.
+ * A memory object to be used for temporary vectors.
+ *
+ * The object is marked as mutable since we will need to use it
+ * to allocate temporary vectors also in functions that are
+ * const.
*/
- GrowingVectorMemory<VECTOR> my_memory;
+ mutable GrowingVectorMemory<VECTOR> vector_memory;
-protected:
/**
* Number of smoothing steps on the finest level. If no #variable smoothing
* is chosen, this is the number of steps on all levels.
* Output debugging information to @p deallog if this is nonzero.
*/
unsigned int debug;
-
- /**
- * Memory for auxiliary vectors.
- */
- SmartPointer<VectorMemory<VECTOR>, MGSmoother<VECTOR> > mem;
};
variable(variable),
symmetric(symmetric),
transpose(transpose),
- debug(0),
- mem(&my_memory)
+ debug(0)
{}
return sizeof(*this)
-sizeof(MGLevelObject<RELAX>)
+ MGLevelObject<RELAX>::memory_consumption()
- + this->mem->memory_consumption();
+ + this->vector_memory.memory_consumption();
}
}
return sizeof(*this)
+ matrices.memory_consumption()
+ smoothers.memory_consumption()
- + this->mem->memory_consumption();
+ + this->vector_memory.memory_consumption();
}
if (this->variable)
steps2 *= (1<<(maxlevel-level));
- typename VectorMemory<VECTOR>::Pointer r(*this->mem);
- typename VectorMemory<VECTOR>::Pointer d(*this->mem);
+ typename VectorMemory<VECTOR>::Pointer r(this->vector_memory);
+ typename VectorMemory<VECTOR>::Pointer d(this->vector_memory);
r->reinit(u,true);
d->reinit(u,true);
return sizeof(*this)
+ matrices.memory_consumption()
+ smoothers.memory_consumption()
- + this->mem->memory_consumption();
+ + this->vector_memory.memory_consumption();
}