]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename Solver class to SolverBase. 7864/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Wed, 27 Mar 2019 11:45:33 +0000 (12:45 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 28 Mar 2019 05:49:29 +0000 (06:49 +0100)
This aligns with the name chosen for the equivalent class in the
TrilinosWrappers and PetscWrappers namespaces.

12 files changed:
include/deal.II/lac/eigen.h
include/deal.II/lac/solver.h
include/deal.II/lac/solver_bicgstab.h
include/deal.II/lac/solver_cg.h
include/deal.II/lac/solver_fire.h
include/deal.II/lac/solver_gmres.h
include/deal.II/lac/solver_minres.h
include/deal.II/lac/solver_qmrs.h
include/deal.II/lac/solver_relaxation.h
include/deal.II/lac/solver_richardson.h
include/deal.II/optimization/solver_bfgs.h
source/lac/solver.inst.in

index ec1bc54888ae6362d8d7ace75b1c350de4a03c06..7a70296d36a9463b0d257057feb4f53a9be2a36e 100644 (file)
@@ -52,7 +52,7 @@ DEAL_II_NAMESPACE_OPEN
  * @author Guido Kanschat, 2000
  */
 template <typename VectorType = Vector<double>>
-class EigenPower : private Solver<VectorType>
+class EigenPower : private SolverBase<VectorType>
 {
 public:
   /**
@@ -131,7 +131,7 @@ protected:
  * @author Guido Kanschat, 2000, 2003
  */
 template <typename VectorType = Vector<double>>
-class EigenInverse : private Solver<VectorType>
+class EigenInverse : private SolverBase<VectorType>
 {
 public:
   /**
@@ -208,7 +208,7 @@ template <class VectorType>
 EigenPower<VectorType>::EigenPower(SolverControl &           cn,
                                    VectorMemory<VectorType> &mem,
                                    const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
 {}
 
@@ -297,7 +297,7 @@ template <class VectorType>
 EigenInverse<VectorType>::EigenInverse(SolverControl &           cn,
                                        VectorMemory<VectorType> &mem,
                                        const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
 {}
 
index a62ffbabbfe4b4be8c6922e971a98023e4e1c587..c26686af8e65920531e7399f88388d2fb37ef677 100644 (file)
@@ -129,7 +129,7 @@ class Vector;
  * deal.II library for the built-in vector types, but must be explicitly added
  * for user-provided vector classes. Otherwise, the linker will complain that
  * it cannot find the constructors and destructors of GrowingVectorMemory that
- * happen in the @p Solver class.
+ * happen in the @p SolverBase class.
  *
  * @code
  * // Definition and implementation of vector class
@@ -185,7 +185,7 @@ class Vector;
  *
  * <h3>Observing the progress of linear solver iterations</h3>
  *
- * The Solver class, being the base class for all of the iterative solvers
+ * The SolverBase class, being the base class for all of the iterative solvers
  * such as SolverCG, SolverGMRES, etc, provides the facilities by which actual
  * solver implementations determine whether the iteration is converged, not
  * yet converged, or has failed. Typically, this is done using an object of
@@ -234,7 +234,7 @@ class Vector;
  * into this scheme: when a SolverControl object is passed to the constructor
  * of the current class, we simply connect the SolverControl::check() function
  * of that object as a slot to the signal we maintain here. In other words,
- * since a Solver object is always constructed using a SolverControl object,
+ * since a SolverBase object is always constructed using a SolverControl object,
  * there is always at least one slot associated with the signal, namely the
  * one that determines convergence.
  *
@@ -325,7 +325,7 @@ class Vector;
  * 2014
  */
 template <class VectorType = Vector<double>>
-class Solver : public Subscriptor
+class SolverBase : public Subscriptor
 {
 public:
   /**
@@ -342,8 +342,8 @@ public:
    * responsibility to guarantee that the lifetime of the two arguments is at
    * least as long as that of the solver object.
    */
-  Solver(SolverControl &           solver_control,
-         VectorMemory<VectorType> &vector_memory);
+  SolverBase(SolverControl &           solver_control,
+             VectorMemory<VectorType> &vector_memory);
 
   /**
    * Constructor. Takes a control object which evaluates the conditions for
@@ -355,7 +355,7 @@ public:
    * responsibility to guarantee that the lifetime of the argument is at least
    * as long as that of the solver object.
    */
-  Solver(SolverControl &solver_control);
+  SolverBase(SolverControl &solver_control);
 
   /**
    * Connect a function object that will be called periodically within
@@ -459,12 +459,24 @@ protected:
 };
 
 
+
+/**
+ * Type definition for the base class for iterative linear solvers.
+ * This class provides interfaces to a memory pool and the objects that
+ * determine whether a solver has converged.
+ *
+ * @deprecated Use <code>SolverBase</code> instead.
+ */
+template <class VectorType = Vector<double>>
+using Solver DEAL_II_DEPRECATED = SolverBase<VectorType>;
+
+
 /*-------------------------------- Inline functions ------------------------*/
 
 
 template <class VectorType>
 inline SolverControl::State
-Solver<VectorType>::StateCombiner::
+SolverBase<VectorType>::StateCombiner::
 operator()(const SolverControl::State state1,
            const SolverControl::State state2) const
 {
@@ -481,8 +493,8 @@ operator()(const SolverControl::State state1,
 template <class VectorType>
 template <typename Iterator>
 inline SolverControl::State
-Solver<VectorType>::StateCombiner::operator()(const Iterator begin,
-                                              const Iterator end) const
+SolverBase<VectorType>::StateCombiner::operator()(const Iterator begin,
+                                                  const Iterator end) const
 {
   Assert(begin != end,
          ExcMessage("You can't combine iterator states if no state is given."));
@@ -499,8 +511,9 @@ Solver<VectorType>::StateCombiner::operator()(const Iterator begin,
 
 
 template <class VectorType>
-inline Solver<VectorType>::Solver(SolverControl &           solver_control,
-                                  VectorMemory<VectorType> &vector_memory)
+inline SolverBase<VectorType>::SolverBase(
+  SolverControl &           solver_control,
+  VectorMemory<VectorType> &vector_memory)
   : memory(vector_memory)
 {
   // connect the solver control object to the signal. SolverControl::check
@@ -516,7 +529,7 @@ inline Solver<VectorType>::Solver(SolverControl &           solver_control,
 
 
 template <class VectorType>
-inline Solver<VectorType>::Solver(SolverControl &solver_control)
+inline SolverBase<VectorType>::SolverBase(SolverControl &solver_control)
   : // use the static memory object this class owns
   memory(static_vector_memory)
 {
@@ -534,7 +547,7 @@ inline Solver<VectorType>::Solver(SolverControl &solver_control)
 
 template <class VectorType>
 inline boost::signals2::connection
-Solver<VectorType>::connect(
+SolverBase<VectorType>::connect(
   const std::function<SolverControl::State(const unsigned int iteration,
                                            const double       check_value,
                                            const VectorType & current_iterate)>
index 90d1d7d46830433fddfa3866682ac348ec30ffe1..5ce13b435d6adb73d3be97331d6738ffbe54deee 100644 (file)
@@ -121,7 +121,7 @@ namespace internal
  *
  */
 template <typename VectorType = Vector<double>>
-class SolverBicgstab : public Solver<VectorType>,
+class SolverBicgstab : public SolverBase<VectorType>,
                        protected internal::SolverBicgstabData
 {
 public:
@@ -314,7 +314,7 @@ template <typename VectorType>
 SolverBicgstab<VectorType>::SolverBicgstab(SolverControl &           cn,
                                            VectorMemory<VectorType> &mem,
                                            const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , Vx(nullptr)
   , Vb(nullptr)
   , additional_data(data)
@@ -325,7 +325,7 @@ SolverBicgstab<VectorType>::SolverBicgstab(SolverControl &           cn,
 template <typename VectorType>
 SolverBicgstab<VectorType>::SolverBicgstab(SolverControl &       cn,
                                            const AdditionalData &data)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , Vx(nullptr)
   , Vb(nullptr)
   , additional_data(data)
index 9d1656ca87680ed0f78bc0798b4a2251b3885def..3dc4342adb375026006572e19068dfba20819e5b 100644 (file)
@@ -93,7 +93,7 @@ class PreconditionIdentity;
  * @author W. Bangerth, G. Kanschat, R. Becker and F.-T. Suttmeier
  */
 template <typename VectorType = Vector<double>>
-class SolverCG : public Solver<VectorType>
+class SolverCG : public SolverBase<VectorType>
 {
 public:
   /**
@@ -242,7 +242,7 @@ template <typename VectorType>
 SolverCG<VectorType>::SolverCG(SolverControl &           cn,
                                VectorMemory<VectorType> &mem,
                                const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
 {}
 
@@ -250,7 +250,7 @@ SolverCG<VectorType>::SolverCG(SolverControl &           cn,
 
 template <typename VectorType>
 SolverCG<VectorType>::SolverCG(SolverControl &cn, const AdditionalData &data)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , additional_data(data)
 {}
 
index b0fdf22bc79543c66e24a7ef77a8e6cccc877bc6..a31e97e7a4c83ed323c953162dbc5a346b7bc8c2 100644 (file)
@@ -88,7 +88,7 @@ DEAL_II_NAMESPACE_OPEN
  * @author Vishal Boddu, Denis Davydov, 2017
  */
 template <typename VectorType = Vector<double>>
-class SolverFIRE : public Solver<VectorType>
+class SolverFIRE : public SolverBase<VectorType>
 {
 public:
   /**
@@ -214,7 +214,7 @@ template <typename VectorType>
 SolverFIRE<VectorType>::SolverFIRE(SolverControl &           solver_control,
                                    VectorMemory<VectorType> &vector_memory,
                                    const AdditionalData &    data)
-  : Solver<VectorType>(solver_control, vector_memory)
+  : SolverBase<VectorType>(solver_control, vector_memory)
   , additional_data(data)
 {}
 
@@ -223,7 +223,7 @@ SolverFIRE<VectorType>::SolverFIRE(SolverControl &           solver_control,
 template <typename VectorType>
 SolverFIRE<VectorType>::SolverFIRE(SolverControl &       solver_control,
                                    const AdditionalData &data)
-  : Solver<VectorType>(solver_control)
+  : SolverBase<VectorType>(solver_control)
   , additional_data(data)
 {}
 
index 04f9fa48ae40e17d423f410dfcb3752e8d504386..d5a7d6a76d73a57ee1eb25265f4d2b83f8f8e1d2 100644 (file)
@@ -175,7 +175,7 @@ namespace internal
  * @author Wolfgang Bangerth, Guido Kanschat, Ralf Hartmann.
  */
 template <class VectorType = Vector<double>>
-class SolverGMRES : public Solver<VectorType>
+class SolverGMRES : public SolverBase<VectorType>
 {
 public:
   /**
@@ -457,7 +457,7 @@ protected:
  * @author Guido Kanschat, 2003
  */
 template <class VectorType = Vector<double>>
-class SolverFGMRES : public Solver<VectorType>
+class SolverFGMRES : public SolverBase<VectorType>
 {
 public:
   /**
@@ -621,7 +621,7 @@ template <class VectorType>
 SolverGMRES<VectorType>::SolverGMRES(SolverControl &           cn,
                                      VectorMemory<VectorType> &mem,
                                      const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
 {}
 
@@ -630,7 +630,7 @@ SolverGMRES<VectorType>::SolverGMRES(SolverControl &           cn,
 template <class VectorType>
 SolverGMRES<VectorType>::SolverGMRES(SolverControl &       cn,
                                      const AdditionalData &data)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , additional_data(data)
 {}
 
@@ -1182,7 +1182,7 @@ template <class VectorType>
 SolverFGMRES<VectorType>::SolverFGMRES(SolverControl &           cn,
                                        VectorMemory<VectorType> &mem,
                                        const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
 {}
 
@@ -1191,7 +1191,7 @@ SolverFGMRES<VectorType>::SolverFGMRES(SolverControl &           cn,
 template <class VectorType>
 SolverFGMRES<VectorType>::SolverFGMRES(SolverControl &       cn,
                                        const AdditionalData &data)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , additional_data(data)
 {}
 
index 845928b743bc2f4ab8fcc0a21120e95213f531ca..774f21bed4b9b5f416aa26037b3b03b25a6e6fdb 100644 (file)
@@ -69,7 +69,7 @@ DEAL_II_NAMESPACE_OPEN
  * @author Thomas Richter, 2000, Luca Heltai, 2006
  */
 template <class VectorType = Vector<double>>
-class SolverMinRes : public Solver<VectorType>
+class SolverMinRes : public SolverBase<VectorType>
 {
 public:
   /**
@@ -155,7 +155,7 @@ template <class VectorType>
 SolverMinRes<VectorType>::SolverMinRes(SolverControl &           cn,
                                        VectorMemory<VectorType> &mem,
                                        const AdditionalData &)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , res2(numbers::signaling_nan<double>())
 {}
 
@@ -164,7 +164,7 @@ SolverMinRes<VectorType>::SolverMinRes(SolverControl &           cn,
 template <class VectorType>
 SolverMinRes<VectorType>::SolverMinRes(SolverControl &cn,
                                        const AdditionalData &)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , res2(numbers::signaling_nan<double>())
 {}
 
index 824412cb1260cc6b70cf60c1917763f41f457c9f..5e68e3d8e146633f898d1ad9304999668ddcaf88 100644 (file)
@@ -92,7 +92,7 @@ DEAL_II_NAMESPACE_OPEN
  * @author Guido Kanschat, 1999; Ingo Kligge 2017
  */
 template <typename VectorType = Vector<double>>
-class SolverQMRS : public Solver<VectorType>
+class SolverQMRS : public SolverBase<VectorType>
 {
 public:
   /**
@@ -255,7 +255,7 @@ template <class VectorType>
 SolverQMRS<VectorType>::SolverQMRS(SolverControl &           cn,
                                    VectorMemory<VectorType> &mem,
                                    const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
   , step(0)
 {}
@@ -263,7 +263,7 @@ SolverQMRS<VectorType>::SolverQMRS(SolverControl &           cn,
 template <class VectorType>
 SolverQMRS<VectorType>::SolverQMRS(SolverControl &       cn,
                                    const AdditionalData &data)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , additional_data(data)
   , step(0)
 {}
index dfa17fa1f6d11ab8bceafc8ab77b4ebb4da53831..e7c7dab8718647597534a1950f4649cf44b23cd7 100644 (file)
@@ -56,7 +56,7 @@ DEAL_II_NAMESPACE_OPEN
  * @date 2010
  */
 template <typename VectorType = Vector<double>>
-class SolverRelaxation : public Solver<VectorType>
+class SolverRelaxation : public SolverBase<VectorType>
 {
 public:
   /**
@@ -95,7 +95,7 @@ public:
 template <class VectorType>
 SolverRelaxation<VectorType>::SolverRelaxation(SolverControl &cn,
                                                const AdditionalData &)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
 {}
 
 
index b2a59fc34916fc90c298f1a9ec101459d41bb6f5..417eff4b25cebce2ea9d2d66949914be1f60288f 100644 (file)
@@ -60,7 +60,7 @@ DEAL_II_NAMESPACE_OPEN
  * @author Ralf Hartmann
  */
 template <class VectorType = Vector<double>>
-class SolverRichardson : public Solver<VectorType>
+class SolverRichardson : public SolverBase<VectorType>
 {
 public:
   /**
@@ -175,7 +175,7 @@ template <class VectorType>
 SolverRichardson<VectorType>::SolverRichardson(SolverControl &           cn,
                                                VectorMemory<VectorType> &mem,
                                                const AdditionalData &    data)
-  : Solver<VectorType>(cn, mem)
+  : SolverBase<VectorType>(cn, mem)
   , additional_data(data)
 {}
 
@@ -184,7 +184,7 @@ SolverRichardson<VectorType>::SolverRichardson(SolverControl &           cn,
 template <class VectorType>
 SolverRichardson<VectorType>::SolverRichardson(SolverControl &       cn,
                                                const AdditionalData &data)
-  : Solver<VectorType>(cn)
+  : SolverBase<VectorType>(cn)
   , additional_data(data)
 {}
 
index 5f3ed06779fd569a0f8fd74ccfc06767b2f90367..aa23dab64d7b08ae07e451ff0d997f5ea3d214e2 100644 (file)
@@ -53,7 +53,7 @@ DEAL_II_NAMESPACE_OPEN
  * @author Denis Davydov, 2018
  */
 template <typename VectorType>
-class SolverBFGS : public Solver<VectorType>
+class SolverBFGS : public SolverBase<VectorType>
 {
 public:
   /**
@@ -195,7 +195,7 @@ SolverBFGS<VectorType>::AdditionalData::AdditionalData(
 template <typename VectorType>
 SolverBFGS<VectorType>::SolverBFGS(SolverControl &       solver_control,
                                    const AdditionalData &data)
-  : Solver<VectorType>(solver_control)
+  : SolverBase<VectorType>(solver_control)
   , additional_data(data)
 {}
 
index ada5bbf82062a91d811e1744422b0dce5bcdf356..7ce237dd364cd8ea1f04c85883d6b179197ab9b6 100644 (file)
@@ -17,5 +17,5 @@
 
 for (S : VECTOR_TYPES)
   {
-    template class Solver<S>;
+    template class SolverBase<S>;
   }

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.