From: wolf Date: Thu, 16 Aug 2001 11:10:49 +0000 (+0000) Subject: Derive Solver and Preconditioners from Subscriptor. Let PreconditionLACSolver use... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0c1224422c2c4a9e09bdf8a65425591626f2e01;p=dealii-svn.git Derive Solver and Preconditioners from Subscriptor. Let PreconditionLACSolver use SmartPointers instead of C style pointers. git-svn-id: https://svn.dealii.org/trunk@4885 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/2001/c-3-1.html b/deal.II/doc/news/2001/c-3-1.html index e195ea91b1..2b4b10178f 100644 --- a/deal.II/doc/news/2001/c-3-1.html +++ b/deal.II/doc/news/2001/c-3-1.html @@ -331,6 +331,20 @@ documentation, etc.

lac

    +
  1. + Changed: Base class Solver and all + Preconditioner classes are now + derived from Subscriptor. + Class PreconditionLACSolver now uses + smartpointers to the given solver and preconditioner + objects. You will, therefore, have to derive your own + preconditioners and solvers from Subscriptor if you want to use it with + PreconditionLACSolver. +
    + (WB 2001/08/16) +

    +
  2. New: Classes Vector and BlockVector now have member functions diff --git a/deal.II/lac/include/lac/precondition.h b/deal.II/lac/include/lac/precondition.h index a57c19ac6d..919905cddb 100644 --- a/deal.II/lac/include/lac/precondition.h +++ b/deal.II/lac/include/lac/precondition.h @@ -95,7 +95,7 @@ class PreconditionIdentity : public Subscriptor * @author Guido Kanschat, Wolfgang Bangerth, 1999 */ template, class VECTOR = Vector > -class PreconditionUseMatrix +class PreconditionUseMatrix : public Subscriptor { public: /** @@ -148,7 +148,7 @@ class PreconditionUseMatrix * @author Guido Kanschat, 2000 */ template > -class PreconditionRelaxation +class PreconditionRelaxation : public Subscriptor { public: /** @@ -419,7 +419,7 @@ class PreconditionLACSolver : public Subscriptor /** * The solver object to use. */ - SOLVER* solver; + SmartPointer solver; /** * The matrix in use. @@ -429,11 +429,9 @@ class PreconditionLACSolver : public Subscriptor /** * The preconditioner to use. */ - const PRECONDITION* precondition; + SmartPointer precondition; }; -//TODO:[?] Use SmartPointer for SOLVER and PRECONDITION above? -// Another Subscriptor? /** diff --git a/deal.II/lac/include/lac/solver.h b/deal.II/lac/include/lac/solver.h index 1a8b33a7ee..0caecaf5a0 100644 --- a/deal.II/lac/include/lac/solver.h +++ b/deal.II/lac/include/lac/solver.h @@ -13,8 +13,10 @@ #ifndef __deal2__solver_h #define __deal2__solver_h -template class Vector; -template class VectorMemory; +#include + +template class Vector; +template class VectorMemory; class SolverControl; @@ -133,7 +135,7 @@ class SolverControl; * @author Wolfgang Bangerth, Guido Kanschat, Ralf Hartmann, 1997-2001 */ template > -class Solver +class Solver : public Subscriptor { public: /**