From: hartmann Date: Mon, 3 May 1999 14:31:40 +0000 (+0000) Subject: derive SolverControl and VectorMemory from Subscriptor X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f46bc76ac9ec1aa50f365b9ec7907affe79fe31;p=dealii-svn.git derive SolverControl and VectorMemory from Subscriptor git-svn-id: https://svn.dealii.org/trunk@1242 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/solver_control.h b/deal.II/lac/include/lac/solver_control.h index 4dc8dc8b68..414c278e7e 100644 --- a/deal.II/lac/include/lac/solver_control.h +++ b/deal.II/lac/include/lac/solver_control.h @@ -5,6 +5,8 @@ /*---------------------------- solver_control.h ---------------------------*/ +#include + /** * 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 diff --git a/deal.II/lac/include/lac/vector_memory.h b/deal.II/lac/include/lac/vector_memory.h index 35f497cdc8..7ccb502815 100644 --- a/deal.II/lac/include/lac/vector_memory.h +++ b/deal.II/lac/include/lac/vector_memory.h @@ -5,7 +5,7 @@ /*---------------------------- vector_memory.h ---------------------------*/ - +#include /** * Memory management for vectors. This class is used by all @@ -20,8 +20,17 @@ * applied by the user according to his needs. */ template -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. */