]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Derive Solver and Preconditioners from Subscriptor. Let PreconditionLACSolver use...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Aug 2001 11:10:49 +0000 (11:10 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Aug 2001 11:10:49 +0000 (11:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@4885 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/2001/c-3-1.html
deal.II/lac/include/lac/precondition.h
deal.II/lac/include/lac/solver.h

index e195ea91b1a881671c65ed429222fc3af7e14e63..2b4b10178f3121c9f1c2428ac71a24371343ab48 100644 (file)
@@ -331,6 +331,20 @@ documentation, etc</a>.
 <h3>lac</h3>
 
 <ol>
+  <li> <p>
+       Changed: Base class <code class="class">Solver</code> and all
+       <code class="class">Preconditioner</code> classes are now
+       derived from <code class="class">Subscriptor</code>.
+       Class <code class="class">PreconditionLACSolver</code> now uses
+       smartpointers to the given solver and preconditioner
+       objects. You will, therefore, have to derive your own
+       preconditioners and solvers from <code
+       class="class">Subscriptor</code> if you want to use it with
+       <code class="class">PreconditionLACSolver</code>.
+       <br>
+       (WB 2001/08/16)
+       </p>
+
   <li> <p>
        New: Classes <code class="class">Vector</code> and
        <code class="class">BlockVector</code> now have member functions
index a57c19ac6db35815b1dc8bd4959841a43a787e6b..919905cddb18ac1135ad435fff41245a22c349a2 100644 (file)
@@ -95,7 +95,7 @@ class PreconditionIdentity : public Subscriptor
  * @author Guido Kanschat, Wolfgang Bangerth, 1999
  */
 template<class MATRIX = SparseMatrix<double>, class VECTOR = Vector<double> >
-class PreconditionUseMatrix
+class PreconditionUseMatrix : public Subscriptor
 {
   public:
                                     /**
@@ -148,7 +148,7 @@ class PreconditionUseMatrix
  * @author Guido Kanschat, 2000
  */
 template<class MATRIX = SparseMatrix<double> >
-class PreconditionRelaxation
+class PreconditionRelaxation : public Subscriptor
 {
   public:
                                     /**
@@ -419,7 +419,7 @@ class PreconditionLACSolver : public Subscriptor
                                     /**
                                      * The solver object to use.
                                      */
-    SOLVER* solver;
+    SmartPointer<SOLVER> solver;
 
                                     /**
                                      * The matrix in use.
@@ -429,11 +429,9 @@ class PreconditionLACSolver : public Subscriptor
                                     /**
                                      * The preconditioner to use.
                                      */
-    const PRECONDITION* precondition;
+    SmartPointer<const PRECONDITION> precondition;
 };
 
-//TODO:[?] Use SmartPointer for SOLVER and PRECONDITION above?
-// Another Subscriptor?
 
 
 /**
index 1a8b33a7ee9b5f1d46b099ab793df951185722b1..0caecaf5a03daa95511eabd334f37c5f5b11ff71 100644 (file)
 #ifndef __deal2__solver_h
 #define __deal2__solver_h
 
-template<typename number> class Vector;
-template<class VECTOR>  class VectorMemory;
+#include <base/subscriptor.h>
+
+template <typename number> class Vector;
+template <class VECTOR>    class VectorMemory;
 class SolverControl;
 
 
@@ -133,7 +135,7 @@ class SolverControl;
  * @author Wolfgang Bangerth, Guido Kanschat, Ralf Hartmann, 1997-2001
  */
 template <class Vector = ::Vector<double> >
-class Solver
+class Solver : public Subscriptor
 {
   public:
                                     /**

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.