Belos Package Browser (Single Doxygen Collection) Development
Public Types | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
Belos::GmresSolMgr< Scalar, MV, OP > Class Template Reference

Solver manager for CA-GMRES and standard GMRES. More...

#include <BelosGmresSolMgr.hpp>

Inheritance diagram for Belos::GmresSolMgr< Scalar, MV, OP >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Scalar scalar_type
typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
magnitude_type
typedef MV multivector_type
typedef OP operator_type

Private Types

typedef MultiVecTraits< Scalar,
MV > 
MVT
typedef OperatorTraits< Scalar,
MV, OP > 
OPT
typedef Teuchos::ScalarTraits
< Scalar > 
STS
typedef Teuchos::ScalarTraits
< magnitude_type
STM
typedef GmresBaseIteration
< Scalar, MV, OP > 
iteration_type

Private Member Functions

void setParametersImpl (const Teuchos::RCP< Teuchos::ParameterList > &params)
 Set parameters for solving the linear problem.
void rebuildStatusTests (Teuchos::RCP< Teuchos::ParameterList > plist=Teuchos::null)
 (Re)build all the iteration stopping criteria.
void rebuildStatusTests (const magnitude_type convTol, const int maxItersPerRestart)
 (Re)build all the iteration stopping criteria.
void rebuildOrthoManager (Teuchos::RCP< Teuchos::ParameterList > plist=Teuchos::null)
 Initialize the OrthoManager (orthogonalization method).
void rebuildIteration (Teuchos::RCP< Teuchos::ParameterList > plist=Teuchos::null)
 (Re)build the Iteration subclass.

Static Private Member Functions

static Teuchos::RCP
< LinearProblem< Scalar, MV,
OP > > 
validatedProblem (const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &problem)
 Make sure that GmresSolMgr can solve the given problem.
static ScaleType stringToScaleType (const std::string &scaleType)
 Convert string to enumerated type for residual test.
static Teuchos::RCP
< StatusTestOutput< Scalar, MV,
OP > > 
initOutputTest (const Teuchos::RCP< OutputManager< Scalar > > &outMan, const Teuchos::RCP< StatusTest< Scalar, MV, OP > > &statusTest, const OutputType outStyle, const int outFreq, const std::string &solverDesc="", const std::string &precondDesc="")
 Create a new "output status test" object.
static Teuchos::RCP
< StatusTest< Scalar, MV, OP > > 
initConvTest (const magnitude_type convTol, const bool haveLeftPreconditioner, const std::string &implicitScaleType, const std::string &explicitScaleType, Teuchos::RCP< StatusTest< Scalar, MV, OP > > userConvTest)
 Create a new convergence test.
static Teuchos::RCP
< StatusTest< Scalar, MV, OP > > 
initStatusTest (Teuchos::RCP< StatusTest< Scalar, MV, OP > > convTest, const int maxIters)
 Create a new stopping criterion ("StatusTest") object.
static Teuchos::RCP
< OutputManager< Scalar > > 
initOutputManager (const Teuchos::RCP< OutputManager< Scalar > > &outMan, const MsgType verbosity, const Teuchos::RCP< std::ostream > &outStream)
 Create or reinitialize the given output manager.

Private Attributes

Teuchos::RCP< LinearProblem
< Scalar, MV, OP > > 
problem_
 The linear problem to solve.
Teuchos::RCP< OutputManager
< Scalar > > 
outMan_
 Output manager.
Teuchos::RCP
< Teuchos::ParameterList
params_
 Current parameters for this solver manager instance.
Teuchos::RCP< StatusTest
< Scalar, MV, OP > > 
convTest_
 Convergence stopping criterion for the current solve.
Teuchos::RCP< StatusTest
< Scalar, MV, OP > > 
statusTest_
 Cumulative stopping criterion for the current solve.
Teuchos::RCP< StatusTest
< Scalar, MV, OP > > 
userConvTest_
 User-defined custom convergence test.
Teuchos::RCP< StatusTestOutput
< Scalar, MV, OP > > 
outTest_
 "Status test" that outputs intermediate iteration results.
Teuchos::RCP< const
OrthoManager< Scalar, MV > > 
orthoMan_
 The orthogonalization method to use for GMRES.
Teuchos::RCP< iteration_typeiter_
 Instance of the Belos::Iteration subclass.
std::vector< std::pair< int,
int > > 
totalNumIters_
 After calling solve(): For each right-hand side, the total number of restart cycle(s) (first element in the pair), and the total number of iterations over all the restart cycle(s) (second element in the pair).
bool debug_
 Whether or not to print debug output.

Constructors and destructor

 GmresSolMgr (const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &problem, const Teuchos::RCP< Teuchos::ParameterList > &params, const bool debug=false)
 Preferred constructor.
 GmresSolMgr ()
 Default constructor; defers setting parameters.
virtual ~GmresSolMgr ()
 Destructor, defined virtual for safe inheritance.

"Get" methods

const LinearProblem< Scalar,
MV, OP > & 
getProblem () const
 Const reference to the linear problem being solved.
Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const
 Valid default parameters for this solver manager.
Teuchos::RCP< const
Teuchos::ParameterList
getCurrentParameters () const
 Current parameters for this solver manager instance.
int getNumIters () const
 Iteration count for the most recent call to solve().
bool isLOADetected () const
 Was a loss of accuracy detected?
std::vector< std::pair< int,
int > > 
totalNumIters () const
 Last solve's number of restarts and total iterations.
static Teuchos::RCP< const
Teuchos::ParameterList
getDefaultParameters ()
 Valid default parameters for this solver manager.

"Set" methods

void setProblem (const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &problem)
 Set the linear problem to solve.
void setParameters (const Teuchos::RCP< Teuchos::ParameterList > &params)
 Set parameters for solving the linear problem.
void setUserConvStatusTest (const Teuchos::RCP< StatusTest< Scalar, MV, OP > > &userConvTest)
 Set a user-defined convergence stopping criterion.

"Reset" methods

void reset (const ResetType type)
 Reset the solver manager.

Solver application methods

ReturnType solve ()
 Attempt to solve the linear system $AX=B$.
void setRHS (const Teuchos::RCP< const MV > &B)
 Change the right-hand side of the linear system to solve.
void setLHS (const Teuchos::RCP< MV > &X)
 Change the initial guess of the linear system to solve.
void changeStoppingCriteria (const magnitude_type convTol, const int maxItersPerRestart, const int maxNumRestarts)
 Change stopping criteria for next invocation of solve().

Detailed Description

template<class Scalar, class MV, class OP>
class Belos::GmresSolMgr< Scalar, MV, OP >

Solver manager for CA-GMRES and standard GMRES.

Author:
Mark Hoemmen
Note:
If you are a new Belos user and just want standard GMRES, use PseudoBlockGmresSolMgr. If you want Flexible GMRES, use BlockGmresSolMgr with the appropriate option set.
Warning:
This is EXPERIMENTAL CODE. DO NOT RELY ON THIS CODE. The interface or implementation may change at any time.

Definition at line 73 of file BelosGmresSolMgr.hpp.


Member Typedef Documentation

template<class Scalar, class MV, class OP>
typedef Scalar Belos::GmresSolMgr< Scalar, MV, OP >::scalar_type

Definition at line 75 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::GmresSolMgr< Scalar, MV, OP >::magnitude_type

Definition at line 76 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef MV Belos::GmresSolMgr< Scalar, MV, OP >::multivector_type

Definition at line 77 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef OP Belos::GmresSolMgr< Scalar, MV, OP >::operator_type

Definition at line 78 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef MultiVecTraits<Scalar,MV> Belos::GmresSolMgr< Scalar, MV, OP >::MVT [private]

Definition at line 81 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef OperatorTraits<Scalar,MV,OP> Belos::GmresSolMgr< Scalar, MV, OP >::OPT [private]

Definition at line 82 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef Teuchos::ScalarTraits<Scalar> Belos::GmresSolMgr< Scalar, MV, OP >::STS [private]

Definition at line 83 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef Teuchos::ScalarTraits<magnitude_type> Belos::GmresSolMgr< Scalar, MV, OP >::STM [private]

Definition at line 84 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
typedef GmresBaseIteration<Scalar, MV, OP> Belos::GmresSolMgr< Scalar, MV, OP >::iteration_type [private]

Definition at line 85 of file BelosGmresSolMgr.hpp.


Constructor & Destructor Documentation

template<class Scalar, class MV, class OP>
Belos::GmresSolMgr< Scalar, MV, OP >::GmresSolMgr ( const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &  problem,
const Teuchos::RCP< Teuchos::ParameterList > &  params,
const bool  debug = false 
) [inline]

Preferred constructor.

Parameters:
problem[in/out] The linear problem to solve.
params[in/out] Parameters for the solve. If null, we use defaults, else we modify in place.

Definition at line 96 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Belos::GmresSolMgr< Scalar, MV, OP >::GmresSolMgr ( ) [inline]

Default constructor; defers setting parameters.

Definition at line 106 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
virtual Belos::GmresSolMgr< Scalar, MV, OP >::~GmresSolMgr ( ) [inline, virtual]

Destructor, defined virtual for safe inheritance.

Definition at line 112 of file BelosGmresSolMgr.hpp.


Member Function Documentation

template<class Scalar, class MV, class OP>
const LinearProblem<Scalar,MV,OP>& Belos::GmresSolMgr< Scalar, MV, OP >::getProblem ( ) const [inline, virtual]

Const reference to the linear problem being solved.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 120 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP< const Teuchos::ParameterList > Belos::GmresSolMgr< Scalar, MV, OP >::getDefaultParameters ( ) [static]

Valid default parameters for this solver manager.

This class method is preferred to the instance method, because you can call it before you've instantiated the solver manager, and pass the parameters into the solver manager's constructor.

Warning:
This routine is not reentrant. It caches the default parameter list for later reuse.

Definition at line 763 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<const Teuchos::ParameterList> Belos::GmresSolMgr< Scalar, MV, OP >::getValidParameters ( ) const [inline, virtual]

Valid default parameters for this solver manager.

The class method getDefaultParameters() is preferred, since it may be called before the solver manager has been instantiated.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 139 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<const Teuchos::ParameterList> Belos::GmresSolMgr< Scalar, MV, OP >::getCurrentParameters ( ) const [inline, virtual]

Current parameters for this solver manager instance.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 144 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
int Belos::GmresSolMgr< Scalar, MV, OP >::getNumIters ( ) const [inline, virtual]

Iteration count for the most recent call to solve().

It's not entirely clear what the SolutionManager interface expects this to mean. We've interpreted it to mean the maximum (over all right-hand side(s)) of the total number of iterations over all restart cycle(s).

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 154 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
bool Belos::GmresSolMgr< Scalar, MV, OP >::isLOADetected ( ) const [inline, virtual]

Was a loss of accuracy detected?

Some GMRES-type solvers have the capability to detect loss of accuracy. If this solver does not, this method always returns false. If the solver does have this capability, this flag starts out false, and will be (re)set the next time solve() is called.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 168 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
std::vector<std::pair<int, int> > Belos::GmresSolMgr< Scalar, MV, OP >::totalNumIters ( ) const [inline]

Last solve's number of restarts and total iterations.

After calling solve(), you may call this method. For each right-hand side solved, it returns (total number of restart cycles, total number of iterations over all restart cycles). Before calling solve(), the result of calling this method is undefined.

Definition at line 180 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
void Belos::GmresSolMgr< Scalar, MV, OP >::setProblem ( const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &  problem) [inline, virtual]

Set the linear problem to solve.

This method restarts the current solve that might be in progress.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 193 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::setParameters ( const Teuchos::RCP< Teuchos::ParameterList > &  params) [virtual]

Set parameters for solving the linear problem.

If necessary, this method restarts (by calling reset(Belos::Problem)) the current solve that might be in progress. Currently, it does so only if the parameters have not yet been set, or if the maximum number of iterations has changed (which affects GMRES storage).

Parameters:
params[in] New parameters for the linear solve. This may be modified in place on output in order to fill in missing parameters with default values.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 887 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::setUserConvStatusTest ( const Teuchos::RCP< StatusTest< Scalar, MV, OP > > &  userConvTest) [virtual]

Set a user-defined convergence stopping criterion.

This test will be applied in short-circuiting Boolean AND sequence after the other convergence tests. All convergence tests are invoked (in short-circuiting Boolean OR fashion) after testing whether the maximum number of iterations has been exceeded.

Parameters:
userConvTest[in] The user-defined convergence stopping criterion.

Reimplemented from Belos::SolverManager< Scalar, MV, OP >.

Definition at line 1067 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::reset ( const ResetType  type) [virtual]

Reset the solver manager.

"Reset" with type = Belos::Problem means the following:

  • Tell the LinearProblem instance to recompute initial residual(s) (both left-preconditioned, if applicable, and unpreconditioned) with its stored current approximate solution
  • Restart GMRES, using the newly (re)computed residual vector(s).

This method does not currently support values of type for which (type & Belos::RecycleSubspace) != 0.

Parameters:
type[in] The type of reset to perform. Only type = Belos::Problem is currently supported.

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 1266 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
ReturnType Belos::GmresSolMgr< Scalar, MV, OP >::solve ( ) [virtual]

Attempt to solve the linear system $AX=B$.

Do so by calling the underlying linear solver's iterate() routine zero or more times, until the problem has been solved (as decided by the solver manager) or the solver manager decides to quit.

Returns:
ReturnType enum specifying Converged (the linear problem was solved to the desired tolerance) or Unconverged (the linear problem was not thusly solved).

Implements Belos::SolverManager< Scalar, MV, OP >.

Definition at line 1316 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
void Belos::GmresSolMgr< Scalar, MV, OP >::setRHS ( const Teuchos::RCP< const MV > &  B) [inline]

Change the right-hand side of the linear system to solve.

This works like a special case of setProblem(), when the only part of the problem that has changed is the right-hand side, and the new right-hand side is in the same vector space as the previous right-hand side. This avoids possibly expensive reinitialization of things like the orthogonalization manager. The initial guess will be left the same; in fact, if solve() has been called before, the initial guess will be the approximate solution from the last invocation of solve().

Note:
This does _not_ create a new LinearProblem instance. The LinearProblem reference returned by getProblem() will still be valid and will still point to the original LinearProblem, except that the original LinearProblem's right-hand side will be different. The original right-hand side will not be overwritten, though, so it will not go away if you retain an RCP to it.

Definition at line 285 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
void Belos::GmresSolMgr< Scalar, MV, OP >::setLHS ( const Teuchos::RCP< MV > &  X) [inline]

Change the initial guess of the linear system to solve.

This works like a special case of setProblem(), when the only part of the problem that has changed is the initial guess, and the new initial guess is in the same vector space as the previous initial guess. This avoids possibly expensive reinitialization of things like the orthogonalization manager.

Note:
This does _not_ create a new LinearProblem instance. The LinearProblem reference returned by getProblem() will still be valid and will still point to the original LinearProblem, except that the original LinearProblem's initial guess will be different. The original initial guess will not be overwritten, though, so it will not go away if you retain an RCP to it.

Definition at line 313 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
void Belos::GmresSolMgr< Scalar, MV, OP >::changeStoppingCriteria ( const magnitude_type  convTol,
const int  maxItersPerRestart,
const int  maxNumRestarts 
) [inline]

Change stopping criteria for next invocation of solve().

Parameters:
convTol[in] The new convergence tolerance. Interpretation of this depends on how the residual norm test(s) were initially set up.
maxItersPerRestart[in] Maximum number of iterations per restart cycle.
maxNumRestarts[in] Maximum number of restart cycle(s).

Definition at line 334 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::setParametersImpl ( const Teuchos::RCP< Teuchos::ParameterList > &  params) [private]

Set parameters for solving the linear problem.

If necessary, this method restarts (by calling reset(Belos::Problem)) the current solve that might be in progress. Currently, it does so only if the parameters have not yet been set, or if the maximum number of iterations has changed (which affects GMRES storage).

Parameters:
params[in/out] New parameters for the linear solve.

Definition at line 897 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::rebuildStatusTests ( Teuchos::RCP< Teuchos::ParameterList plist = Teuchos::null) [private]

(Re)build all the iteration stopping criteria.

Parameters:
plist[in/out] If supplied, read the parameters for constructing the stopping criteria from the given parameter list. Otherwise, use the solver manager's current parameter list (params_).

Definition at line 1081 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
void Belos::GmresSolMgr< Scalar, MV, OP >::rebuildStatusTests ( const magnitude_type  convTol,
const int  maxItersPerRestart 
) [private]

(Re)build all the iteration stopping criteria.

Variant of the one-argument rebuildStatusTests(), when you just want to change the convergence tolerance and maximum number of iterations per restart cycle. (The status tests don't control the maximum number of restarts.)

Parameters:
convTol[in] The new convergence tolerance. Interpretation of this depends on how the residual norm test(s) were initially set up.
maxItersPerRestart[in] Maximum number of iterations per restart cycle.
template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::rebuildOrthoManager ( Teuchos::RCP< Teuchos::ParameterList plist = Teuchos::null) [private]

Initialize the OrthoManager (orthogonalization method).

Parameters:
plist[in/out] If supplied, read the parameters for constructing the orthogonalization method from the given parameter list. Otherwise, use the solver manager's current parameter list (params_).

Definition at line 1165 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
void Belos::GmresSolMgr< Scalar, MV, OP >::rebuildIteration ( Teuchos::RCP< Teuchos::ParameterList plist = Teuchos::null) [private]

(Re)build the Iteration subclass.

Parameters:
plist[in/out] If supplied, read the parameters for constructing the Iteration subclass from the given parameter list. Otherwise, use the solver manager's current parameter list (params_).

Definition at line 1224 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
static Teuchos::RCP<LinearProblem<Scalar, MV, OP> > Belos::GmresSolMgr< Scalar, MV, OP >::validatedProblem ( const Teuchos::RCP< LinearProblem< Scalar, MV, OP > > &  problem) [inline, static, private]

Make sure that GmresSolMgr can solve the given problem.

If it can, return a validated version of the problem (the same instance, perhaps with setProblem() called. Otherwise, if the problemis invalid, throw an std::invalid_argument exception.

Warning:
This method does _not_ check whether the LinearProblem instance's setLSIndex() method has been called in order to set the current linear system(s) to solve. The GmresBaseIteration object cannot be (re)initialized until that is the case.

Definition at line 465 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
static ScaleType Belos::GmresSolMgr< Scalar, MV, OP >::stringToScaleType ( const std::string &  scaleType) [inline, static, private]

Convert string to enumerated type for residual test.

Definition at line 499 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP< StatusTestOutput< Scalar, MV, OP > > Belos::GmresSolMgr< Scalar, MV, OP >::initOutputTest ( const Teuchos::RCP< OutputManager< Scalar > > &  outMan,
const Teuchos::RCP< StatusTest< Scalar, MV, OP > > &  statusTest,
const OutputType  outStyle,
const int  outFreq,
const std::string &  solverDesc = "",
const std::string &  precondDesc = "" 
) [static, private]

Create a new "output status test" object.

The "output status test" knows how to generate "progress reports" of convergence as the iterations progress. Prerequisites for creating this are the "output manager" and the stopping criterion ("status test").

Note:
The output test is cheap enough to create that we just recreate it each time we change the settings, rather than trying to keep around its constituent components and change their settings.

Definition at line 627 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP< StatusTest< Scalar, MV, OP > > Belos::GmresSolMgr< Scalar, MV, OP >::initConvTest ( const magnitude_type  convTol,
const bool  haveLeftPreconditioner,
const std::string &  implicitScaleType,
const std::string &  explicitScaleType,
Teuchos::RCP< StatusTest< Scalar, MV, OP > >  userConvTest 
) [static, private]

Create a new convergence test.

The convergence test is a prerequisite for creating the final stopping criterion (StatusTest) object, which checks both the number of iterations and convergence.

Parameters:
convTol[in] Relative residual convergence tolerance.
haveLeftPreconditioner[in] Whether or not a left preconditioner has been provided.
implicitScaleType[in]
explicitScaleType[in]
userConvTest[in] If not null, a user-defined convergence test that will be performed sequentially after the maximum iteration count test and the implicit (and explicit) residual norm tests.
Returns:
Convergence test stopping criterion, which stops if both the relative residual error has dropped below the given level, and whether the user-supplied convergence test (if any) has passed.

Definition at line 668 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP< StatusTest< Scalar, MV, OP > > Belos::GmresSolMgr< Scalar, MV, OP >::initStatusTest ( Teuchos::RCP< StatusTest< Scalar, MV, OP > >  convTest,
const int  maxIters 
) [static, private]

Create a new stopping criterion ("StatusTest") object.

The stopping criterion is a prerequisite for creating the "output status test" object.

Parameters:
convTest[in] Convergence test, previously created by initConvTest.
maxIters[in] Maximum number of iterations to execute.
Returns:
Stopping criterion which succeeds if the given maximum iteration count has been reached, OR if the given convergence test has passed.

Definition at line 739 of file BelosGmresSolMgr.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP< OutputManager< Scalar > > Belos::GmresSolMgr< Scalar, MV, OP >::initOutputManager ( const Teuchos::RCP< OutputManager< Scalar > > &  outMan,
const MsgType  verbosity,
const Teuchos::RCP< std::ostream > &  outStream 
) [static, private]

Create or reinitialize the given output manager.

If outMan is null, create and return a new OutputManager with the given verbosity, that reports to the given output stream. If outMan is not null, set the verbosity and output stream of the OutputManager, and return the (pointer to the) OutputManager.

Parameters:
outMan[in/out] Either the output manager to reset, or null (if a new output manager is to be created).
verbosity[in] The new verbosity level.
outStream[in/out] The output stream to which the output manager should report. If null, std::cout is used.
Returns:
Output manager with verbosity and output stream set to the specified values.

Definition at line 607 of file BelosGmresSolMgr.hpp.


Member Data Documentation

template<class Scalar, class MV, class OP>
Teuchos::RCP<LinearProblem<Scalar, MV, OP> > Belos::GmresSolMgr< Scalar, MV, OP >::problem_ [private]

The linear problem to solve.

Definition at line 354 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<OutputManager<Scalar> > Belos::GmresSolMgr< Scalar, MV, OP >::outMan_ [private]

Output manager.

Definition at line 357 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<Teuchos::ParameterList> Belos::GmresSolMgr< Scalar, MV, OP >::params_ [private]

Current parameters for this solver manager instance.

Definition at line 360 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<StatusTest<Scalar,MV,OP> > Belos::GmresSolMgr< Scalar, MV, OP >::convTest_ [private]

Convergence stopping criterion for the current solve.

Definition at line 363 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<StatusTest<Scalar,MV,OP> > Belos::GmresSolMgr< Scalar, MV, OP >::statusTest_ [private]

Cumulative stopping criterion for the current solve.

Definition at line 366 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<StatusTest<Scalar,MV,OP> > Belos::GmresSolMgr< Scalar, MV, OP >::userConvTest_ [private]

User-defined custom convergence test.

When the caller sets this, the current status test (statusTest_) is modified to include the user-defined test in sequential AND fashion. Any previous user-defined status test is discarded.

Definition at line 374 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<StatusTestOutput<Scalar,MV,OP> > Belos::GmresSolMgr< Scalar, MV, OP >::outTest_ [private]

"Status test" that outputs intermediate iteration results.

Definition at line 377 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<const OrthoManager<Scalar, MV> > Belos::GmresSolMgr< Scalar, MV, OP >::orthoMan_ [private]

The orthogonalization method to use for GMRES.

Definition at line 380 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
Teuchos::RCP<iteration_type> Belos::GmresSolMgr< Scalar, MV, OP >::iter_ [private]

Instance of the Belos::Iteration subclass.

Definition at line 383 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
std::vector<std::pair<int, int> > Belos::GmresSolMgr< Scalar, MV, OP >::totalNumIters_ [private]

After calling solve(): For each right-hand side, the total number of restart cycle(s) (first element in the pair), and the total number of iterations over all the restart cycle(s) (second element in the pair).

Undefined if solve() has not yet been called.

Definition at line 390 of file BelosGmresSolMgr.hpp.

template<class Scalar, class MV, class OP>
bool Belos::GmresSolMgr< Scalar, MV, OP >::debug_ [private]

Whether or not to print debug output.

Definition at line 393 of file BelosGmresSolMgr.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines