]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Undo the last patch: we don't need anything to be mutable here at all since we don...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Sep 2007 15:14:05 +0000 (15:14 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Sep 2007 15:14:05 +0000 (15:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@15248 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/matrix_lib.h
deal.II/lac/include/lac/matrix_lib.templates.h

index cbc5237c648de82fd3414b7ed4266a90e708c1b8..a06883415cfff9d711a8bc7c3f14045837351470 100644 (file)
@@ -411,14 +411,10 @@ class InverseMatrixRichardson : public Subscriptor
 
   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.
@@ -610,8 +606,7 @@ MeanValueFilter::Tvmult_add(VECTOR&, const VECTOR&) const
 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;
index 4be1f4e624c5e48a8ba4568bb9bb957d31716aae..5eecf2bdd418ffe290bd7452ab88a469b6f03c91 100644 (file)
@@ -2,7 +2,7 @@
 //    $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
@@ -126,7 +126,7 @@ InverseMatrixRichardson<VECTOR>::InverseMatrixRichardson(
   SolverControl& c,
   VectorMemory<VECTOR>& m)
                :
-               mem(&m),
+               mem(m),
                solver(c,m),
                matrix(0),
                precondition(0)
@@ -164,7 +164,7 @@ InverseMatrixRichardson<VECTOR>::vmult_add(VECTOR& dst, const VECTOR& src) const
 {
   Assert (matrix != 0, ExcNotInitialized());
   Assert (precondition != 0, ExcNotInitialized());
-  VECTOR* aux = mem->alloc();
+  VECTOR* aux = mem.alloc();
   aux->reinit(dst);
   try
     {
@@ -173,7 +173,7 @@ InverseMatrixRichardson<VECTOR>::vmult_add(VECTOR& dst, const VECTOR& src) const
   catch(...)
     {}  
   dst += *aux;
-  mem->free(aux);
+  mem.free(aux);
 }
 
 
@@ -201,7 +201,7 @@ InverseMatrixRichardson<VECTOR>::Tvmult_add(VECTOR& dst, const VECTOR& src) cons
 {
   Assert (matrix != 0, ExcNotInitialized());
   Assert (precondition != 0, ExcNotInitialized());
-  VECTOR* aux = mem->alloc();
+  VECTOR* aux = mem.alloc();
   aux->reinit(dst);
   try
     {
@@ -210,7 +210,7 @@ InverseMatrixRichardson<VECTOR>::Tvmult_add(VECTOR& dst, const VECTOR& src) cons
   catch(...)
     {}  
   dst += *aux;
-  mem->free(aux);
+  mem.free(aux);
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.