]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
derive SolverControl and VectorMemory from Subscriptor
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 3 May 1999 14:31:40 +0000 (14:31 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 3 May 1999 14:31:40 +0000 (14:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@1242 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/solver_control.h
deal.II/lac/include/lac/vector_memory.h

index 4dc8dc8b68ce5384299c34db2934d23f928efcbd..414c278e7efec473cb592ad55919e1b3d0bddda0 100644 (file)
@@ -5,6 +5,8 @@
 /*----------------------------   solver_control.h     ---------------------------*/
 
 
+#include <base/subscriptor.h>
+
 
 /**
  * Control class for iterative solvers.
@@ -22,7 +24,8 @@
  * #check()# can be replaced in derived classes to allow for more
  * sophisticated tests.
  */
-class SolverControl {
+class SolverControl : public Subscriptor
+{
   public:
                                     /**
                                      * Return states of the check
@@ -65,6 +68,13 @@ class SolverControl {
     SolverControl (const unsigned int n, const double tol,
                   const bool log_history = false);
     
+                                    /**
+                                     * Virtual destructor is needed
+                                     * as there are virtual functions
+                                     * in this class.
+                                     */
+    virtual ~SolverControl();
+    
                                     /**
                                      * Decide about success or failure
                                      * of an iteration.  This function
@@ -155,6 +165,13 @@ class ReductionControl : public SolverControl {
     ReductionControl (const unsigned int maxiter,
                      const double tolerance,
                      const double reduce);
+
+                                    /**
+                                     * Virtual destructor is needed
+                                     * as there are virtual functions
+                                     * in this class.
+                                     */
+    virtual ~ReductionControl();
     
                                     /**
                                      * Decide about success or failure
index 35f497cdc8ab4c06c42f0445fdaef2f14ee02bd2..7ccb5028153cbf2eec103848f47119b7d2c3ff57 100644 (file)
@@ -5,7 +5,7 @@
 /*----------------------------   vector_memory.h     ---------------------------*/
 
 
-
+#include <base/subscriptor.h>
 
 /**
  * Memory management for vectors. This class is used by all
  * applied by the user according to his needs.
  */
 template<class Vector>
-class VectorMemory {
+class VectorMemory : public Subscriptor
+{
   public:
+
+                                    /**
+                                     * Virtual destructor is needed
+                                     * as there are virtual functions
+                                     * in this class.
+                                     */
+    virtual ~VectorMemory() {};
+
                                     /**
                                      * Return new vector from the pool.
                                      */

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.