private:
/**
- * Access to the provided
+ * A reference to the provided
* VectorMemory object.
- *
- * Declared as a pointer instead of a
- * reference because C++ doesn't allow
- * mutable references.
*/
- mutable VectorMemory<VECTOR> *mem;
+ VectorMemory<VECTOR> &mem;
/**
* The solver object.
template <class VECTOR>
template <class MATRIX, class PRECONDITION>
inline void
-InverseMatrixRichardson<VECTOR>::
-initialize (const MATRIX& m, const PRECONDITION& p)
+InverseMatrixRichardson<VECTOR>::initialize (const MATRIX& m, const PRECONDITION& p)
{
if (matrix != 0)
delete matrix;
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2005, 2006, 2007 by the deal.II authors
+// Copyright (C) 2002, 2003, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
SolverControl& c,
VectorMemory<VECTOR>& m)
:
- mem(&m),
+ mem(m),
solver(c,m),
matrix(0),
precondition(0)
{
Assert (matrix != 0, ExcNotInitialized());
Assert (precondition != 0, ExcNotInitialized());
- VECTOR* aux = mem->alloc();
+ VECTOR* aux = mem.alloc();
aux->reinit(dst);
try
{
catch(...)
{}
dst += *aux;
- mem->free(aux);
+ mem.free(aux);
}
{
Assert (matrix != 0, ExcNotInitialized());
Assert (precondition != 0, ExcNotInitialized());
- VECTOR* aux = mem->alloc();
+ VECTOR* aux = mem.alloc();
aux->reinit(dst);
try
{
catch(...)
{}
dst += *aux;
- mem->free(aux);
+ mem.free(aux);
}