10#ifndef BELOS_PCPG_SOLMGR_HPP
11#define BELOS_PCPG_SOLMGR_HPP
33#include "Teuchos_LAPACK.hpp"
34#ifdef BELOS_TEUCHOS_TIME_MONITOR
35# include "Teuchos_TimeMonitor.hpp"
37#if defined(HAVE_TEUCHOSCORE_CXX11)
38# include <type_traits>
112 template<
class ScalarType,
class MV,
class OP,
class DM = DefaultDenseMatrix<
int,ScalarType>,
113 const
bool supportsScalarType =
114 Belos::Details::LapackSupportsScalar<ScalarType>::value &&
115 ! Teuchos::ScalarTraits<ScalarType>::isComplex>
118 Belos::Details::LapackSupportsScalar<ScalarType>::value &&
119 ! Teuchos::ScalarTraits<ScalarType>::isComplex>
121 static const bool scalarTypeIsSupported =
123 ! Teuchos::ScalarTraits<ScalarType>::isComplex;
132 const Teuchos::RCP<Teuchos::ParameterList> &
pl) :
138 Teuchos::RCP<SolverManager<ScalarType, MV, OP, DM> >
clone ()
const override {
143 template<
class ScalarType,
class MV,
class OP,
class DM>
150 typedef Teuchos::ScalarTraits<ScalarType> SCT;
151 typedef typename Teuchos::ScalarTraits<ScalarType>::magnitudeType MagnitudeType;
152 typedef Teuchos::ScalarTraits<MagnitudeType> MT;
202 const Teuchos::RCP<Teuchos::ParameterList> &
pl );
208 virtual Teuchos::RCP<SolverManager<ScalarType, MV, OP, DM> >
clone ()
const {
224 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters()
const;
235 Teuchos::Array<Teuchos::RCP<Teuchos::Time> >
getTimers()
const {
236 return Teuchos::tuple(timerSolve_);
266 void setParameters(
const Teuchos::RCP<Teuchos::ParameterList> &
params );
315 std::string description()
const;
326 Teuchos::RCP<LinearProblem<ScalarType,MV,OP,DM> > problem_;
329 Teuchos::RCP<OutputManager<ScalarType> > printer_;
330 Teuchos::RCP<std::ostream> outputStream_;
333 Teuchos::RCP<StatusTest<ScalarType,MV,OP,DM> > sTest_;
334 Teuchos::RCP<StatusTestMaxIters<ScalarType,MV,OP,DM> > maxIterTest_;
335 Teuchos::RCP<StatusTestGenResNorm<ScalarType,MV,OP,DM> > convTest_;
336 Teuchos::RCP<StatusTestOutput<ScalarType,MV,OP,DM> > outputTest_;
337 Teuchos::RCP<StatusTest<ScalarType,MV,OP,DM> > debugStatusTest_;
340 Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP,DM> > ortho_;
343 Teuchos::RCP<Teuchos::ParameterList> params_;
346 static constexpr int maxIters_default_ = 1000;
347 static constexpr int deflatedBlocks_default_ = 2;
348 static constexpr int savedBlocks_default_ = 16;
351 static constexpr int outputFreq_default_ = -1;
352 static constexpr const char * label_default_ =
"Belos";
353 static constexpr const char * orthoType_default_ =
"ICGS";
360 MagnitudeType convtol_;
363 MagnitudeType orthoKappa_;
366 MagnitudeType achievedTol_;
374 int deflatedBlocks_, savedBlocks_, verbosity_, outputStyle_, outputFreq_;
375 std::string orthoType_;
378 Teuchos::RCP<MV> U_, C_, R_;
385 Teuchos::RCP<Teuchos::Time> timerSolve_;
393template<
class ScalarType,
class MV,
class OP,
class DM>
400 maxIters_(maxIters_default_),
401 deflatedBlocks_(deflatedBlocks_default_),
402 savedBlocks_(savedBlocks_default_),
403 verbosity_(verbosity_default_),
404 outputStyle_(outputStyle_default_),
405 outputFreq_(outputFreq_default_),
406 orthoType_(orthoType_default_),
408 label_(label_default_),
414template<
class ScalarType,
class MV,
class OP,
class DM>
417 const Teuchos::RCP<Teuchos::ParameterList> &
pl ) :
425 maxIters_(maxIters_default_),
426 deflatedBlocks_(deflatedBlocks_default_),
427 savedBlocks_(savedBlocks_default_),
428 verbosity_(verbosity_default_),
429 outputStyle_(outputStyle_default_),
430 outputFreq_(outputFreq_default_),
431 orthoType_(orthoType_default_),
433 label_(label_default_),
437 problem_.is_null (), std::invalid_argument,
438 "Belos::PCPGSolMgr two-argument constructor: "
439 "'problem' is null. You must supply a non-null Belos::LinearProblem "
440 "instance when calling this constructor.");
442 if (!
pl.is_null ()) {
449template<
class ScalarType,
class MV,
class OP,
class DM>
453 if (params_ == Teuchos::null) {
454 params_ = Teuchos::rcp(
new Teuchos::ParameterList(*getValidParameters()) );
457 params->validateParameters(*getValidParameters());
461 if (
params->isParameter(
"Maximum Iterations")) {
462 maxIters_ =
params->get(
"Maximum Iterations",maxIters_default_);
465 params_->set(
"Maximum Iterations", maxIters_);
466 if (maxIterTest_!=Teuchos::null)
467 maxIterTest_->setMaxIters( maxIters_ );
471 if (
params->isParameter(
"Num Saved Blocks")) {
472 savedBlocks_ =
params->get(
"Num Saved Blocks",savedBlocks_default_);
474 "Belos::PCPGSolMgr: \"Num Saved Blocks\" must be strictly positive.");
481 params_->set(
"Num Saved Blocks", savedBlocks_);
483 if (
params->isParameter(
"Num Deflated Blocks")) {
484 deflatedBlocks_ =
params->get(
"Num Deflated Blocks",deflatedBlocks_default_);
486 "Belos::PCPGSolMgr: \"Num Deflated Blocks\" must be positive.");
489 "Belos::PCPGSolMgr: \"Num Deflated Blocks\" must be <= \"Num Saved Blocks\".");
493 params_->set(
"Num Deflated Blocks",
static_cast<int>(deflatedBlocks_));
497 if (
params->isParameter(
"Timer Label")) {
503 params_->set(
"Timer Label", label_);
504 std::string
solveLabel = label_ +
": PCPGSolMgr total solve time";
505#ifdef BELOS_TEUCHOS_TIME_MONITOR
506 timerSolve_ = Teuchos::TimeMonitor::getNewCounter(
solveLabel);
508 if (ortho_ != Teuchos::null) {
509 ortho_->setLabel( label_ );
515 if (
params->isParameter(
"Verbosity")) {
516 if (Teuchos::isParameterType<int>(*
params,
"Verbosity")) {
517 verbosity_ =
params->get(
"Verbosity", verbosity_default_);
519 verbosity_ = (
int)Teuchos::getParameter<Belos::MsgType>(*
params,
"Verbosity");
523 params_->set(
"Verbosity", verbosity_);
524 if (printer_ != Teuchos::null)
525 printer_->setVerbosity(verbosity_);
529 if (
params->isParameter(
"Output Style")) {
530 if (Teuchos::isParameterType<int>(*
params,
"Output Style")) {
531 outputStyle_ =
params->get(
"Output Style", outputStyle_default_);
533 outputStyle_ = (
int)Teuchos::getParameter<Belos::OutputType>(*
params,
"Output Style");
537 params_->set(
"Output Style", outputStyle_);
538 outputTest_ = Teuchos::null;
542 if (
params->isParameter(
"Output Stream")) {
543 outputStream_ = Teuchos::getParameter<Teuchos::RCP<std::ostream> >(*
params,
"Output Stream");
546 params_->set(
"Output Stream", outputStream_);
547 if (printer_ != Teuchos::null)
548 printer_->setOStream( outputStream_ );
553 if (
params->isParameter(
"Output Frequency")) {
554 outputFreq_ =
params->get(
"Output Frequency", outputFreq_default_);
558 params_->set(
"Output Frequency", outputFreq_);
559 if (outputTest_ != Teuchos::null)
560 outputTest_->setOutputFrequency( outputFreq_ );
564 if (printer_ == Teuchos::null) {
570 if (
params->isParameter(
"Orthogonalization")) {
577 params_->set(
"Orthogonalization", orthoType_);
580 if (
params->isParameter(
"Orthogonalization Constant")) {
581 if (
params->isType<MagnitudeType> (
"Orthogonalization Constant")) {
582 orthoKappa_ =
params->get (
"Orthogonalization Constant",
586 orthoKappa_ =
params->get (
"Orthogonalization Constant",
591 params_->set(
"Orthogonalization Constant",orthoKappa_);
592 if (orthoType_==
"DGKS") {
594 Teuchos::rcp_dynamic_cast<DGKSOrthoManager<ScalarType,MV,OP,DM> >(ortho_)->setDepTol( orthoKappa_ );
603 if (orthoType_==
"DGKS" && orthoKappa_ > 0) {
604 paramsOrtho = Teuchos::rcp(
new Teuchos::ParameterList());
608 ortho_ =
factory.makeMatOrthoManager (orthoType_, Teuchos::null, printer_, label_,
paramsOrtho);
616 if (
params->isParameter(
"Convergence Tolerance")) {
617 if (
params->isType<MagnitudeType> (
"Convergence Tolerance")) {
618 convtol_ =
params->get (
"Convergence Tolerance",
626 params_->set(
"Convergence Tolerance", convtol_);
627 if (convTest_ != Teuchos::null)
628 convTest_->setTolerance( convtol_ );
634 if (maxIterTest_ == Teuchos::null)
637 if (convTest_ == Teuchos::null)
638 convTest_ = Teuchos::rcp(
new StatusTestResNorm_t( convtol_, 1 ) );
640 sTest_ = Teuchos::rcp(
new StatusTestCombo_t( StatusTestCombo_t::OR, maxIterTest_, convTest_ ) );
646 if (Teuchos::nonnull(debugStatusTest_)) {
647 sTest_ = Teuchos::rcp(
new StatusTestCombo_t( StatusTestCombo_t::OR, sTest_, debugStatusTest_ ) );
660 if (timerSolve_ == Teuchos::null) {
661 std::string
solveLabel = label_ +
": PCPGSolMgr total solve time";
662#ifdef BELOS_TEUCHOS_TIME_MONITOR
663 timerSolve_ = Teuchos::TimeMonitor::getNewCounter(
solveLabel);
672template<
class ScalarType,
class MV,
class OP,
class DM>
673Teuchos::RCP<const Teuchos::ParameterList>
676 static Teuchos::RCP<const Teuchos::ParameterList>
validPL;
678 Teuchos::RCP<Teuchos::ParameterList>
pl = Teuchos::parameterList();
681 "The relative residual tolerance that needs to be achieved by the\n"
682 "iterative solver in order for the linear system to be declared converged.");
683 pl->set(
"Maximum Iterations",
static_cast<int>(maxIters_default_),
684 "The maximum number of iterations allowed for each\n"
685 "set of RHS solved.");
686 pl->set(
"Num Deflated Blocks",
static_cast<int>(deflatedBlocks_default_),
687 "The maximum number of vectors in the seed subspace." );
688 pl->set(
"Num Saved Blocks",
static_cast<int>(savedBlocks_default_),
689 "The maximum number of vectors saved from old Krylov subspaces." );
690 pl->set(
"Verbosity",
static_cast<int>(verbosity_default_),
691 "What type(s) of solver information should be outputted\n"
692 "to the output stream.");
693 pl->set(
"Output Style",
static_cast<int>(outputStyle_default_),
694 "What style is used for the solver information outputted\n"
695 "to the output stream.");
696 pl->set(
"Output Frequency",
static_cast<int>(outputFreq_default_),
697 "How often convergence information should be outputted\n"
698 "to the output stream.");
699 pl->set(
"Output Stream", Teuchos::rcpFromRef(std::cout),
700 "A reference-counted pointer to the output stream where all\n"
701 "solver output is sent.");
702 pl->set(
"Timer Label",
static_cast<const char *
>(label_default_),
703 "The string to use as a prefix for the timer labels.");
704 pl->set(
"Orthogonalization",
static_cast<const char *
>(orthoType_default_),
705 "The type of orthogonalization to use: DGKS, ICGS, IMGS");
707 "The constant used by DGKS orthogonalization to determine\n"
708 "whether another step of classical Gram-Schmidt is necessary.");
716template<
class ScalarType,
class MV,
class OP,
class DM>
721 if (!isSet_) { setParameters( params_ ); }
723 Teuchos::LAPACK<int,ScalarType> lapack;
728 "Belos::PCPGSolMgr::solve(): Linear problem is not a valid object.");
731 "Belos::PCPGSolMgr::solve(): Linear problem is not ready, setProblem() has not been called.");
734 int numRHS2Solve = MVT::GetNumberVecs( *(problem_->getRHS()) );
739 problem_->setLSIndex(
currIdx );
746 Teuchos::ParameterList
plist;
747 plist.set(
"Saved Blocks", savedBlocks_);
748 plist.set(
"Block Size", 1);
749 plist.set(
"Keep Diagonal",
true);
750 plist.set(
"Initialize Diagonal",
true);
755 Teuchos::RCP<PCPGIter<ScalarType,MV,OP,DM> >
pcpg_iter;
761#ifdef BELOS_TEUCHOS_TIME_MONITOR
762 Teuchos::TimeMonitor
slvtimer(*timerSolve_);
767 outputTest_->reset();
770 if (R_ == Teuchos::null)
771 R_ = MVT::Clone( *(problem_->getRHS()), 1 );
773 problem_->computeCurrResVec( &*R_ );
779 if( U_ != Teuchos::null ){
784 Teuchos::RCP<MV>
cur_soln_vec = problem_->getCurrLHSVec();
785 std::vector<MagnitudeType>
rnorm0(1);
786 MVT::MvNorm( *R_,
rnorm0 );
789 printer_->stream(
Debug) <<
"Solver Manager: dimU_ = " << dimU_ << std::endl;
790 Teuchos::RCP<DM> Z = DMT::Create( dimU_, 1 );
799 Teuchos::RCP<MV>
tempU = MVT::Clone( *R_, 1 );
804 std::vector<MagnitudeType>
rnorm(1);
805 MVT::MvNorm( *R_,
rnorm );
815 tempU = Teuchos::null;
826 if( U_ != Teuchos::null )
pcpgState.U = U_;
827 if( C_ != Teuchos::null )
pcpgState.C = C_;
828 if( dimU_ > 0 )
pcpgState.curDim = dimU_;
835 if( !dimU_ ) printer_->stream(
Debug) <<
" No recycled subspace available for RHS index " <<
currIdx[0] << std::endl << std::endl;
838 if( dimU_ > savedBlocks_ )
839 printer_->stream(
Debug) <<
"Error: dimU_ = " << dimU_ <<
" > savedBlocks_ = " << savedBlocks_ << std::endl;
845 printer_->stream(
Debug) <<
"********** Calling iterate...\n" << std::endl;
853 if ( convTest_->getStatus() ==
Passed ) {
862 else if ( maxIterTest_->getStatus() ==
Passed ) {
873 else if (Teuchos::nonnull(debugStatusTest_) &&
874 debugStatusTest_->getStatus() ==
Passed) {
892 "Belos::PCPGSolMgr::solve(): Invalid return from PCPGIter::iterate().");
898 achievedTol_ = MT::one();
899 Teuchos::RCP<MV>
X = problem_->getLHS();
900 MVT::MvInit( *
X, SCT::zero() );
901 printer_->stream(
Warnings) <<
"Belos::PCPG::solve(): Warning! NaN has been detected!"
905 catch (
const std::exception &
e) {
907 printer_->stream(
Errors) <<
"Error! Caught exception in PCPGIter::iterate() at iteration "
909 <<
e.what() << std::endl;
916 problem_->updateSolution(
update,
true );
919 problem_->setCurrLS();
927 printer_->stream(
Debug) <<
"SolverManager: dimU_ " << dimU_ <<
" prevUdim= " <<
q << std::endl;
929 if(
q > deflatedBlocks_ )
930 printer_->stream(
Debug) <<
"SolverManager: Error deflatedBlocks = " << deflatedBlocks_ << std::endl;
941 printer_->stream(
Debug) <<
" rank decreased in ARRQR, something to do? " << std::endl;
947 if( dimU_ > deflatedBlocks_ ){
949 if( !deflatedBlocks_ ){
952 dimU_ = deflatedBlocks_;
958 Teuchos::RCP<MV>
Uorth;
971 Teuchos::RCP<DM> R = DMT::Create(dimU_,dimU_);
973 DMT::SyncDeviceToHost( *R );
979 "Belos::PCPGSolMgr::solve(): Failed to compute orthonormal basis for initial recycled subspace.");
987 if( problem_->isHermitian() )
lrwork = dimU_;
989 std::vector<ScalarType>
Svec(dimU_);
991 lapack.GESVD(
'N',
'O',
992 DMT::GetNumRows(*R), DMT::GetNumCols(*R), DMT::GetRawHostPtr(*R), DMT::GetStride(*R),
1000 "Belos::PCPGSolMgr::solve(): LAPACK _GESVD failed to compute singular values.");
1002 DMT::SyncHostToDevice( *R );
1004 if(
work[0] != 67. * dimU_ )
1005 printer_->stream(
Debug) <<
" SVD " << dimU_ <<
" lwork " <<
work[0] << std::endl;
1006 for(
int i=0;
i< dimU_;
i++)
1007 printer_->stream(
Debug) <<
i <<
" " <<
Svec[
i] << std::endl;
1009 Teuchos::RCP<DM>
wholeV = DMT::CreateCopy( *R,
true );
1013 startCol = dimU_ - deflatedBlocks_;
1018 std::vector<int>
def_cols( deflatedBlocks_ );
1028 dimU_ = deflatedBlocks_;
1030 printer_->stream(
Debug) <<
" Generated recycled subspace using RHS index " <<
currIdx[0] <<
" of dimension " << dimU_ << std::endl << std::endl;
1033 problem_->setCurrLS();
1041 problem_->setLSIndex(
currIdx );
1053#ifdef BELOS_TEUCHOS_TIME_MONITOR
1058 Teuchos::TimeMonitor::summarize( printer_->stream(
TimingDetails) );
1063 using Teuchos::rcp_dynamic_cast;
1070 "Belos::PCPGSolMgr::solve(): The convergence test's getTestValue() "
1071 "method returned NULL. Please report this bug to the Belos developers.");
1074 "Belos::PCPGSolMgr::solve(): The convergence test's getTestValue() "
1075 "method returned a vector of length zero. Please report this bug to the "
1076 "Belos developers.");
1085 numIters_ = maxIterTest_->getNumIters();
1096template<
class ScalarType,
class MV,
class OP,
class DM>
1105 Teuchos::RCP<DM> alpha = DMT::Create( 1, 1 );
1106 std::vector<int>
curind(1);
1107 std::vector<int> ipiv(
p -
q);
1108 std::vector<ScalarType>
Pivots(
p);
1113 for(
i =
q ;
i <
p ;
i++ ){
1118 anorm =
one / Teuchos::ScalarTraits<ScalarType>::squareroot( D[
i-
q] ) ;
1119 MVT::MvScale( *P,
anorm );
1120 MVT::MvScale( *AP,
anorm );
1124 for(
i =
q ;
i <
p ;
i++ ){
1125 if(
q <
i &&
i <
p-1 ){
1128 for(
j =
i+1 ;
j <
p ;
j++ ){
1129 const int k = ipiv[
j-
q];
1150 MVT::MvTransMv(
one, *P, *AP, *alpha);
1151 DMT::SyncDeviceToHost( *alpha );
1152 anorm = Teuchos::ScalarTraits<ScalarType>::squareroot( DMT::ValueConst(*alpha,0,0) ) ;
1162 printer_->stream(
Errors) <<
"ARRQR: Bad case not implemented" << std::endl;
1165 printer_->stream(
Errors) <<
"ARRQR : deficient case not implemented " << std::endl;
1175 MVT::MvScale( *P,
anorm );
1176 MVT::MvScale( *AP,
anorm );
1178 for(
j =
i+1 ;
j <
p ;
j++ ){
1182 MVT::MvTransMv(
one, *
Q, *AP, *alpha);
1183 DMT::SyncDeviceToHost(*alpha);
1184 MVT::MvAddMv( -DMT::ValueConst(*alpha,0,0), *P,
one, *
Q, *
Q );
1186 MVT::MvAddMv( -DMT::ValueConst(*alpha,0,0), *AP,
one, *
AQ, *
AQ );
1187 gamma = (
Pivots[
l] - DMT::ValueConst(*alpha,0,0))*(
Pivots[
l] + DMT::ValueConst(*alpha,0,0));
1189 Pivots[
l] = Teuchos::ScalarTraits<ScalarType>::squareroot(
gamma );
1200template<
class ScalarType,
class MV,
class OP,
class DM>
1203 std::ostringstream
oss;
1204 oss <<
"Belos::PCPGSolMgr<...,"<<Teuchos::ScalarTraits<ScalarType>::name()<<
">";
1206 oss <<
"Ortho Type='"<<orthoType_;
1213#ifdef HAVE_BELOS_TPETRA
1216#define BELOS_TPETRA_PCPGSOLMGR_NOEXTERN_CALL(SC, LO, GO, NT) \
1217 BELOS_TPETRA_CALL(Belos::PCPGSolMgr, SC, LO, GO, NT)
1219#define BELOS_TPETRA_PCPGSOLMGR_EXTERN_CALL(SC, LO, GO, NT) \
1220 BELOS_TPETRA_EXTERN_CALL(Belos::PCPGSolMgr, SC, LO, GO, NT)
1222TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(BELOS_TPETRA_PCPGSOLMGR_EXTERN_CALL)
Belos header file which uses auto-configuration information to include necessary C++ headers.
Full specialization of Belos::DenseMatTraits for Kokkos::DualView with arbitrary scalarType....
Class which describes the linear problem to be solved by the iterative solver.
Class which manages the output and verbosity of the Belos solvers.
Belos concrete class to iterate Preconditioned Conjugate Projected Gradients.
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 class for specifying a maximum number of iterations.
A factory class for generating StatusTestOutput objects.
Full specialization of Belos::DenseMatTraits for Teuchos::SerialDenseMatrix with ordinal type int and...
Collection of types and exceptions used within the Belos solvers.
Parent class to all Belos exceptions.
Type traits class that says whether Teuchos::LAPACK has a valid implementation for the given ScalarTy...
Base class for Belos::SolverManager subclasses which normally can only compile with real ScalarType t...
Alternative run-time polymorphic interface for operators.
Operator()
Default constructor (does nothing).
int getNumIters() const
Get the iteration count for the most recent call to solve().
void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP, DM > > &problem)
Set the linear problem that needs to be solved.
const LinearProblem< ScalarType, MV, OP, DM > & getProblem() const
Get current linear problem being solved for in this object.
virtual ~PCPGSolMgr()
Destructor.
void setDebugStatusTest(const Teuchos::RCP< StatusTest< ScalarType, MV, OP, DM > > &debugStatusTest) override
Set a debug status test, OR-combined into the top-level status test.
MagnitudeType achievedTol() const
Tolerance achieved by the last solve() invocation.
Teuchos::Array< Teuchos::RCP< Teuchos::Time > > getTimers() const
Return the timers for this object.
Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const
Get a parameter list containing the current parameters for this object.
virtual Teuchos::RCP< SolverManager< ScalarType, MV, OP, DM > > clone() const
clone for Inverted Injection (DII)
bool isLOADetected() const
Return whether a loss of accuracy was detected by this solver during the most current solve.
void reset(const ResetType type)
Performs a reset of the solver manager specified by the ResetType. This informs the solver manager th...
PCPG iterative linear solver.
Teuchos::RCP< SolverManager< ScalarType, MV, OP, DM > > clone() const override
clone for Inverted Injection (DII)
PCPGSolMgr(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP, DM > > &problem, const Teuchos::RCP< Teuchos::ParameterList > &pl)
PCPGSolMgrLAPACKFailure is thrown when a nonzero value is retuned from an LAPACK call.
PCPGSolMgrLAPACKFailure(const std::string &what_arg)
PCPGSolMgrLinearProblemFailure is thrown when the linear problem is not setup (i.e.
PCPGSolMgrLinearProblemFailure(const std::string &what_arg)
PCPGSolMgrOrthoFailure is thrown when the orthogonalization manager is unable to generate orthonormal...
PCPGSolMgrOrthoFailure(const std::string &what_arg)
ReturnType
Whether the Belos solve converged for all linear systems.
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.