42#ifndef BELOS_BLOCK_GMRES_SOLMGR_HPP
43#define BELOS_BLOCK_GMRES_SOLMGR_HPP
66#ifdef BELOS_TEUCHOS_TIME_MONITOR
67#include "Teuchos_TimeMonitor.hpp"
121template<
class ScalarType,
class MV,
class OP>
127 typedef Teuchos::ScalarTraits<ScalarType>
SCT;
128 typedef typename Teuchos::ScalarTraits<ScalarType>::magnitudeType
MagnitudeType;
129 typedef Teuchos::ScalarTraits<MagnitudeType>
MT;
164 const Teuchos::RCP<Teuchos::ParameterList> &pl );
170 Teuchos::RCP<SolverManager<ScalarType, MV, OP> >
clone ()
const override {
197 Teuchos::Array<Teuchos::RCP<Teuchos::Time> >
getTimers()
const {
234 void setParameters(
const Teuchos::RCP<Teuchos::ParameterList> ¶ms )
override;
284 describe (Teuchos::FancyOStream& out,
285 const Teuchos::EVerbosityLevel verbLevel =
286 Teuchos::Describable::verbLevel_default)
const override;
299 Teuchos::RCP<LinearProblem<ScalarType,MV,OP> >
problem_;
307 Teuchos::RCP<StatusTest<ScalarType,MV,OP> >
sTest_;
314 Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP> >
ortho_;
355template<
class ScalarType,
class MV,
class OP>
360 achievedTol_(Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<ScalarType>::magnitudeType>::zero()),
384template<
class ScalarType,
class MV,
class OP>
387 const Teuchos::RCP<Teuchos::ParameterList> &pl) :
392 achievedTol_(Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<ScalarType>::magnitudeType>::zero()),
414 TEUCHOS_TEST_FOR_EXCEPTION(
problem_ == Teuchos::null, std::invalid_argument,
"Problem not given to solver manager.");
417 if ( !is_null(pl) ) {
424template<
class ScalarType,
class MV,
class OP>
425Teuchos::RCP<const Teuchos::ParameterList>
428 static Teuchos::RCP<const Teuchos::ParameterList> validPL;
429 if (is_null(validPL)) {
430 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
435 "The relative residual tolerance that needs to be achieved by the\n"
436 "iterative solver in order for the linear system to be declared converged." );
438 "The maximum number of restarts allowed for each\n"
439 "set of RHS solved.");
441 "The maximum number of block iterations allowed for each\n"
442 "set of RHS solved.");
444 "The maximum number of blocks allowed in the Krylov subspace\n"
445 "for each set of RHS solved.");
447 "The number of vectors in each block. This number times the\n"
448 "number of blocks is the total Krylov subspace dimension.");
450 "Whether the solver manager should adapt the block size\n"
451 "based on the number of RHS to solve.");
453 "What type(s) of solver information should be outputted\n"
454 "to the output stream.");
456 "What style is used for the solver information outputted\n"
457 "to the output stream.");
459 "How often convergence information should be outputted\n"
460 "to the output stream.");
461 pl->set(
"Output Stream", Teuchos::rcpFromRef(std::cout),
462 "A reference-counted pointer to the output stream where all\n"
463 "solver output is sent.");
465 "When convergence information is printed, only show the maximum\n"
466 "relative residual norm when the block size is greater than one.");
468 "Whether the solver manager should use the flexible variant\n"
471 "Whether the explicitly computed residual should be used in the convergence test.");
473 "The type of scaling used in the implicit residual convergence test.");
475 "The type of scaling used in the explicit residual convergence test.");
477 "The string to use as a prefix for the timer labels.");
479 "The type of orthogonalization to use: DGKS, ICGS, or IMGS.");
481 "The constant used by DGKS orthogonalization to determine\n"
482 "whether another step of classical Gram-Schmidt is necessary.");
489template<
class ScalarType,
class MV,
class OP>
494 if (
params_ == Teuchos::null) {
502 if (params->isParameter(
"Maximum Restarts")) {
510 if (params->isParameter(
"Maximum Iterations")) {
520 if (params->isParameter(
"Block Size")) {
522 TEUCHOS_TEST_FOR_EXCEPTION(
blockSize_ <= 0, std::invalid_argument,
523 "Belos::BlockGmresSolMgr: \"Block Size\" must be strictly positive.");
530 if (params->isParameter(
"Adaptive Block Size")) {
538 if (params->isParameter(
"Num Blocks")) {
540 TEUCHOS_TEST_FOR_EXCEPTION(
numBlocks_ <= 0, std::invalid_argument,
541 "Belos::BlockGmresSolMgr: \"Num Blocks\" must be strictly positive.");
548 if (params->isParameter(
"Timer Label")) {
549 std::string tempLabel = params->get(
"Timer Label",
label_default_);
552 if (tempLabel !=
label_) {
555 std::string solveLabel =
label_ +
": BlockGmresSolMgr total solve time";
556#ifdef BELOS_TEUCHOS_TIME_MONITOR
557 timerSolve_ = Teuchos::TimeMonitor::getNewCounter(solveLabel);
559 if (
ortho_ != Teuchos::null) {
566 if (params->isParameter(
"Flexible Gmres")) {
567 isFlexible_ = Teuchos::getParameter<bool>(*params,
"Flexible Gmres");
576 if (params->isParameter(
"Verbosity")) {
577 if (Teuchos::isParameterType<int>(*params,
"Verbosity")) {
580 verbosity_ = (int)Teuchos::getParameter<Belos::MsgType>(*params,
"Verbosity");
590 if (params->isParameter(
"Output Style")) {
591 if (Teuchos::isParameterType<int>(*params,
"Output Style")) {
594 outputStyle_ = (int)Teuchos::getParameter<Belos::OutputType>(*params,
"Output Style");
605 if (params->isParameter(
"Output Stream")) {
606 outputStream_ = Teuchos::getParameter<Teuchos::RCP<std::ostream> >(*params,
"Output Stream");
616 if (params->isParameter(
"Output Frequency")) {
632 bool changedOrthoType =
false;
633 if (params->isParameter(
"Orthogonalization")) {
637 changedOrthoType =
true;
643 if (params->isParameter(
"Orthogonalization Constant")) {
644 if (params->isType<
MagnitudeType> (
"Orthogonalization Constant")) {
645 orthoKappa_ = params->get (
"Orthogonalization Constant",
649 orthoKappa_ = params->get (
"Orthogonalization Constant",
657 Teuchos::rcp_dynamic_cast<DGKSOrthoManager<ScalarType,MV,OP> >(
ortho_)->setDepTol(
orthoKappa_ );
663 if (
ortho_ == Teuchos::null || changedOrthoType) {
665 Teuchos::RCP<Teuchos::ParameterList> paramsOrtho;
674 if (params->isParameter(
"Convergence Tolerance")) {
675 if (params->isType<
MagnitudeType> (
"Convergence Tolerance")) {
676 convtol_ = params->get (
"Convergence Tolerance",
692 if (params->isParameter(
"Implicit Residual Scaling")) {
693 std::string tempImpResScale = Teuchos::getParameter<std::string>( *params,
"Implicit Residual Scaling" );
706 catch (std::exception& e) {
714 if (params->isParameter(
"Explicit Residual Scaling")) {
715 std::string tempExpResScale = Teuchos::getParameter<std::string>( *params,
"Explicit Residual Scaling" );
728 catch (std::exception& e) {
736 if (params->isParameter(
"Explicit Residual Test")) {
737 expResTest_ = Teuchos::getParameter<bool>( *params,
"Explicit Residual Test" );
746 if (params->isParameter(
"Show Maximum Residual Norm Only")) {
747 showMaxResNormOnly_ = Teuchos::getParameter<bool>(*params,
"Show Maximum Residual Norm Only");
760 std::string solveLabel =
label_ +
": BlockGmresSolMgr total solve time";
761#ifdef BELOS_TEUCHOS_TIME_MONITOR
762 timerSolve_ = Teuchos::TimeMonitor::getNewCounter(solveLabel);
771template<
class ScalarType,
class MV,
class OP>
790 "Belos::BlockGmresSolMgr::solve(): Linear problem has a left preconditioner, not a right preconditioner, which is required for flexible GMRES.");
802 Teuchos::RCP<StatusTestGenResNorm_t> tmpImpConvTest =
803 Teuchos::rcp(
new StatusTestGenResNorm_t(
convtol_ ) );
809 Teuchos::RCP<StatusTestGenResNorm_t> tmpExpConvTest =
810 Teuchos::rcp(
new StatusTestGenResNorm_t(
convtol_ ) );
811 tmpExpConvTest->defineResForm( StatusTestGenResNorm_t::Explicit,
Belos::TwoNorm );
823 Teuchos::RCP<StatusTestGenResNorm_t> tmpImpConvTest =
824 Teuchos::rcp(
new StatusTestGenResNorm_t(
convtol_ ) );
832 Teuchos::RCP<StatusTestImpResNorm_t> tmpImpConvTest =
833 Teuchos::rcp(
new StatusTestImpResNorm_t(
convtol_ ) );
859 std::string solverDesc =
" Block Gmres ";
861 solverDesc =
"Flexible" + solverDesc;
870template<
class ScalarType,
class MV,
class OP>
880template<
class ScalarType,
class MV,
class OP>
891 "Belos::BlockGmresSolMgr::solve(): Linear problem is not a valid object.");
894 "Belos::BlockGmresSolMgr::solve(): Linear problem is not ready, setProblem() has not been called.");
898 "Belos::BlockGmresSolMgr::solve(): Linear problem and requested status tests are incompatible.");
906 std::vector<int> currIdx;
911 currIdx.resize( numCurrRHS );
912 for (
int i=0; i<numCurrRHS; ++i)
913 { currIdx[i] = startPtr+i; }
918 for (
int i=0; i<numCurrRHS; ++i)
919 { currIdx[i] = startPtr+i; }
929 Teuchos::ParameterList plist;
934 int tmpNumBlocks = 0;
940 "Belos::BlockGmresSolMgr::solve(): Warning! Requested Krylov subspace dimension is larger than operator dimension!"
941 << std::endl <<
" The maximum number of blocks allowed for the Krylov subspace will be adjusted to " << tmpNumBlocks << std::endl;
942 plist.set(
"Num Blocks",tmpNumBlocks);
952 bool isConverged =
true;
957 Teuchos::RCP<GmresIteration<ScalarType,MV,OP> > block_gmres_iter;
966#ifdef BELOS_TEUCHOS_TIME_MONITOR
970 while ( numRHS2Solve > 0 ) {
974 int tmpNumBlocks = 0;
979 block_gmres_iter->setSize(
blockSize_, tmpNumBlocks );
985 block_gmres_iter->resetNumIters();
991 Teuchos::RCP<MV> V_0;
996 problem_->computeCurrResVec( &*V_0 );
1006 problem_->computeCurrPrecResVec( &*V_0 );
1014 Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > z_0 =
1018 int rank =
ortho_->normalize( *V_0, z_0 );
1020 "Belos::BlockGmresSolMgr::solve(): Failed to compute initial block of orthonormal vectors.");
1027 block_gmres_iter->initializeGmres(newstate);
1028 int numRestarts = 0;
1033 block_gmres_iter->iterate();
1045 "Belos::BlockGmresSolMgr::solve(): Warning! Solver has experienced a loss of accuracy!" << std::endl;
1046 isConverged =
false;
1057 isConverged =
false;
1065 else if ( block_gmres_iter->getCurSubspaceDim() == block_gmres_iter->getMaxSubspaceDim() ) {
1068 isConverged =
false;
1073 printer_->stream(
Debug) <<
" Performing restart number " << numRestarts <<
" of " <<
maxRestarts_ << std::endl << std::endl;
1076 Teuchos::RCP<MV> update = block_gmres_iter->getCurrentUpdate();
1079 Teuchos::RCP<MV> curX =
problem_->getCurrLHSVec();
1083 problem_->updateSolution( update,
true );
1092 problem_->computeCurrResVec( &*V_0 );
1094 problem_->computeCurrPrecResVec( &*V_0 );
1097 z_0 = Teuchos::rcp(
new Teuchos::SerialDenseMatrix<int,ScalarType>(
blockSize_,
blockSize_ ) );
1100 rank =
ortho_->normalize( *V_0, z_0 );
1102 "Belos::BlockGmresSolMgr::solve(): Failed to compute initial block of orthonormal vectors after restart.");
1108 block_gmres_iter->initializeGmres(newstate);
1120 TEUCHOS_TEST_FOR_EXCEPTION(
true,std::logic_error,
1121 "Belos::BlockGmresSolMgr::solve(): Invalid return from BlockGmresIter::iterate().");
1127 printer_->stream(
Errors) <<
"Error! Caught std::exception in BlockGmresIter::iterate() at iteration "
1128 << block_gmres_iter->getNumIters() << std::endl
1129 << e.what() << std::endl;
1131 isConverged =
false;
1136 block_gmres_iter->updateLSQR( block_gmres_iter->getCurSubspaceDim() );
1139 sTest_->checkStatus( &*block_gmres_iter );
1141 isConverged =
false;
1145 catch (
const std::exception &e) {
1146 printer_->stream(
Errors) <<
"Error! Caught std::exception in BlockGmresIter::iterate() at iteration "
1147 << block_gmres_iter->getNumIters() << std::endl
1148 << e.what() << std::endl;
1157 Teuchos::RCP<MV> update = block_gmres_iter->getCurrentUpdate();
1158 Teuchos::RCP<MV> curX =
problem_->getCurrLHSVec();
1160 if (update != Teuchos::null)
1165 if ( !Teuchos::is_null(
expConvTest_->getSolution()) ) {
1167 Teuchos::RCP<MV> curX =
problem_->getCurrLHSVec();
1171 Teuchos::RCP<MV> update = block_gmres_iter->getCurrentUpdate();
1172 problem_->updateSolution( update,
true );
1180 startPtr += numCurrRHS;
1181 numRHS2Solve -= numCurrRHS;
1182 if ( numRHS2Solve > 0 ) {
1187 currIdx.resize( numCurrRHS );
1188 for (
int i=0; i<numCurrRHS; ++i)
1189 { currIdx[i] = startPtr+i; }
1193 for (
int i=0; i<numCurrRHS; ++i)
1194 { currIdx[i] = startPtr+i; }
1196 { currIdx[i] = -1; }
1202 currIdx.resize( numRHS2Solve );
1213#ifdef BELOS_TEUCHOS_TIME_MONITOR
1236 const std::vector<MagnitudeType>* pTestValues = NULL;
1239 if (pTestValues == NULL || pTestValues->size() < 1) {
1247 TEUCHOS_TEST_FOR_EXCEPTION(pTestValues == NULL, std::logic_error,
1248 "Belos::BlockGmresSolMgr::solve(): The implicit convergence test's "
1249 "getTestValue() method returned NULL. Please report this bug to the "
1250 "Belos developers.");
1251 TEUCHOS_TEST_FOR_EXCEPTION(pTestValues->size() < 1, std::logic_error,
1252 "Belos::BlockGmresSolMgr::solve(): The implicit convergence test's "
1253 "getTestValue() method returned a vector of length zero. Please report "
1254 "this bug to the Belos developers.");
1259 achievedTol_ = *std::max_element (pTestValues->begin(), pTestValues->end());
1269template<
class ScalarType,
class MV,
class OP>
1272 std::ostringstream out;
1273 out <<
"\"Belos::BlockGmresSolMgr\": {";
1274 if (this->getObjectLabel () !=
"") {
1275 out <<
"Label: " << this->getObjectLabel () <<
", ";
1277 out <<
"Flexible: " << (
isFlexible_ ?
"true" :
"false")
1279 <<
", Maximum Iterations: " <<
maxIters_
1281 <<
", Convergence Tolerance: " <<
convtol_
1287template<
class ScalarType,
class MV,
class OP>
1290describe (Teuchos::FancyOStream &out,
1291 const Teuchos::EVerbosityLevel verbLevel)
const
1293 using Teuchos::TypeNameTraits;
1294 using Teuchos::VERB_DEFAULT;
1295 using Teuchos::VERB_NONE;
1296 using Teuchos::VERB_LOW;
1303 const Teuchos::EVerbosityLevel vl =
1304 (verbLevel == VERB_DEFAULT) ? VERB_LOW : verbLevel;
1306 if (vl != VERB_NONE) {
1307 Teuchos::OSTab tab0 (out);
1309 out <<
"\"Belos::BlockGmresSolMgr\":" << endl;
1310 Teuchos::OSTab tab1 (out);
1311 out <<
"Template parameters:" << endl;
1313 Teuchos::OSTab tab2 (out);
1314 out <<
"ScalarType: " << TypeNameTraits<ScalarType>::name () << endl
1315 <<
"MV: " << TypeNameTraits<MV>::name () << endl
1316 <<
"OP: " << TypeNameTraits<OP>::name () << endl;
1318 if (this->getObjectLabel () !=
"") {
1319 out <<
"Label: " << this->getObjectLabel () << endl;
1321 out <<
"Flexible: " << (
isFlexible_ ?
"true" :
"false") << endl
1323 <<
"Maximum Iterations: " <<
maxIters_ << endl
1325 <<
"Convergence Tolerance: " <<
convtol_ << endl;
Belos concrete class for performing the block, flexible GMRES iteration.
Belos concrete class for performing the block GMRES iteration.
Belos header file which uses auto-configuration information to include necessary C++ headers.
Pure virtual base class which augments the basic interface for a Gmres linear solver iteration.
Class which describes the linear problem to be solved by the iterative solver.
Class which manages the output and verbosity of the Belos solvers.
Pure virtual base class which describes the basic interface for a solver manager.
Belos::StatusTest for logically combining several status tests.
Belos::StatusTestResNorm for specifying general residual norm stopping criteria.
Belos::StatusTest for specifying an implicit residual norm stopping criteria that checks for loss of ...
Belos::StatusTest class for specifying a maximum number of iterations.
A factory class for generating StatusTestOutput objects.
Virtual base class for StatusTest that printing status tests.
Collection of types and exceptions used within the Belos solvers.
BelosError(const std::string &what_arg)
This class implements the block flexible GMRES iteration, where a block Krylov subspace is constructe...
This class implements the block GMRES iteration, where a block Krylov subspace is constructed....
BlockGmresSolMgrLinearProblemFailure is thrown when the linear problem is not setup (i....
BlockGmresSolMgrLinearProblemFailure(const std::string &what_arg)
BlockGmresSolMgrOrthoFailure is thrown when the orthogonalization manager is unable to generate ortho...
BlockGmresSolMgrOrthoFailure(const std::string &what_arg)
void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem) override
Set the linear problem that needs to be solved.
int getNumIters() const override
Get the iteration count for the most recent call to solve().
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const override
Print the object with the given verbosity level to a FancyOStream.
static constexpr int outputStyle_default_
static constexpr bool flexibleGmres_default_
static constexpr int numBlocks_default_
OperatorTraits< ScalarType, MV, OP > OPT
void setDebugStatusTest(const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &debugStatusTest) override
Set a debug status test that will be checked at the same time as the top-level status test.
Teuchos::RCP< OutputManager< ScalarType > > printer_
static constexpr bool adaptiveBlockSize_default_
ReturnType solve() override
This method performs possibly repeated calls to the underlying linear solver's iterate() routine unti...
MagnitudeType achievedTol_
static constexpr const char * impResScale_default_
Teuchos::Array< Teuchos::RCP< Teuchos::Time > > getTimers() const
Return the timers for this object.
Teuchos::RCP< std::ostream > outputStream_
Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > problem_
std::string description() const override
Return a one-line description of this object.
static constexpr const char * expResScale_default_
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > sTest_
static constexpr bool showMaxResNormOnly_default_
Teuchos::RCP< MatOrthoManager< ScalarType, MV, OP > > ortho_
static constexpr const char * label_default_
Teuchos::ScalarTraits< MagnitudeType > MT
MagnitudeType achievedTol() const override
Tolerance achieved by the last solve() invocation.
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > debugStatusTest_
void setParameters(const Teuchos::RCP< Teuchos::ParameterList > ¶ms) override
Set the parameters the solver manager should use to solve the linear problem.
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > convTest_
Teuchos::RCP< StatusTestOutput< ScalarType, MV, OP > > outputTest_
MagnitudeType orthoKappa_
Teuchos::RCP< StatusTestMaxIters< ScalarType, MV, OP > > maxIterTest_
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
Get a parameter list containing the valid parameters for this object.
Teuchos::RCP< SolverManager< ScalarType, MV, OP > > clone() const override
clone for Inverted Injection (DII)
static constexpr int maxRestarts_default_
Teuchos::RCP< StatusTestResNorm< ScalarType, MV, OP > > expConvTest_
MultiVecTraits< ScalarType, MV > MVT
Teuchos::RCP< Teuchos::Time > timerSolve_
Teuchos::RCP< StatusTestResNorm< ScalarType, MV, OP > > impConvTest_
Teuchos::RCP< Teuchos::ParameterList > params_
static constexpr int outputFreq_default_
static constexpr bool expResTest_default_
Teuchos::ScalarTraits< ScalarType >::magnitudeType MagnitudeType
Teuchos::ScalarTraits< ScalarType > SCT
static constexpr int blockSize_default_
static constexpr int maxIters_default_
BlockGmresSolMgr()
Empty constructor for BlockGmresSolMgr. This constructor takes no arguments and sets the default valu...
virtual ~BlockGmresSolMgr()
Destructor.
Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const override
Get a parameter list containing the current parameters for this object.
static constexpr const char * orthoType_default_
void reset(const ResetType type) override
Performs a reset of the solver manager specified by the ResetType. This informs the solver manager th...
static constexpr int verbosity_default_
bool isLOADetected() const override
Return whether a loss of accuracy was detected by this solver during the most current solve.
const LinearProblem< ScalarType, MV, OP > & getProblem() const override
Get current linear problem being solved for in this object.
GmresIterationOrthoFailure is thrown when the GmresIteration object is unable to compute independent ...
Traits class which defines basic operations on multivectors.
static Teuchos::RCP< MV > CloneCopy(const MV &mv)
Creates a new MV and copies contents of mv into the new vector (deep copy).
static ptrdiff_t GetGlobalLength(const MV &mv)
Return the number of rows in the given multivector mv.
static Teuchos::RCP< MV > Clone(const MV &mv, const int numvecs)
Creates a new empty MV containing numvecs columns.
static void MvAddMv(const ScalarType alpha, const MV &A, const ScalarType beta, const MV &B, MV &mv)
Replace mv with .
static int GetNumberVecs(const MV &mv)
Obtain the number of vectors in mv.
Class which defines basic traits for the operator type.
Enumeration of all valid Belos (Mat)OrthoManager classes.
Teuchos::RCP< Belos::MatOrthoManager< Scalar, MV, OP > > makeMatOrthoManager(const std::string &ortho, const Teuchos::RCP< const OP > &M, const Teuchos::RCP< OutputManager< Scalar > > &, const std::string &label, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Return an instance of the specified MatOrthoManager subclass.
Belos's basic output manager for sending information of select verbosity levels to the appropriate ou...
SolverManager()
Empty constructor.
A class for extending the status testing capabilities of Belos via logical combinations.
An implementation of StatusTestResNorm using a family of residual norms.
Convergence test using the implicit residual norm(s), with an explicit residual norm(s) check for los...
A Belos::StatusTest class for specifying a maximum number of iterations.
A factory class for generating StatusTestOutput objects.
Teuchos::RCP< StatusTestOutput< ScalarType, MV, OP > > create(const Teuchos::RCP< OutputManager< ScalarType > > &printer, Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test, int mod, int printStates)
Create the StatusTestOutput object specified by the outputStyle.
A pure virtual class for defining the status tests for the Belos iterative solvers.
ScaleType convertStringToScaleType(const std::string &scaleType)
Convert the given string to its ScaleType enum value.
ReturnType
Whether the Belos solve converged for all linear systems.
ScaleType
The type of scaling to use on the residual norm value.
ResetType
How to reset the solver.
Default parameters common to most Belos solvers.
static const double convTol
Default convergence tolerance.
static const double orthoKappa
DGKS orthogonalization constant.
Structure to contain pointers to GmresIteration state variables.
Teuchos::RCP< const MV > V
The current Krylov basis.
Teuchos::RCP< const Teuchos::SerialDenseMatrix< int, ScalarType > > z
The current right-hand side of the least squares system RY = Z.
int curDim
The current dimension of the reduction.