|
Belos Version of the Day
|
Subclass of Belos::Iteration for GMRES-based solvers. More...
#include <BelosGmresBaseIteration.hpp>

Public Types | |
| typedef Scalar | scalar_type |
| typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | magnitude_type |
| typedef MV | multivector_type |
| typedef OP | operator_type |
Public Member Functions | |
| void | iterate () |
| Iterate until error or status test triggers. | |
| void | initialize () |
| Initialize the solver. | |
| int | getNumIters () const |
| Return the current iteration count. | |
| void | resetNumIters (int iter=0) |
| Reset the iteration count to iter. | |
| void | restart () |
| Restart GMRES. | |
| Teuchos::RCP< const MV > | getNativeResiduals (std::vector< magnitude_type > *norms) const |
| Get the residuals native to the solver. | |
| Teuchos::RCP< MV > | getCurrentUpdate () const |
| Force computation of the current solution update, if it has not already yet been computed. | |
| const LinearProblem< Scalar, MV, OP > & | getProblem () const |
| Get a constant reference to the linear problem. | |
| int | getBlockSize () const |
| The block size to be used by the iterative solver in solving this linear problem. | |
| void | setBlockSize (int blockSize) |
| Set blocksize (not allowed unless blockSize==1) | |
| bool | isInitialized () |
| Whether or not the solver has been initialized. | |
| GmresBaseIteration (const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &problem, const Teuchos::RCP< const OrthoManager< Scalar, MV > > &ortho, const Teuchos::RCP< OutputManager< Scalar > > &printer, const Teuchos::RCP< StatusTest< Scalar, MV, OP > > &tester, const Teuchos::RCP< const Teuchos::ParameterList > ¶ms) | |
| Constructor. | |
| virtual | ~GmresBaseIteration () |
| Trivial destructor. | |
| void | updateSolution () |
| Update the current approximate solution. | |
Subclass of Belos::Iteration for GMRES-based solvers.
Definition at line 65 of file BelosGmresBaseIteration.hpp.
| typedef Scalar Belos::GmresBaseIteration< Scalar, MV, OP >::scalar_type |
Definition at line 72 of file BelosGmresBaseIteration.hpp.
| typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::GmresBaseIteration< Scalar, MV, OP >::magnitude_type |
Definition at line 73 of file BelosGmresBaseIteration.hpp.
| typedef MV Belos::GmresBaseIteration< Scalar, MV, OP >::multivector_type |
Definition at line 74 of file BelosGmresBaseIteration.hpp.
| typedef OP Belos::GmresBaseIteration< Scalar, MV, OP >::operator_type |
Definition at line 75 of file BelosGmresBaseIteration.hpp.
| Belos::GmresBaseIteration< Scalar, MV, OP >::GmresBaseIteration | ( | const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > & | problem, |
| const Teuchos::RCP< const OrthoManager< Scalar, MV > > & | ortho, | ||
| const Teuchos::RCP< OutputManager< Scalar > > & | printer, | ||
| const Teuchos::RCP< StatusTest< Scalar, MV, OP > > & | tester, | ||
| const Teuchos::RCP< const Teuchos::ParameterList > & | params | ||
| ) |
Constructor.
| problem | [in/out] The linear problem to solve, along with any preconditioner(s) |
| ortho | [in] Orthogonalization manager |
| printer | [in/out] Output manager |
| tester | [in] Status test for stopping iteration |
| params | [in(/out???)] Parameters and options for GMRES. An important parameter, required for correctness if the preconditioner might change from iteration to iteration, is the "Flexible" boolean parameter which tells us whether or not to run Flexible GMRES. |
Definition at line 327 of file BelosGmresBaseIteration.hpp.
| virtual Belos::GmresBaseIteration< Scalar, MV, OP >::~GmresBaseIteration | ( | ) | [inline, virtual] |
Trivial destructor.
Definition at line 273 of file BelosGmresBaseIteration.hpp.
| void Belos::GmresBaseIteration< Scalar, MV, OP >::iterate | ( | ) | [inline, virtual] |
Iterate until error or status test triggers.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 97 of file BelosGmresBaseIteration.hpp.
| void Belos::GmresBaseIteration< Scalar, MV, OP >::initialize | ( | ) | [virtual] |
Initialize the solver.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 343 of file BelosGmresBaseIteration.hpp.
| int Belos::GmresBaseIteration< Scalar, MV, OP >::getNumIters | ( | ) | const [inline, virtual] |
Return the current iteration count.
Restarting resets the current iteration count.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 127 of file BelosGmresBaseIteration.hpp.
| void Belos::GmresBaseIteration< Scalar, MV, OP >::resetNumIters | ( | int | iter = 0 | ) | [inline, virtual] |
Reset the iteration count to iter.
Reset the iteration count to iter, typically zero (the default value).
| iter | [in] New iteration count (>= 0) |
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 141 of file BelosGmresBaseIteration.hpp.
| void Belos::GmresBaseIteration< Scalar, MV, OP >::restart | ( | ) | [inline] |
Restart GMRES.
Definition at line 149 of file BelosGmresBaseIteration.hpp.
| Teuchos::RCP<const MV> Belos::GmresBaseIteration< Scalar, MV, OP >::getNativeResiduals | ( | std::vector< magnitude_type > * | norms | ) | const [inline] |
Get the residuals native to the solver.
| norms | [out] norms[j] is set to the "native" residual norm for the j-th residual vector. (This is not block Arnoldi, so blockSize==1 always, and there should only be one residual vector.) |
Definition at line 183 of file BelosGmresBaseIteration.hpp.
| Teuchos::RCP<MV> Belos::GmresBaseIteration< Scalar, MV, OP >::getCurrentUpdate | ( | ) | const [inline, virtual] |
Force computation of the current solution update, if it has not already yet been computed.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 214 of file BelosGmresBaseIteration.hpp.
| const LinearProblem<Scalar, MV, OP>& Belos::GmresBaseIteration< Scalar, MV, OP >::getProblem | ( | ) | const [inline, virtual] |
Get a constant reference to the linear problem.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 219 of file BelosGmresBaseIteration.hpp.
| int Belos::GmresBaseIteration< Scalar, MV, OP >::getBlockSize | ( | ) | const [inline, virtual] |
The block size to be used by the iterative solver in solving this linear problem.
Our GMRES/Arnoldi implementations only solve for one right-hand side at a time, so the block size is always one.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 225 of file BelosGmresBaseIteration.hpp.
| void Belos::GmresBaseIteration< Scalar, MV, OP >::setBlockSize | ( | int | blockSize | ) | [inline, virtual] |
Set blocksize (not allowed unless blockSize==1)
Set the block size to use when solving this linear problem. The Arnoldi/GMRES implementations used by this Iteration subclass can only solve for one right-hand side at a time, so the block size must always be one. We deal with this hackishly by raising an std::invalid_argument if a non-1 input is given. (It's hackish because it violates the "is-a" requirement of class hierarchies; GmresBaseIteration "is not an" Iteration, because it does not support arbitrary block sizes.)
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 238 of file BelosGmresBaseIteration.hpp.
| bool Belos::GmresBaseIteration< Scalar, MV, OP >::isInitialized | ( | ) | [inline, virtual] |
Whether or not the solver has been initialized.
Implements Belos::Iteration< Scalar, MV, OP >.
Definition at line 246 of file BelosGmresBaseIteration.hpp.
| void Belos::GmresBaseIteration< Scalar, MV, OP >::updateSolution | ( | ) | [inline] |
Update the current approximate solution.
Modify the LinearProblem instance's current approximate solution (the multivector returned by getLHS()) by adding in the current solution update (xUpdate_). Tell the LinearProblem to compute a new residual vector as well.
Definition at line 282 of file BelosGmresBaseIteration.hpp.
1.7.4