42 #ifndef BELOS_BLOCK_CG_SOLMGR_HPP 43 #define BELOS_BLOCK_CG_SOLMGR_HPP 65 #include "Teuchos_BLAS.hpp" 66 #include "Teuchos_LAPACK.hpp" 67 #ifdef BELOS_TEUCHOS_TIME_MONITOR 68 # include "Teuchos_TimeMonitor.hpp" 70 #if defined(HAVE_TEUCHOSCORE_CXX11) 71 # include <type_traits> 72 #endif // defined(HAVE_TEUCHOSCORE_CXX11) 117 template<
class ScalarType,
class MV,
class OP,
118 const bool lapackSupportsScalarType =
123 static const bool requiresLapack =
133 const Teuchos::RCP<Teuchos::ParameterList>& pl) :
143 template<
class ScalarType,
class MV,
class OP>
147 #if defined(HAVE_TEUCHOSCORE_CXX11) 148 # if defined(HAVE_TEUCHOS_COMPLEX) 149 static_assert (std::is_same<ScalarType, std::complex<float> >::value ||
150 std::is_same<ScalarType, std::complex<double> >::value ||
151 std::is_same<ScalarType, float>::value ||
152 std::is_same<ScalarType, double>::value,
153 "Belos::GCRODRSolMgr: ScalarType must be one of the four " 154 "types (S,D,C,Z) supported by LAPACK.");
156 static_assert (std::is_same<ScalarType, float>::value ||
157 std::is_same<ScalarType, double>::value,
158 "Belos::GCRODRSolMgr: ScalarType must be float or double. " 159 "Complex arithmetic support is currently disabled. To " 160 "enable it, set Teuchos_ENABLE_COMPLEX=ON.");
161 # endif // defined(HAVE_TEUCHOS_COMPLEX) 162 #endif // defined(HAVE_TEUCHOSCORE_CXX11) 167 typedef Teuchos::ScalarTraits<ScalarType> SCT;
168 typedef typename Teuchos::ScalarTraits<ScalarType>::magnitudeType MagnitudeType;
169 typedef Teuchos::ScalarTraits<MagnitudeType> MT;
212 const Teuchos::RCP<Teuchos::ParameterList> &pl );
227 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters()
const;
238 Teuchos::Array<Teuchos::RCP<Teuchos::Time> >
getTimers()
const {
239 return Teuchos::tuple(timerSolve_);
269 void setParameters(
const Teuchos::RCP<Teuchos::ParameterList> ¶ms );
310 std::string description()
const;
317 Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > problem_;
320 Teuchos::RCP<OutputManager<ScalarType> > printer_;
322 Teuchos::RCP<std::ostream> outputStream_;
328 Teuchos::RCP<StatusTest<ScalarType,MV,OP> > sTest_;
331 Teuchos::RCP<StatusTestMaxIters<ScalarType,MV,OP> > maxIterTest_;
334 Teuchos::RCP<StatusTestGenResNorm<ScalarType,MV,OP> > convTest_;
337 Teuchos::RCP<StatusTestOutput<ScalarType,MV,OP> > outputTest_;
340 Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP> > ortho_;
343 Teuchos::RCP<Teuchos::ParameterList> params_;
348 static const MagnitudeType convtol_default_;
349 static const MagnitudeType orthoKappa_default_;
350 static const int maxIters_default_;
351 static const bool adaptiveBlockSize_default_;
352 static const bool showMaxResNormOnly_default_;
353 static const int blockSize_default_;
354 static const int verbosity_default_;
355 static const int outputStyle_default_;
356 static const int outputFreq_default_;
357 static const std::string label_default_;
358 static const std::string orthoType_default_;
359 static const Teuchos::RCP<std::ostream> outputStream_default_;
366 MagnitudeType convtol_;
369 MagnitudeType orthoKappa_;
376 MagnitudeType achievedTol_;
384 int blockSize_, verbosity_, outputStyle_, outputFreq_;
385 bool adaptiveBlockSize_, showMaxResNormOnly_;
386 std::string orthoType_;
392 Teuchos::RCP<Teuchos::Time> timerSolve_;
400 template<
class ScalarType,
class MV,
class OP>
403 template<
class ScalarType,
class MV,
class OP>
406 template<
class ScalarType,
class MV,
class OP>
409 template<
class ScalarType,
class MV,
class OP>
412 template<
class ScalarType,
class MV,
class OP>
415 template<
class ScalarType,
class MV,
class OP>
418 template<
class ScalarType,
class MV,
class OP>
421 template<
class ScalarType,
class MV,
class OP>
424 template<
class ScalarType,
class MV,
class OP>
427 template<
class ScalarType,
class MV,
class OP>
430 template<
class ScalarType,
class MV,
class OP>
433 template<
class ScalarType,
class MV,
class OP>
438 template<
class ScalarType,
class MV,
class OP>
440 outputStream_(outputStream_default_),
441 convtol_(convtol_default_),
442 orthoKappa_(orthoKappa_default_),
443 achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
444 maxIters_(maxIters_default_),
446 blockSize_(blockSize_default_),
447 verbosity_(verbosity_default_),
448 outputStyle_(outputStyle_default_),
449 outputFreq_(outputFreq_default_),
450 adaptiveBlockSize_(adaptiveBlockSize_default_),
451 showMaxResNormOnly_(showMaxResNormOnly_default_),
452 orthoType_(orthoType_default_),
453 label_(label_default_),
459 template<
class ScalarType,
class MV,
class OP>
462 const Teuchos::RCP<Teuchos::ParameterList> &pl) :
464 outputStream_(outputStream_default_),
465 convtol_(convtol_default_),
466 orthoKappa_(orthoKappa_default_),
467 achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
468 maxIters_(maxIters_default_),
470 blockSize_(blockSize_default_),
471 verbosity_(verbosity_default_),
472 outputStyle_(outputStyle_default_),
473 outputFreq_(outputFreq_default_),
474 adaptiveBlockSize_(adaptiveBlockSize_default_),
475 showMaxResNormOnly_(showMaxResNormOnly_default_),
476 orthoType_(orthoType_default_),
477 label_(label_default_),
480 TEUCHOS_TEST_FOR_EXCEPTION(problem_.is_null(), std::invalid_argument,
481 "BlockCGSolMgr's constructor requires a nonnull LinearProblem instance.");
486 if (! pl.is_null()) {
491 template<
class ScalarType,
class MV,
class OP>
497 if (params_ == Teuchos::null) {
498 params_ = Teuchos::rcp(
new Teuchos::ParameterList(*getValidParameters()) );
501 params->validateParameters(*getValidParameters());
505 if (params->isParameter(
"Maximum Iterations")) {
506 maxIters_ = params->get(
"Maximum Iterations",maxIters_default_);
509 params_->set(
"Maximum Iterations", maxIters_);
510 if (maxIterTest_!=Teuchos::null)
511 maxIterTest_->setMaxIters( maxIters_ );
515 if (params->isParameter(
"Block Size")) {
516 blockSize_ = params->get(
"Block Size",blockSize_default_);
517 TEUCHOS_TEST_FOR_EXCEPTION(blockSize_ <= 0, std::invalid_argument,
518 "Belos::BlockCGSolMgr: \"Block Size\" must be strictly positive.");
521 params_->set(
"Block Size", blockSize_);
525 if (params->isParameter(
"Adaptive Block Size")) {
526 adaptiveBlockSize_ = params->get(
"Adaptive Block Size",adaptiveBlockSize_default_);
529 params_->set(
"Adaptive Block Size", adaptiveBlockSize_);
533 if (params->isParameter(
"Timer Label")) {
534 std::string tempLabel = params->get(
"Timer Label", label_default_);
537 if (tempLabel != label_) {
539 params_->set(
"Timer Label", label_);
540 std::string solveLabel = label_ +
": BlockCGSolMgr total solve time";
541 #ifdef BELOS_TEUCHOS_TIME_MONITOR 542 timerSolve_ = Teuchos::TimeMonitor::getNewCounter(solveLabel);
544 if (ortho_ != Teuchos::null) {
545 ortho_->setLabel( label_ );
551 if (params->isParameter(
"Orthogonalization")) {
552 std::string tempOrthoType = params->get(
"Orthogonalization",orthoType_default_);
553 TEUCHOS_TEST_FOR_EXCEPTION( tempOrthoType !=
"DGKS" && tempOrthoType !=
"ICGS" && tempOrthoType !=
"IMGS",
554 std::invalid_argument,
555 "Belos::BlockCGSolMgr: \"Orthogonalization\" must be either \"DGKS\", \"ICGS\", or \"IMGS\".");
556 if (tempOrthoType != orthoType_) {
557 orthoType_ = tempOrthoType;
559 if (orthoType_==
"DGKS") {
560 if (orthoKappa_ <= 0) {
568 else if (orthoType_==
"ICGS") {
571 else if (orthoType_==
"IMGS") {
578 if (params->isParameter(
"Orthogonalization Constant")) {
579 orthoKappa_ = params->get(
"Orthogonalization Constant",orthoKappa_default_);
582 params_->set(
"Orthogonalization Constant",orthoKappa_);
583 if (orthoType_==
"DGKS") {
584 if (orthoKappa_ > 0 && ortho_ != Teuchos::null) {
591 if (params->isParameter(
"Verbosity")) {
592 if (Teuchos::isParameterType<int>(*params,
"Verbosity")) {
593 verbosity_ = params->get(
"Verbosity", verbosity_default_);
595 verbosity_ = (int)Teuchos::getParameter<Belos::MsgType>(*params,
"Verbosity");
599 params_->set(
"Verbosity", verbosity_);
600 if (printer_ != Teuchos::null)
601 printer_->setVerbosity(verbosity_);
605 if (params->isParameter(
"Output Style")) {
606 if (Teuchos::isParameterType<int>(*params,
"Output Style")) {
607 outputStyle_ = params->get(
"Output Style", outputStyle_default_);
609 outputStyle_ = (int)Teuchos::getParameter<Belos::OutputType>(*params,
"Output Style");
613 params_->set(
"Output Style", outputStyle_);
614 outputTest_ = Teuchos::null;
618 if (params->isParameter(
"Output Stream")) {
619 outputStream_ = Teuchos::getParameter<Teuchos::RCP<std::ostream> >(*params,
"Output Stream");
622 params_->set(
"Output Stream", outputStream_);
623 if (printer_ != Teuchos::null)
624 printer_->setOStream( outputStream_ );
629 if (params->isParameter(
"Output Frequency")) {
630 outputFreq_ = params->get(
"Output Frequency", outputFreq_default_);
634 params_->set(
"Output Frequency", outputFreq_);
635 if (outputTest_ != Teuchos::null)
636 outputTest_->setOutputFrequency( outputFreq_ );
640 if (printer_ == Teuchos::null) {
649 if (params->isParameter(
"Convergence Tolerance")) {
650 convtol_ = params->get(
"Convergence Tolerance",convtol_default_);
653 params_->set(
"Convergence Tolerance", convtol_);
654 if (convTest_ != Teuchos::null)
658 if (params->isParameter(
"Show Maximum Residual Norm Only")) {
659 showMaxResNormOnly_ = Teuchos::getParameter<bool>(*params,
"Show Maximum Residual Norm Only");
662 params_->set(
"Show Maximum Residual Norm Only", showMaxResNormOnly_);
663 if (convTest_ != Teuchos::null)
664 convTest_->setShowMaxResNormOnly( showMaxResNormOnly_ );
670 if (maxIterTest_ == Teuchos::null)
674 if (convTest_ == Teuchos::null)
675 convTest_ = Teuchos::rcp(
new StatusTestResNorm_t( convtol_, 1 ) );
677 if (sTest_ == Teuchos::null)
678 sTest_ = Teuchos::rcp(
new StatusTestCombo_t( StatusTestCombo_t::OR, maxIterTest_, convTest_ ) );
680 if (outputTest_ == Teuchos::null) {
688 std::string solverDesc =
" Block CG ";
689 outputTest_->setSolverDesc( solverDesc );
694 if (ortho_ == Teuchos::null) {
695 if (orthoType_==
"DGKS") {
696 if (orthoKappa_ <= 0) {
704 else if (orthoType_==
"ICGS") {
707 else if (orthoType_==
"IMGS") {
711 TEUCHOS_TEST_FOR_EXCEPTION(orthoType_!=
"ICGS"&&orthoType_!=
"DGKS"&&orthoType_!=
"IMGS",std::logic_error,
712 "Belos::BlockCGSolMgr(): Invalid orthogonalization type.");
717 if (timerSolve_ == Teuchos::null) {
718 std::string solveLabel = label_ +
": BlockCGSolMgr total solve time";
719 #ifdef BELOS_TEUCHOS_TIME_MONITOR 720 timerSolve_ = Teuchos::TimeMonitor::getNewCounter(solveLabel);
729 template<
class ScalarType,
class MV,
class OP>
730 Teuchos::RCP<const Teuchos::ParameterList>
733 static Teuchos::RCP<const Teuchos::ParameterList> validPL;
736 if(is_null(validPL)) {
737 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
738 pl->set(
"Convergence Tolerance", convtol_default_,
739 "The relative residual tolerance that needs to be achieved by the\n" 740 "iterative solver in order for the linear system to be declared converged.");
741 pl->set(
"Maximum Iterations", maxIters_default_,
742 "The maximum number of block iterations allowed for each\n" 743 "set of RHS solved.");
744 pl->set(
"Block Size", blockSize_default_,
745 "The number of vectors in each block.");
746 pl->set(
"Adaptive Block Size", adaptiveBlockSize_default_,
747 "Whether the solver manager should adapt to the block size\n" 748 "based on the number of RHS to solve.");
749 pl->set(
"Verbosity", verbosity_default_,
750 "What type(s) of solver information should be outputted\n" 751 "to the output stream.");
752 pl->set(
"Output Style", outputStyle_default_,
753 "What style is used for the solver information outputted\n" 754 "to the output stream.");
755 pl->set(
"Output Frequency", outputFreq_default_,
756 "How often convergence information should be outputted\n" 757 "to the output stream.");
758 pl->set(
"Output Stream", outputStream_default_,
759 "A reference-counted pointer to the output stream where all\n" 760 "solver output is sent.");
761 pl->set(
"Show Maximum Residual Norm Only", showMaxResNormOnly_default_,
762 "When convergence information is printed, only show the maximum\n" 763 "relative residual norm when the block size is greater than one.");
764 pl->set(
"Timer Label", label_default_,
765 "The string to use as a prefix for the timer labels.");
767 pl->set(
"Orthogonalization", orthoType_default_,
768 "The type of orthogonalization to use: DGKS, ICGS, or IMGS.");
769 pl->set(
"Orthogonalization Constant",orthoKappa_default_,
770 "The constant used by DGKS orthogonalization to determine\n" 771 "whether another step of classical Gram-Schmidt is necessary.");
779 template<
class ScalarType,
class MV,
class OP>
783 using Teuchos::rcp_const_cast;
784 using Teuchos::rcp_dynamic_cast;
791 setParameters(Teuchos::parameterList(*getValidParameters()));
794 Teuchos::BLAS<int,ScalarType> blas;
795 Teuchos::LAPACK<int,ScalarType> lapack;
797 TEUCHOS_TEST_FOR_EXCEPTION( !problem_->isProblemSet(),
799 "Belos::BlockCGSolMgr::solve(): Linear problem is not ready, setProblem() " 800 "has not been called.");
804 int numRHS2Solve = MVT::GetNumberVecs( *(problem_->getRHS()) );
805 int numCurrRHS = ( numRHS2Solve < blockSize_) ? numRHS2Solve : blockSize_;
807 std::vector<int> currIdx, currIdx2;
812 if ( adaptiveBlockSize_ ) {
813 blockSize_ = numCurrRHS;
814 currIdx.resize( numCurrRHS );
815 currIdx2.resize( numCurrRHS );
816 for (
int i=0; i<numCurrRHS; ++i)
817 { currIdx[i] = startPtr+i; currIdx2[i]=i; }
821 currIdx.resize( blockSize_ );
822 currIdx2.resize( blockSize_ );
823 for (
int i=0; i<numCurrRHS; ++i)
824 { currIdx[i] = startPtr+i; currIdx2[i]=i; }
825 for (
int i=numCurrRHS; i<blockSize_; ++i)
826 { currIdx[i] = -1; currIdx2[i] = i; }
830 problem_->setLSIndex( currIdx );
834 Teuchos::ParameterList plist;
835 plist.set(
"Block Size",blockSize_);
838 outputTest_->reset();
842 bool isConverged =
true;
847 RCP<CGIteration<ScalarType,MV,OP> > block_cg_iter;
848 if (blockSize_ == 1) {
853 outputTest_, plist));
863 #ifdef BELOS_TEUCHOS_TIME_MONITOR 864 Teuchos::TimeMonitor slvtimer(*timerSolve_);
867 while ( numRHS2Solve > 0 ) {
870 std::vector<int> convRHSIdx;
871 std::vector<int> currRHSIdx( currIdx );
872 currRHSIdx.resize(numCurrRHS);
875 block_cg_iter->resetNumIters();
878 outputTest_->resetNumCalls();
881 RCP<MV> R_0 = MVT::CloneViewNonConst( *(rcp_const_cast<MV>(problem_->getInitResVec())), currIdx );
886 block_cg_iter->initializeCG(newstate);
892 block_cg_iter->iterate();
896 if (convTest_->getStatus() ==
Passed) {
901 std::vector<int> convIdx =
902 rcp_dynamic_cast<conv_test_type>(convTest_)->convIndices();
907 if (convIdx.size() == currRHSIdx.size())
912 problem_->setCurrLS();
917 std::vector<int> unconvIdx(currRHSIdx.size());
918 for (
unsigned int i=0; i<currRHSIdx.size(); ++i) {
920 for (
unsigned int j=0; j<convIdx.size(); ++j) {
921 if (currRHSIdx[i] == convIdx[j]) {
927 currIdx2[have] = currIdx2[i];
928 currRHSIdx[have++] = currRHSIdx[i];
933 currRHSIdx.resize(have);
934 currIdx2.resize(have);
937 problem_->setLSIndex( currRHSIdx );
940 std::vector<MagnitudeType> norms;
941 R_0 = MVT::CloneCopy( *(block_cg_iter->getNativeResiduals(&norms)),currIdx2 );
942 for (
int i=0; i<have; ++i) { currIdx2[i] = i; }
945 block_cg_iter->setBlockSize( have );
950 block_cg_iter->initializeCG(defstate);
956 else if (maxIterTest_->getStatus() ==
Passed) {
965 TEUCHOS_TEST_FOR_EXCEPTION(
true,std::logic_error,
966 "Belos::BlockCGSolMgr::solve(): Neither the convergence test nor " 967 "the maximum iteration count test passed. Please report this bug " 968 "to the Belos developers.");
971 catch (
const std::exception &e) {
972 std::ostream& err = printer_->stream (
Errors);
973 err <<
"Error! Caught std::exception in CGIteration::iterate() at " 974 <<
"iteration " << block_cg_iter->getNumIters() << std::endl
975 << e.what() << std::endl;
982 problem_->setCurrLS();
985 startPtr += numCurrRHS;
986 numRHS2Solve -= numCurrRHS;
987 if ( numRHS2Solve > 0 ) {
988 numCurrRHS = ( numRHS2Solve < blockSize_) ? numRHS2Solve : blockSize_;
990 if ( adaptiveBlockSize_ ) {
991 blockSize_ = numCurrRHS;
992 currIdx.resize( numCurrRHS );
993 currIdx2.resize( numCurrRHS );
994 for (
int i=0; i<numCurrRHS; ++i)
995 { currIdx[i] = startPtr+i; currIdx2[i] = i; }
998 currIdx.resize( blockSize_ );
999 currIdx2.resize( blockSize_ );
1000 for (
int i=0; i<numCurrRHS; ++i)
1001 { currIdx[i] = startPtr+i; currIdx2[i] = i; }
1002 for (
int i=numCurrRHS; i<blockSize_; ++i)
1003 { currIdx[i] = -1; currIdx2[i] = i; }
1006 problem_->setLSIndex( currIdx );
1009 block_cg_iter->setBlockSize( blockSize_ );
1012 currIdx.resize( numRHS2Solve );
1023 #ifdef BELOS_TEUCHOS_TIME_MONITOR 1029 Teuchos::TimeMonitor::summarize( printer_->stream(TimingDetails) );
1034 numIters_ = maxIterTest_->getNumIters();
1040 const std::vector<MagnitudeType>* pTestValues =
1041 rcp_dynamic_cast<conv_test_type>(convTest_)->getTestValue();
1043 TEUCHOS_TEST_FOR_EXCEPTION(pTestValues == NULL, std::logic_error,
1044 "Belos::BlockCGSolMgr::solve(): The convergence test's getTestValue() " 1045 "method returned NULL. Please report this bug to the Belos developers.");
1047 TEUCHOS_TEST_FOR_EXCEPTION(pTestValues->size() < 1, std::logic_error,
1048 "Belos::BlockCGSolMgr::solve(): The convergence test's getTestValue() " 1049 "method returned a vector of length zero. Please report this bug to the " 1050 "Belos developers.");
1055 achievedTol_ = *std::max_element (pTestValues->begin(), pTestValues->end());
1065 template<
class ScalarType,
class MV,
class OP>
1068 std::ostringstream oss;
1069 oss <<
"Belos::BlockCGSolMgr<...,"<<Teuchos::ScalarTraits<ScalarType>::name()<<
">";
1071 oss <<
"Ortho Type='"<<orthoType_<<
"\', Block Size=" << blockSize_;
Teuchos::RCP< const MV > R
The current residual.
void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)
Set the linear problem that needs to be solved.
Collection of types and exceptions used within the Belos solvers.
Teuchos::Array< Teuchos::RCP< Teuchos::Time > > getTimers() const
Return the timers for this object.
Belos's basic output manager for sending information of select verbosity levels to the appropriate ou...
Class which manages the output and verbosity of the Belos solvers.
int getNumIters() const
Get the iteration count for the most recent call to solve().
This class implements the preconditioned Conjugate Gradient (CG) iteration.
Structure to contain pointers to CGIteration state variables.
Belos concrete class for performing the conjugate-gradient (CG) iteration.
A factory class for generating StatusTestOutput objects.
Belos concrete class for performing the block conjugate-gradient (CG) iteration.
An implementation of StatusTestResNorm using a family of residual norms.
The Belos::BlockCGSolMgr provides a powerful and fully-featured solver manager over the CG and BlockC...
Belos::StatusTest class for specifying a maximum number of iterations.
BlockCGSolMgrLinearProblemFailure(const std::string &what_arg)
BlockCGSolMgrLinearProblemFailure is thrown when the linear problem is not setup (i.e.
A factory class for generating StatusTestOutput objects.
Iterated Modified Gram-Schmidt (IMGS) implementation of the Belos::OrthoManager class.
BlockCGSolMgr(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem, const Teuchos::RCP< Teuchos::ParameterList > &pl)
Traits class which defines basic operations on multivectors.
Belos::StatusTest for logically combining several status tests.
virtual ~BlockCGSolMgr()
Destructor.
Classical Gram-Schmidt (with DGKS correction) implementation of the Belos::OrthoManager class...
A Belos::StatusTest class for specifying a maximum number of iterations.
ResetType
How to reset the solver.
Pure virtual base class which describes the basic interface for a solver manager. ...
A linear system to solve, and its associated information.
Class which describes the linear problem to be solved by the iterative solver.
BlockCGSolMgrOrthoFailure is thrown when the orthogonalization manager is unable to generate orthonor...
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.
Iterated Classical Gram-Schmidt (ICGS) implementation of the Belos::OrthoManager class.
MagnitudeType achievedTol() const
Tolerance achieved by the last solve() invocation.
An implementation of the Belos::MatOrthoManager that performs orthogonalization using multiple steps ...
BlockCGSolMgrOrthoFailure(const std::string &what_arg)
An implementation of the Belos::MatOrthoManager that performs orthogonalization using multiple steps ...
int setTolerance(MagnitudeType tolerance)
Set the value of the tolerance.
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.
bool isLOADetected() const
Return whether a loss of accuracy was detected by this solver during the most current solve...
Belos::StatusTestResNorm for specifying general residual norm stopping criteria.
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.
Class which defines basic traits for the operator type.
Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const
Get a parameter list containing the current parameters for this object.
Parent class to all Belos exceptions.
Base class for Belos::SolverManager subclasses which normally can only compile with ScalarType types ...
Belos header file which uses auto-configuration information to include necessary C++ headers...
void reset(const ResetType type)
Performs a reset of the solver manager specified by the ResetType. This informs the solver manager th...
const LinearProblem< ScalarType, MV, OP > & getProblem() const
Return a reference to the linear problem being solved by this solver manager.
Stub implementation of BlockCGIter, for ScalarType types for which Teuchos::LAPACK does NOT have a va...