|
Belos Version of the Day
|
Inner solver that uses GMRES (via GmresSolMgr). More...
#include <BelosGmresInnerSolver.hpp>

Public Types | |
| typedef InnerSolver< Scalar, MV, OP > | base_type |
| typedef base_type::scalar_type | scalar_type |
| typedef base_type::magnitude_type | magnitude_type |
| typedef base_type::multivector_type | multivector_type |
| typedef base_type::operator_type | operator_type |
Public Member Functions | |
| GmresInnerSolver (const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &problem, const Teuchos::RCP< const Teuchos::ParameterList > ¶ms, const bool debug=false) | |
| Constructor. | |
| Teuchos::RCP< const Teuchos::ParameterList > | getCurrentParameters () const |
| Current parameters for the inner solver implementation. | |
| InnerSolveResult | solve (const Teuchos::RCP< MV > &X, const Teuchos::RCP< const MV > &B, const magnitude_type convTol, const int maxItersPerRestart, const int maxNumRestarts) |
Solve for the given right-hand side(s) B. | |
| InnerSolveResult | solve (const Teuchos::RCP< MV > &X, const Teuchos::RCP< const MV > &B) |
Solve for the given right-hand side(s) B. | |
Inner solver that uses GMRES (via GmresSolMgr).
Definition at line 55 of file BelosGmresInnerSolver.hpp.
| typedef InnerSolver<Scalar, MV, OP> Belos::GmresInnerSolver< Scalar, MV, OP >::base_type |
Definition at line 57 of file BelosGmresInnerSolver.hpp.
| typedef base_type::scalar_type Belos::GmresInnerSolver< Scalar, MV, OP >::scalar_type |
Reimplemented from Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 58 of file BelosGmresInnerSolver.hpp.
| typedef base_type::magnitude_type Belos::GmresInnerSolver< Scalar, MV, OP >::magnitude_type |
Reimplemented from Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 59 of file BelosGmresInnerSolver.hpp.
| typedef base_type::multivector_type Belos::GmresInnerSolver< Scalar, MV, OP >::multivector_type |
Reimplemented from Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 60 of file BelosGmresInnerSolver.hpp.
| typedef base_type::operator_type Belos::GmresInnerSolver< Scalar, MV, OP >::operator_type |
Reimplemented from Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 61 of file BelosGmresInnerSolver.hpp.
| Belos::GmresInnerSolver< Scalar, MV, OP >::GmresInnerSolver | ( | const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > & | problem, |
| const Teuchos::RCP< const Teuchos::ParameterList > & | params, | ||
| const bool | debug = false |
||
| ) | [inline] |
Constructor.
| problem | [in/out] The linear problem to solve. Its initial guess ("left-hand side") and its right-hand side will be changed every time solve() is called. The contents of those multivectors won't be overwritten -- just the pointers (RCPs) will be changed -- so if you want to keep either of them, you need only save the RCP before calling any of the solve() methods. The linear problem itself must be non-null, and the matrix / operator A (problem->getOperator()) in the linear system to solve must be non-null. |
| params | [in] Parameters for GmresSolMgr. If null, we use defaults, else we make a deep copy. |
| debug | [in] Whether or not to run the GMRES implementation in debug mode (which will produce verbose debugging output, and may also result in extra computation in order to test certain invariants or display status). |
Definition at line 102 of file BelosGmresInnerSolver.hpp.
| Teuchos::RCP<const Teuchos::ParameterList> Belos::GmresInnerSolver< Scalar, MV, OP >::getCurrentParameters | ( | ) | const [inline, virtual] |
Current parameters for the inner solver implementation.
These parameters may change values in place, if the five-argument version of the solve() method is called. If you want to preserve the original parameter values, make a deep copy of the returned ParameterList.
Implements Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 114 of file BelosGmresInnerSolver.hpp.
| InnerSolveResult Belos::GmresInnerSolver< Scalar, MV, OP >::solve | ( | const Teuchos::RCP< MV > & | X, |
| const Teuchos::RCP< const MV > & | B, | ||
| const magnitude_type | convTol, | ||
| const int | maxItersPerRestart, | ||
| const int | maxNumRestarts | ||
| ) | [inline, virtual] |
Solve
for the given right-hand side(s) B.
| X | [in/out] On input: The initial guess for the inner solver, if the inner solver accepts an initial guess (it is not required to do so). On output: the approximate solution to Ax=B as computed by the inner solver. Whether or not the solver accepts an initial guess, X must be allocated to hold the output, and it must be in the correct vector space for the solution vectors. |
| B | [in] Right-hand side(s) for which to solve |
| convTol | [in] "Convergence tolerance," the meaning of which depends on the subclass |
| maxItersPerRestart | [in] Maximum number of iterations per restart cycle in the inner solve. |
| maxNumRestarts | [in] Maximum number of restart cycle(s) in the inner solve. |
Implements Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 140 of file BelosGmresInnerSolver.hpp.
| InnerSolveResult Belos::GmresInnerSolver< Scalar, MV, OP >::solve | ( | const Teuchos::RCP< MV > & | X, |
| const Teuchos::RCP< const MV > & | B | ||
| ) | [inline, virtual] |
Solve
for the given right-hand side(s) B.
This should do the same thing as the five-argument version of solve(), except it should pick reasonable defaults for the convergence tolerance, maximum number of iterations, and maximum number of restart cycles.
| X | [in/out] On input: The initial guess for the inner solver, if the inner solver accepts an initial guess (it is not required to do so). On output: the approximate solution to Ax=B as computed by the inner solver. |
| B | [in] Right-hand side(s) for which to solve |
Implements Belos::InnerSolver< Scalar, MV, OP >.
Definition at line 177 of file BelosGmresInnerSolver.hpp.
1.7.4