43 #ifndef BELOS_SOLVERMANAGER_HPP 44 #define BELOS_SOLVERMANAGER_HPP 54 #include "Teuchos_ParameterList.hpp" 55 #include "Teuchos_RCP.hpp" 56 #include "Teuchos_Describable.hpp" 66 template <
class ScalarType,
class MV,
class OP>
70 template<
class ScalarType,
class MV,
class OP>
108 virtual typename Teuchos::ScalarTraits<ScalarType>::magnitudeType
achievedTol()
const {
109 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::runtime_error,
"achievedTol() not implemented");
138 virtual void setParameters(
const Teuchos::RCP<Teuchos::ParameterList> ¶ms ) = 0;
145 TEUCHOS_TEST_FOR_EXCEPT_MSG(
true,
"Error, the function setUserConvStatusTest() has not been" 146 <<
" overridden for the class" << this->description() <<
" yet!");
Collection of types and exceptions used within the Belos solvers.
virtual void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)=0
Set the linear problem that needs to be solved.
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const =0
Return the valid parameters for this solver manager.
SolverManager()
Empty constructor.
virtual ReturnType solve()=0
Iterate until the status test tells us to stop.
virtual void reset(const ResetType type)=0
Reset the solver manager.
virtual Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const =0
Return the current parameters being used for this solver manager.
A pure virtual class for defining the status tests for the Belos iterative solvers.
virtual void setUserConvStatusTest(const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &userConvStatusTest)
Set user-defined convergence status test.
virtual const LinearProblem< ScalarType, MV, OP > & getProblem() const =0
Return a reference to the linear problem being solved by this solver manager.
virtual Teuchos::ScalarTraits< ScalarType >::magnitudeType achievedTol() const
Tolerance achieved by the last solve() invocation.
ResetType
How to reset the solver.
A linear system to solve, and its associated information.
Class which describes the linear problem to be solved by the iterative solver.
ReturnType
Whether the Belos solve converged for all linear systems.
The Belos::SolverManager is a templated virtual base class that defines the basic interface that any ...
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > ¶ms)=0
Set the parameters to use when solving the linear problem.
virtual bool isLOADetected() const =0
Returns whether a loss of accuracy was detected in the solver.
Belos header file which uses auto-configuration information to include necessary C++ headers...
virtual int getNumIters() const =0
Get the iteration count for the most recent call to solve().
virtual ~SolverManager()
Destructor.