|
Belos
Version of the Day
|
MINRES implementation. More...
#include <BelosMinresIter.hpp>

Public Types | |
| typedef MultiVecTraits < ScalarType, MV > | MVT |
| typedef OperatorTraits < ScalarType, MV, OP > | OPT |
| typedef Teuchos::ScalarTraits < ScalarType > | SCT |
| typedef SCT::magnitudeType | MagnitudeType |
| typedef Teuchos::ScalarTraits < MagnitudeType > | SMT |
Public Member Functions | |
Constructors/Destructor | |
| MinresIter (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem, const Teuchos::RCP< OutputManager< ScalarType > > &printer, const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &tester, const Teuchos::ParameterList ¶ms) | |
| Constructor. | |
| virtual | ~MinresIter () |
| Destructor. | |
Solver methods | |
| void | iterate () |
| Perform MINRES iterations until convergence or error. | |
| void | initializeMinres (MinresIterationState< ScalarType, MV > newstate) |
| Initialize the solver to an iterate, providing a complete state. | |
| void | initialize () |
| Initialize the solver. | |
| MinresIterationState < ScalarType, MV > | getState () const |
| Get the current state of the linear solver. | |
Status methods | |
| int | getNumIters () const |
| Get the current iteration count. | |
| void | resetNumIters (int iter=0) |
| Reset the iteration count. | |
| Teuchos::RCP< const MV > | getNativeResiduals (std::vector< MagnitudeType > *norms) const |
| Get the norms of the residuals native to the solver. | |
| Teuchos::RCP< MV > | getCurrentUpdate () const |
| Get the current update to the linear system. | |
| void | symOrtho (ScalarType a, ScalarType b, ScalarType *c, ScalarType *s, ScalarType *r) |
Accessor methods | |
| const LinearProblem < ScalarType, MV, OP > & | getProblem () const |
| Get a constant reference to the linear problem. | |
| int | getBlockSize () const |
| Get the blocksize to be used by the iterative solver in solving this linear problem. | |
| void | setBlockSize (int blockSize) |
| Set the blocksize to be used by the iterative solver in solving this linear problem. | |
| bool | isInitialized () const |
| States whether the solver has been initialized or not. | |
| bool | isInitialized () |
| States whether the solver has been initialized or not. | |
MINRES implementation.
Implementation of the preconditioned Minimal Residual Method (MINRES) iteration. This a bilinear form implementation, that uses inner products of the form <x,My> to solve the preconditioned linear system M^{-1}*A x = b. Thus, it is necessary that the left preconditioner M is positive definite.
Definition at line 95 of file BelosMinresIter.hpp.
| typedef MultiVecTraits< ScalarType, MV > Belos::MinresIter< ScalarType, MV, OP >::MVT |
Definition at line 102 of file BelosMinresIter.hpp.
| typedef OperatorTraits< ScalarType, MV, OP > Belos::MinresIter< ScalarType, MV, OP >::OPT |
Definition at line 103 of file BelosMinresIter.hpp.
| typedef Teuchos::ScalarTraits< ScalarType > Belos::MinresIter< ScalarType, MV, OP >::SCT |
Definition at line 104 of file BelosMinresIter.hpp.
| typedef SCT::magnitudeType Belos::MinresIter< ScalarType, MV, OP >::MagnitudeType |
Definition at line 105 of file BelosMinresIter.hpp.
| typedef Teuchos::ScalarTraits< MagnitudeType > Belos::MinresIter< ScalarType, MV, OP >::SMT |
Definition at line 106 of file BelosMinresIter.hpp.
| Belos::MinresIter< ScalarType, MV, OP >::MinresIter | ( | const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > & | problem, |
| const Teuchos::RCP< OutputManager< ScalarType > > & | printer, | ||
| const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & | tester, | ||
| const Teuchos::ParameterList & | params | ||
| ) |
Constructor.
problem The linear problem to solve printer Output manager, for intermediate solver output tester Status test for determining when the current approximate solution has converged params Parameter list of solver options
Definition at line 326 of file BelosMinresIter.hpp.
| virtual Belos::MinresIter< ScalarType, MV, OP >::~MinresIter | ( | ) | [inline, virtual] |
Destructor.
Definition at line 125 of file BelosMinresIter.hpp.
| void Belos::MinresIter< ScalarType, MV, OP >::iterate | ( | ) | [virtual] |
Perform MINRES iterations until convergence or error.
Perform MINRES iterations until the status test indicates the need to stop, or until an error occurs. In the latter case, a (subclass of) std::exception is thrown.
iterate() will first determine whether the solver is initialized; if not, it will call initialize() using default arguments. After initialization, the solver performs MINRES iterations until the status test evaluates as Passed, at which point the method returns to the caller.
The status test is queried at the beginning of the iteration.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 451 of file BelosMinresIter.hpp.
| void Belos::MinresIter< ScalarType, MV, OP >::initializeMinres | ( | MinresIterationState< ScalarType, MV > | newstate | ) | [virtual] |
Initialize the solver to an iterate, providing a complete state.
The MinresIter contains a certain amount of state, consisting of the current residual, preconditioned residual, and decent direction.
initialize() gives the user the opportunity to manually set these, although only the current unpreconditioned residual is required.
true (see post-conditions of isInitialize())newstate which directly points to the multivectors in the solver, the data is not copied. Implements Belos::MinresIteration< ScalarType, MV, OP >.
Definition at line 380 of file BelosMinresIter.hpp.
| void Belos::MinresIter< ScalarType, MV, OP >::initialize | ( | ) | [inline, virtual] |
Initialize the solver.
Initialize the solver. If a starting guess is provided in the linear problem, use that. Otherwise, choose a random starting guess.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 169 of file BelosMinresIter.hpp.
| MinresIterationState<ScalarType,MV> Belos::MinresIter< ScalarType, MV, OP >::getState | ( | ) | const [inline, virtual] |
Get the current state of the linear solver.
The returned current state is only valid if isInitialized() == true.
Implements Belos::MinresIteration< ScalarType, MV, OP >.
Definition at line 181 of file BelosMinresIter.hpp.
| int Belos::MinresIter< ScalarType, MV, OP >::getNumIters | ( | ) | const [inline, virtual] |
Get the current iteration count.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 202 of file BelosMinresIter.hpp.
| void Belos::MinresIter< ScalarType, MV, OP >::resetNumIters | ( | int | iter = 0 | ) | [inline, virtual] |
Reset the iteration count.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 205 of file BelosMinresIter.hpp.
| Teuchos::RCP<const MV> Belos::MinresIter< ScalarType, MV, OP >::getNativeResiduals | ( | std::vector< MagnitudeType > * | norms | ) | const [inline] |
Get the norms of the residuals native to the solver.
Definition at line 210 of file BelosMinresIter.hpp.
| Teuchos::RCP<MV> Belos::MinresIter< ScalarType, MV, OP >::getCurrentUpdate | ( | ) | const [inline, virtual] |
Get the current update to the linear system.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 225 of file BelosMinresIter.hpp.
| void Belos::MinresIter< ScalarType, MV, OP >::symOrtho | ( | ScalarType | a, |
| ScalarType | b, | ||
| ScalarType * | c, | ||
| ScalarType * | s, | ||
| ScalarType * | r | ||
| ) |
Definition at line 606 of file BelosMinresIter.hpp.
| const LinearProblem<ScalarType,MV,OP>& Belos::MinresIter< ScalarType, MV, OP >::getProblem | ( | ) | const [inline, virtual] |
Get a constant reference to the linear problem.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 236 of file BelosMinresIter.hpp.
| int Belos::MinresIter< ScalarType, MV, OP >::getBlockSize | ( | ) | const [inline, virtual] |
Get the blocksize to be used by the iterative solver in solving this linear problem.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 239 of file BelosMinresIter.hpp.
| void Belos::MinresIter< ScalarType, MV, OP >::setBlockSize | ( | int | blockSize | ) | [inline, virtual] |
Set the blocksize to be used by the iterative solver in solving this linear problem.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 242 of file BelosMinresIter.hpp.
| bool Belos::MinresIter< ScalarType, MV, OP >::isInitialized | ( | ) | const [inline] |
States whether the solver has been initialized or not.
Definition at line 248 of file BelosMinresIter.hpp.
| bool Belos::MinresIter< ScalarType, MV, OP >::isInitialized | ( | ) | [inline, virtual] |
States whether the solver has been initialized or not.
Implements Belos::Iteration< ScalarType, MV, OP >.
Definition at line 249 of file BelosMinresIter.hpp.
1.7.6.1