41 #ifndef STRATIMIKOS_BELOS_PREC_TPETRA_HELPERS_HPP
42 #define STRATIMIKOS_BELOS_PREC_TPETRA_HELPERS_HPP
44 #include "Stratimikos_LinearSolverBuilder.hpp"
45 #include "Thyra_BelosTpetraPreconditionerFactory_decl.hpp"
46 #include "Thyra_BelosTpetraPreconditionerFactory_def.hpp"
48 #include "Teuchos_RCP.hpp"
49 #include "Teuchos_ParameterList.hpp"
50 #include "Teuchos_TestForException.hpp"
51 #include "Teuchos_AbstractFactoryStd.hpp"
55 namespace Stratimikos {
57 template <
typename MatrixType>
58 void enableBelosPrecTpetra(LinearSolverBuilder<typename MatrixType::scalar_type>& builder,
const std::string& stratName =
"BelosPrecTpetra")
63 "Stratimikos::enableBelosPrecTpetra cannot add \"" + stratName +
"\" because it is already included in builder!");
65 typedef typename MatrixType::scalar_type scalar_type;
69 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
bool isParameter(const std::string &name) const
Concrete preconditioner factory subclass based on Belos. (Yes, Belos solvers can also be used as prec...