* @author Guido Kanschat, 2000
*/
template <typename VectorType = Vector<double>>
-class EigenPower : private Solver<VectorType>
+class EigenPower : private SolverBase<VectorType>
{
public:
/**
* @author Guido Kanschat, 2000, 2003
*/
template <typename VectorType = Vector<double>>
-class EigenInverse : private Solver<VectorType>
+class EigenInverse : private SolverBase<VectorType>
{
public:
/**
EigenPower<VectorType>::EigenPower(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
{}
EigenInverse<VectorType>::EigenInverse(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
{}
* 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
*
* <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
* 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.
*
* 2014
*/
template <class VectorType = Vector<double>>
-class Solver : public Subscriptor
+class SolverBase : public Subscriptor
{
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
* 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
};
+
+/**
+ * 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
{
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."));
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
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)
{
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)>
*
*/
template <typename VectorType = Vector<double>>
-class SolverBicgstab : public Solver<VectorType>,
+class SolverBicgstab : public SolverBase<VectorType>,
protected internal::SolverBicgstabData
{
public:
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)
template <typename VectorType>
SolverBicgstab<VectorType>::SolverBicgstab(SolverControl & cn,
const AdditionalData &data)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, Vx(nullptr)
, Vb(nullptr)
, additional_data(data)
* @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:
/**
SolverCG<VectorType>::SolverCG(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
{}
template <typename VectorType>
SolverCG<VectorType>::SolverCG(SolverControl &cn, const AdditionalData &data)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, additional_data(data)
{}
* @author Vishal Boddu, Denis Davydov, 2017
*/
template <typename VectorType = Vector<double>>
-class SolverFIRE : public Solver<VectorType>
+class SolverFIRE : public SolverBase<VectorType>
{
public:
/**
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)
{}
template <typename VectorType>
SolverFIRE<VectorType>::SolverFIRE(SolverControl & solver_control,
const AdditionalData &data)
- : Solver<VectorType>(solver_control)
+ : SolverBase<VectorType>(solver_control)
, additional_data(data)
{}
* @author Wolfgang Bangerth, Guido Kanschat, Ralf Hartmann.
*/
template <class VectorType = Vector<double>>
-class SolverGMRES : public Solver<VectorType>
+class SolverGMRES : public SolverBase<VectorType>
{
public:
/**
* @author Guido Kanschat, 2003
*/
template <class VectorType = Vector<double>>
-class SolverFGMRES : public Solver<VectorType>
+class SolverFGMRES : public SolverBase<VectorType>
{
public:
/**
SolverGMRES<VectorType>::SolverGMRES(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
{}
template <class VectorType>
SolverGMRES<VectorType>::SolverGMRES(SolverControl & cn,
const AdditionalData &data)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, additional_data(data)
{}
SolverFGMRES<VectorType>::SolverFGMRES(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
{}
template <class VectorType>
SolverFGMRES<VectorType>::SolverFGMRES(SolverControl & cn,
const AdditionalData &data)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, additional_data(data)
{}
* @author Thomas Richter, 2000, Luca Heltai, 2006
*/
template <class VectorType = Vector<double>>
-class SolverMinRes : public Solver<VectorType>
+class SolverMinRes : public SolverBase<VectorType>
{
public:
/**
SolverMinRes<VectorType>::SolverMinRes(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData &)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, res2(numbers::signaling_nan<double>())
{}
template <class VectorType>
SolverMinRes<VectorType>::SolverMinRes(SolverControl &cn,
const AdditionalData &)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, res2(numbers::signaling_nan<double>())
{}
* @author Guido Kanschat, 1999; Ingo Kligge 2017
*/
template <typename VectorType = Vector<double>>
-class SolverQMRS : public Solver<VectorType>
+class SolverQMRS : public SolverBase<VectorType>
{
public:
/**
SolverQMRS<VectorType>::SolverQMRS(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
, step(0)
{}
template <class VectorType>
SolverQMRS<VectorType>::SolverQMRS(SolverControl & cn,
const AdditionalData &data)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, additional_data(data)
, step(0)
{}
* @date 2010
*/
template <typename VectorType = Vector<double>>
-class SolverRelaxation : public Solver<VectorType>
+class SolverRelaxation : public SolverBase<VectorType>
{
public:
/**
template <class VectorType>
SolverRelaxation<VectorType>::SolverRelaxation(SolverControl &cn,
const AdditionalData &)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
{}
* @author Ralf Hartmann
*/
template <class VectorType = Vector<double>>
-class SolverRichardson : public Solver<VectorType>
+class SolverRichardson : public SolverBase<VectorType>
{
public:
/**
SolverRichardson<VectorType>::SolverRichardson(SolverControl & cn,
VectorMemory<VectorType> &mem,
const AdditionalData & data)
- : Solver<VectorType>(cn, mem)
+ : SolverBase<VectorType>(cn, mem)
, additional_data(data)
{}
template <class VectorType>
SolverRichardson<VectorType>::SolverRichardson(SolverControl & cn,
const AdditionalData &data)
- : Solver<VectorType>(cn)
+ : SolverBase<VectorType>(cn)
, additional_data(data)
{}
* @author Denis Davydov, 2018
*/
template <typename VectorType>
-class SolverBFGS : public Solver<VectorType>
+class SolverBFGS : public SolverBase<VectorType>
{
public:
/**
template <typename VectorType>
SolverBFGS<VectorType>::SolverBFGS(SolverControl & solver_control,
const AdditionalData &data)
- : Solver<VectorType>(solver_control)
+ : SolverBase<VectorType>(solver_control)
, additional_data(data)
{}
for (S : VECTOR_TYPES)
{
- template class Solver<S>;
+ template class SolverBase<S>;
}