10 #ifndef BELOS_PCPG_SOLMGR_HPP
11 #define BELOS_PCPG_SOLMGR_HPP
31 #ifdef BELOS_TEUCHOS_TIME_MONITOR
34 #if defined(HAVE_TEUCHOSCORE_CXX11)
35 # include <type_traits>
36 #endif // defined(HAVE_TEUCHOSCORE_CXX11)
109 template<
class ScalarType,
class MV,
class OP,
110 const bool supportsScalarType =
115 Belos::Details::LapackSupportsScalar<ScalarType>::value &&
116 ! Teuchos::ScalarTraits<ScalarType>::isComplex>
140 template<
class ScalarType,
class MV,
class OP>
232 return Teuchos::tuple(timerSolve_);
303 std::string description()
const;
333 static constexpr
int maxIters_default_ = 1000;
334 static constexpr
int deflatedBlocks_default_ = 2;
335 static constexpr
int savedBlocks_default_ = 16;
338 static constexpr
int outputFreq_default_ = -1;
339 static constexpr
const char * label_default_ =
"Belos";
340 static constexpr
const char * orthoType_default_ =
"ICGS";
361 int deflatedBlocks_, savedBlocks_,
verbosity_, outputStyle_, outputFreq_;
380 template<
class ScalarType,
class MV,
class OP>
382 outputStream_(Teuchos::rcpFromRef(std::cout)),
387 maxIters_(maxIters_default_),
388 deflatedBlocks_(deflatedBlocks_default_),
389 savedBlocks_(savedBlocks_default_),
390 verbosity_(verbosity_default_),
391 outputStyle_(outputStyle_default_),
392 outputFreq_(outputFreq_default_),
393 orthoType_(orthoType_default_),
395 label_(label_default_),
401 template<
class ScalarType,
class MV,
class OP>
406 outputStream_(Teuchos::rcpFromRef(std::cout)),
412 maxIters_(maxIters_default_),
413 deflatedBlocks_(deflatedBlocks_default_),
414 savedBlocks_(savedBlocks_default_),
415 verbosity_(verbosity_default_),
416 outputStyle_(outputStyle_default_),
417 outputFreq_(outputFreq_default_),
418 orthoType_(orthoType_default_),
420 label_(label_default_),
424 problem_.is_null (), std::invalid_argument,
425 "Belos::PCPGSolMgr two-argument constructor: "
426 "'problem' is null. You must supply a non-null Belos::LinearProblem "
427 "instance when calling this constructor.");
436 template<
class ScalarType,
class MV,
class OP>
449 maxIters_ = params->
get(
"Maximum Iterations",maxIters_default_);
452 params_->set(
"Maximum Iterations", maxIters_);
454 maxIterTest_->setMaxIters( maxIters_ );
459 savedBlocks_ = params->
get(
"Num Saved Blocks",savedBlocks_default_);
461 "Belos::PCPGSolMgr: \"Num Saved Blocks\" must be strictly positive.");
468 params_->set(
"Num Saved Blocks", savedBlocks_);
471 deflatedBlocks_ = params->
get(
"Num Deflated Blocks",deflatedBlocks_default_);
473 "Belos::PCPGSolMgr: \"Num Deflated Blocks\" must be positive.");
476 "Belos::PCPGSolMgr: \"Num Deflated Blocks\" must be <= \"Num Saved Blocks\".");
480 params_->set(
"Num Deflated Blocks", static_cast<int>(deflatedBlocks_));
485 std::string tempLabel = params->
get(
"Timer Label", label_default_);
488 if (tempLabel != label_) {
490 params_->set(
"Timer Label", label_);
491 std::string solveLabel = label_ +
": PCPGSolMgr total solve time";
492 #ifdef BELOS_TEUCHOS_TIME_MONITOR
496 ortho_->setLabel( label_ );
503 if (Teuchos::isParameterType<int>(*params,
"Verbosity")) {
504 verbosity_ = params->
get(
"Verbosity", verbosity_default_);
506 verbosity_ = (int)Teuchos::getParameter<Belos::MsgType>(*params,
"Verbosity");
510 params_->set(
"Verbosity", verbosity_);
512 printer_->setVerbosity(verbosity_);
517 if (Teuchos::isParameterType<int>(*params,
"Output Style")) {
518 outputStyle_ = params->
get(
"Output Style", outputStyle_default_);
520 outputStyle_ = (int)Teuchos::getParameter<Belos::OutputType>(*params,
"Output Style");
524 params_->set(
"Output Style", outputStyle_);
530 outputStream_ = Teuchos::getParameter<Teuchos::RCP<std::ostream> >(*params,
"Output Stream");
533 params_->set(
"Output Stream", outputStream_);
535 printer_->setOStream( outputStream_ );
541 outputFreq_ = params->
get(
"Output Frequency", outputFreq_default_);
545 params_->set(
"Output Frequency", outputFreq_);
547 outputTest_->setOutputFrequency( outputFreq_ );
556 bool changedOrthoType =
false;
558 std::string tempOrthoType = params->
get(
"Orthogonalization",orthoType_default_);
559 if (tempOrthoType != orthoType_) {
560 orthoType_ = tempOrthoType;
561 changedOrthoType =
true;
564 params_->set(
"Orthogonalization", orthoType_);
567 if (params->
isParameter(
"Orthogonalization Constant")) {
569 orthoKappa_ = params->
get (
"Orthogonalization Constant",
573 orthoKappa_ = params->
get (
"Orthogonalization Constant",
578 params_->set(
"Orthogonalization Constant",orthoKappa_);
579 if (orthoType_==
"DGKS") {
580 if (orthoKappa_ > 0 && ortho_ !=
Teuchos::null && !changedOrthoType) {
590 if (orthoType_==
"DGKS" && orthoKappa_ > 0) {
592 paramsOrtho->
set (
"depTol", orthoKappa_ );
603 if (params->
isParameter(
"Convergence Tolerance")) {
605 convtol_ = params->
get (
"Convergence Tolerance",
613 params_->set(
"Convergence Tolerance", convtol_);
615 convTest_->setTolerance( convtol_ );
625 convTest_ =
Teuchos::rcp(
new StatusTestResNorm_t( convtol_, 1 ) );
627 sTest_ =
Teuchos::rcp(
new StatusTestCombo_t( StatusTestCombo_t::OR, maxIterTest_, convTest_ ) );
635 std::string solverDesc =
" PCPG ";
636 outputTest_->setSolverDesc( solverDesc );
640 std::string solveLabel = label_ +
": PCPGSolMgr total solve time";
641 #ifdef BELOS_TEUCHOS_TIME_MONITOR
651 template<
class ScalarType,
class MV,
class OP>
660 "The relative residual tolerance that needs to be achieved by the\n"
661 "iterative solver in order for the linear system to be declared converged.");
662 pl->
set(
"Maximum Iterations", static_cast<int>(maxIters_default_),
663 "The maximum number of iterations allowed for each\n"
664 "set of RHS solved.");
665 pl->
set(
"Num Deflated Blocks", static_cast<int>(deflatedBlocks_default_),
666 "The maximum number of vectors in the seed subspace." );
667 pl->
set(
"Num Saved Blocks", static_cast<int>(savedBlocks_default_),
668 "The maximum number of vectors saved from old Krylov subspaces." );
669 pl->
set(
"Verbosity", static_cast<int>(verbosity_default_),
670 "What type(s) of solver information should be outputted\n"
671 "to the output stream.");
672 pl->
set(
"Output Style", static_cast<int>(outputStyle_default_),
673 "What style is used for the solver information outputted\n"
674 "to the output stream.");
675 pl->
set(
"Output Frequency", static_cast<int>(outputFreq_default_),
676 "How often convergence information should be outputted\n"
677 "to the output stream.");
678 pl->
set(
"Output Stream", Teuchos::rcpFromRef(std::cout),
679 "A reference-counted pointer to the output stream where all\n"
680 "solver output is sent.");
681 pl->
set(
"Timer Label", static_cast<const char *>(label_default_),
682 "The string to use as a prefix for the timer labels.");
683 pl->
set(
"Orthogonalization", static_cast<const char *>(orthoType_default_),
684 "The type of orthogonalization to use: DGKS, ICGS, IMGS");
686 "The constant used by DGKS orthogonalization to determine\n"
687 "whether another step of classical Gram-Schmidt is necessary.");
695 template<
class ScalarType,
class MV,
class OP>
699 if (!isSet_) { setParameters( params_ ); }
706 "Belos::PCPGSolMgr::solve(): Linear problem is not a valid object.");
709 "Belos::PCPGSolMgr::solve(): Linear problem is not ready, setProblem() has not been called.");
712 int numRHS2Solve = MVT::GetNumberVecs( *(problem_->getRHS()) );
713 std::vector<int> currIdx(1);
719 problem_->setLSIndex( currIdx );
722 bool isConverged =
true;
727 plist.
set(
"Saved Blocks", savedBlocks_);
728 plist.
set(
"Block Size", 1);
729 plist.
set(
"Keep Diagonal",
true);
730 plist.
set(
"Initialize Diagonal",
true);
741 #ifdef BELOS_TEUCHOS_TIME_MONITOR
744 while ( numRHS2Solve > 0 ) {
747 outputTest_->reset();
751 R_ = MVT::Clone( *(problem_->getRHS()), 1 );
753 problem_->computeCurrResVec( &*R_ );
765 std::vector<MagnitudeType> rnorm0(1);
766 MVT::MvNorm( *R_, rnorm0 );
769 std::cout <<
"Solver Manager: dimU_ = " << dimU_ << std::endl;
773 std::vector<int> active_columns( dimU_ );
774 for (
int i=0; i < dimU_; ++i) active_columns[i] = i;
775 Uactive = MVT::CloneView(*U_, active_columns);
776 Cactive = MVT::CloneView(*C_, active_columns);
779 std::cout <<
" Solver Manager : check duality of seed basis " << std::endl;
781 MVT::MvTransMv( one, *Uactive, *Cactive, H );
782 H.
print( std::cout );
785 MVT::MvTransMv( one, *Uactive, *R_, Z );
787 MVT::MvTimesMatAddMv( one, *Uactive, Z, zero, *tempU );
788 MVT::MvAddMv( one, *tempU, one, *cur_soln_vec, *cur_soln_vec );
789 MVT::MvTimesMatAddMv( one, *Cactive, Z, zero, *tempU );
790 MVT::MvAddMv( -one, *tempU, one, *R_, *R_ );
791 std::vector<MagnitudeType> rnorm(1);
792 MVT::MvNorm( *R_, rnorm );
793 if( rnorm[0] < rnorm0[0] * .001 ){
794 MVT::MvTransMv( one, *Uactive, *R_, Z );
795 MVT::MvTimesMatAddMv( one, *Uactive, Z, zero, *tempU );
796 MVT::MvAddMv( one, *tempU, one, *cur_soln_vec, *cur_soln_vec );
797 MVT::MvTimesMatAddMv( one, *Cactive, Z, zero, *tempU );
798 MVT::MvAddMv( -one, *tempU, one, *R_, *R_ );
815 if( dimU_ > 0 ) pcpgState.
curDim = dimU_;
816 pcpg_iter->initialize(pcpgState);
822 if( !dimU_ ) printer_->stream(
Debug) <<
" No recycled subspace available for RHS index " << currIdx[0] << std::endl << std::endl;
823 pcpg_iter->resetNumIters();
825 if( dimU_ > savedBlocks_ )
826 std::cout <<
"Error: dimU_ = " << dimU_ <<
" > savedBlocks_ = " << savedBlocks_ << std::endl;
832 if( debug ) printf(
"********** Calling iterate...\n");
833 pcpg_iter->iterate();
840 if ( convTest_->getStatus() ==
Passed ) {
849 else if ( maxIterTest_->getStatus() ==
Passed ) {
864 "Belos::PCPGSolMgr::solve(): Invalid return from PCPGIter::iterate().");
869 achievedTol_ = MT::one();
871 MVT::MvInit( *X, SCT::zero() );
872 printer_->stream(
Warnings) <<
"Belos::PCPG::solve(): Warning! NaN has been detected!"
876 catch (
const std::exception &e) {
877 printer_->stream(
Errors) <<
"Error! Caught exception in PCPGIter::iterate() at iteration "
878 << pcpg_iter->getNumIters() << std::endl
879 << e.what() << std::endl;
886 problem_->updateSolution( update,
true );
889 problem_->setCurrLS();
897 std::cout <<
"SolverManager: dimU_ " << dimU_ <<
" prevUdim= " << q << std::endl;
899 if( q > deflatedBlocks_ )
900 std::cout <<
"SolverManager: Error deflatedBlocks = " << deflatedBlocks_ << std::endl;
911 rank = ARRQR(dimU_,q, *oldState.
D );
913 std::cout <<
" rank decreased in ARRQR, something to do? " << std::endl;
919 if( dimU_ > deflatedBlocks_ ){
921 if( !deflatedBlocks_ ){
924 dimU_ = deflatedBlocks_;
928 bool Harmonic =
false;
932 std::vector<int> active_cols( dimU_ );
933 for (
int i=0; i < dimU_; ++i) active_cols[i] = i;
936 Uorth = MVT::CloneCopy(*C_, active_cols);
939 Uorth = MVT::CloneCopy(*U_, active_cols);
944 rank = ortho_->normalize(*Uorth,
Teuchos::rcp(&R,
false));
951 "Belos::PCPGSolMgr::solve(): Failed to compute orthonormal basis for initial recycled subspace.");
960 if( problem_->isHermitian() ) lrwork = dimU_;
961 std::vector<ScalarType> work(lwork);
962 std::vector<ScalarType> Svec(dimU_);
963 std::vector<ScalarType> rwork(lrwork);
964 lapack.
GESVD(
'N',
'O',
973 "Belos::PCPGSolMgr::solve(): LAPACK _GESVD failed to compute singular values.");
975 if( work[0] != 67. * dimU_ )
976 std::cout <<
" SVD " << dimU_ <<
" lwork " << work[0] << std::endl;
977 for(
int i=0; i< dimU_; i++)
978 std::cout << i <<
" " << Svec[i] << std::endl;
982 int startRow = 0, startCol = 0;
984 startCol = dimU_ - deflatedBlocks_;
992 std::vector<int> active_columns( dimU_ );
993 std::vector<int> def_cols( deflatedBlocks_ );
994 for (
int i=0; i < dimU_; ++i) active_columns[i] = i;
995 for (
int i=0; i < deflatedBlocks_; ++i) def_cols[i] = i;
999 MVT::MvTimesMatAddMv( one, *Ucopy, V, zero, *Uactive );
1004 MVT::MvTimesMatAddMv( one, *Ccopy, V, zero, *Cactive );
1007 dimU_ = deflatedBlocks_;
1009 printer_->stream(
Debug) <<
" Generated recycled subspace using RHS index " << currIdx[0] <<
" of dimension " << dimU_ << std::endl << std::endl;
1012 problem_->setCurrLS();
1016 if ( numRHS2Solve > 0 ) {
1020 problem_->setLSIndex( currIdx );
1023 currIdx.resize( numRHS2Solve );
1032 #ifdef BELOS_TEUCHOS_TIME_MONITOR
1042 using Teuchos::rcp_dynamic_cast;
1045 const std::vector<MagnitudeType>* pTestValues =
1046 rcp_dynamic_cast<conv_test_type>(convTest_)->getTestValue();
1049 "Belos::PCPGSolMgr::solve(): The convergence test's getTestValue() "
1050 "method returned NULL. Please report this bug to the Belos developers.");
1053 "Belos::PCPGSolMgr::solve(): The convergence test's getTestValue() "
1054 "method returned a vector of length zero. Please report this bug to the "
1055 "Belos developers.");
1060 achievedTol_ = *std::max_element (pTestValues->begin(), pTestValues->end());
1064 numIters_ = maxIterTest_->getNumIters();
1075 template<
class ScalarType,
class MV,
class OP>
1086 std::vector<int> curind(1);
1087 std::vector<int> ipiv(p - q);
1088 std::vector<ScalarType> Pivots(p);
1090 ScalarType rteps = 1.5e-8;
1093 for( i = q ; i < p ; i++ ){
1096 RCP<MV> P = MVT::CloneViewNonConst(*U_,curind);
1097 RCP<MV> AP = MVT::CloneViewNonConst(*C_,curind);
1099 MVT::MvAddMv( anorm(0,0), *P, zero, *AP, *P );
1100 MVT::MvAddMv( zero, *P, anorm(0,0), *AP, *AP );
1104 for( i = q ; i < p ; i++ ){
1105 if( q < i && i < p-1 ){
1108 for( j = i+1 ; j < p ; j++ ){
1109 const int k = ipiv[j-q];
1110 if( Pivots[k] > Pivots[l] ){
1117 ipiv[imax-q] = ipiv[i-q];
1123 if( Pivots[k] > 1.5625e-2 ){
1124 anorm(0,0) = Pivots[k];
1128 RCP<const MV> P = MVT::CloneView(*U_,curind);
1129 RCP<const MV> AP = MVT::CloneView(*C_,curind);
1130 MVT::MvTransMv( one, *P, *AP, anorm );
1133 if( rteps <= anorm(0,0) && anorm(0,0) < 9.765625e-4){
1141 std::cout <<
"ARRQR: Bad case not implemented" << std::endl;
1143 if( anorm(0,0) < rteps ){
1144 std::cout <<
"ARRQR : deficient case not implemented " << std::endl;
1152 RCP<MV> P = MVT::CloneViewNonConst(*U_,curind);
1153 RCP<MV> AP = MVT::CloneViewNonConst(*C_,curind);
1154 MVT::MvAddMv( anorm(0,0), *P, zero, *AP, *P );
1155 MVT::MvAddMv( zero, *P, anorm(0,0), *AP, *AP );
1159 P = MVT::CloneViewNonConst(*U_,curind);
1160 AP = MVT::CloneViewNonConst(*C_,curind);
1161 for( j = i+1 ; j < p ; j++ ){
1164 RCP<MV> Q = MVT::CloneViewNonConst(*U_,curind);
1165 MVT::MvTransMv( one, *Q, *AP, alpha);
1166 MVT::MvAddMv( -alpha(0,0), *P, one, *Q, *Q );
1168 RCP<MV> AQ = MVT::CloneViewNonConst(*C_,curind);
1169 MVT::MvAddMv( -alpha(0,0), *AP, one, *AQ, *AQ );
1171 gamma(0,0) = ( Pivots[l] - alpha(0,0))*( Pivots[l] + alpha(0,0));
1172 if( gamma(0,0) > 0){
1184 template<
class ScalarType,
class MV,
class OP>
1187 std::ostringstream oss;
1190 oss <<
"Ortho Type='"<<orthoType_;
static const double orthoKappa
DGKS orthogonalization constant.
ScalarType * values() const
Collection of types and exceptions used within the Belos solvers.
int prevUdim
Number of block columns in matrices C and U before current iteration.
bool isLOADetected() const
Return whether a loss of accuracy was detected by this solver during the most current solve...
Belos's basic output manager for sending information of select verbosity levels to the appropriate ou...
PCPGSolMgr(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem, const Teuchos::RCP< Teuchos::ParameterList > &pl)
Class which manages the output and verbosity of the Belos solvers.
static const bool scalarTypeIsSupported
bool is_null(const boost::shared_ptr< T > &p)
Teuchos::RCP< StatusTestOutput< ScalarType, MV, OP > > outputTest_
Belos concrete class to iterate Preconditioned Conjugate Projected Gradients.
int numIters_
Number of iterations taken by the last solve() invocation.
PCPGSolMgrOrthoFailure is thrown when the orthogonalization manager is unable to generate orthonormal...
Teuchos::RCP< MV > R
The current residual.
T & get(ParameterList &l, const std::string &name)
bool is_null(const std::shared_ptr< T > &p)
Teuchos::RCP< MV > C
C = AU, U spans recycled subspace.
Base class for Belos::SolverManager subclasses which normally can only compile with real ScalarType t...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
A factory class for generating StatusTestOutput objects.
virtual std::ostream & print(std::ostream &os) const
int curDim
The current dimension of the reduction.
An implementation of StatusTestResNorm using a family of residual norms.
PCPGSolMgrOrthoFailure(const std::string &what_arg)
int maxIters_
Maximum iteration count (read from parameter list).
const LinearProblem< ScalarType, MV, OP > & getProblem() const
Get current linear problem being solved for in this object.
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
MagnitudeType orthoKappa_
Orthogonalization parameter (read from parameter list).
Structure to contain pointers to PCPGIter state variables.
Teuchos::RCP< Teuchos::Time > timerSolve_
PCPGSolMgrLinearProblemFailure is thrown when the linear problem is not setup (i.e.
static const double convTol
Default convergence tolerance.
Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > problem_
Belos::StatusTest class for specifying a maximum number of iterations.
Teuchos::RCP< std::ostream > outputStream_
static std::string name()
A factory class for generating StatusTestOutput objects.
Traits class which defines basic operations on multivectors.
Belos::StatusTest for logically combining several status tests.
Teuchos::RCP< const Teuchos::SerialDenseMatrix< int, ScalarType > > D
The current Hessenberg matrix.
bool isParameter(const std::string &name) const
Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const
Get a parameter list containing the current parameters for this object.
OperatorTraits< ScalarType, MV, OP > OPT
A Belos::StatusTest class for specifying a maximum number of iterations.
MagnitudeType achievedTol() const
Tolerance achieved by the last solve() invocation.
ResetType
How to reset the solver.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Pure virtual base class which describes the basic interface for a solver manager. ...
MagnitudeType convtol_
Convergence tolerance (read from parameter list).
void reset(const ResetType type)
Performs a reset of the solver manager specified by the ResetType. This informs the solver manager th...
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > sTest_
static void summarize(Ptr< const Comm< int > > comm, std::ostream &out=std::cout, const bool alwaysWriteLocal=false, const bool writeGlobalStats=true, const bool writeZeroTimers=true, const ECounterSetOp setOp=Intersection, const std::string &filter="", const bool ignoreZeroTimers=false)
bool is_null(const RCP< T > &p)
MagnitudeType achievedTol_
Tolerance achieved by the last solve() invocation.
A linear system to solve, and its associated information.
MultiVecTraits< ScalarType, MV > MVT
void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)
Set the linear problem that needs to be solved.
Class which describes the linear problem to be solved by the iterative solver.
PCPGSolMgrLAPACKFailure is thrown when a nonzero value is retuned from an LAPACK call.
virtual Teuchos::RCP< SolverManager< ScalarType, MV, OP > > clone() const
clone for Inverted Injection (DII)
PCPGSolMgrLAPACKFailure(const std::string &what_arg)
int getNumIters() const
Get the iteration count for the most recent call to solve().
Type traits class that says whether Teuchos::LAPACK has a valid implementation for the given ScalarTy...
ReturnType
Whether the Belos solve converged for all linear systems.
void validateParameters(ParameterList const &validParamList, int const depth=1000, EValidateUsed const validateUsed=VALIDATE_USED_ENABLED, EValidateDefaults const validateDefaults=VALIDATE_DEFAULTS_ENABLED) const
Teuchos::RCP< OutputManager< ScalarType > > printer_
Teuchos::RCP< MV > U
The recycled subspace.
Teuchos::Array< Teuchos::RCP< Teuchos::Time > > getTimers() const
Return the timers for this object.
OrdinalType numCols() const
Teuchos::ScalarTraits< ScalarType >::magnitudeType MagnitudeType
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.
void GESVD(const char &JOBU, const char &JOBVT, const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, MagnitudeType *S, ScalarType *U, const OrdinalType &ldu, ScalarType *V, const OrdinalType &ldv, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Teuchos::ScalarTraits< ScalarType > SCT
Belos::StatusTestResNorm for specifying general residual norm stopping criteria.
PCPG iterative linear solver.
bool isType(const std::string &name) const
An implementation of the Belos::MatOrthoManager that performs orthogonalization using (potentially) m...
A class for extending the status testing capabilities of Belos via logical combinations.
Teuchos::RCP< StatusTestGenResNorm< ScalarType, MV, OP > > convTest_
Teuchos::RCP< StatusTestMaxIters< ScalarType, MV, OP > > maxIterTest_
virtual ~PCPGSolMgr()
Destructor.
Class which defines basic traits for the operator type.
Parent class to all Belos exceptions.
Default parameters common to most Belos solvers.
Teuchos::RCP< MatOrthoManager< ScalarType, MV, OP > > ortho_
Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, scalarTypeIsSupported > base_type
Teuchos::RCP< SolverManager< ScalarType, MV, OP > > clone() const override
clone for Inverted Injection (DII)
This class implements the PCPG iteration, where a single-std::vector Krylov subspace is constructed...
Belos header file which uses auto-configuration information to include necessary C++ headers...
Teuchos::RCP< Teuchos::ParameterList > params_
PCPGSolMgrLinearProblemFailure(const std::string &what_arg)
OrdinalType numRows() const
Teuchos::ScalarTraits< MagnitudeType > MT
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.