10 #ifndef STRATIMIKOS_BELOS_PREC_TPETRA_HELPERS_HPP
11 #define STRATIMIKOS_BELOS_PREC_TPETRA_HELPERS_HPP
13 #include "Stratimikos_LinearSolverBuilder.hpp"
14 #include "Thyra_BelosTpetraPreconditionerFactory_decl.hpp"
15 #include "Thyra_BelosTpetraPreconditionerFactory_def.hpp"
17 #include "Teuchos_RCP.hpp"
18 #include "Teuchos_ParameterList.hpp"
19 #include "Teuchos_TestForException.hpp"
20 #include "Teuchos_AbstractFactoryStd.hpp"
24 namespace Stratimikos {
26 template <
typename MatrixType>
27 void enableBelosPrecTpetra(LinearSolverBuilder<typename MatrixType::scalar_type>& builder,
const std::string& stratName =
"BelosPrecTpetra")
32 "Stratimikos::enableBelosPrecTpetra cannot add \"" + stratName +
"\" because it is already included in builder!");
34 typedef typename MatrixType::scalar_type scalar_type;
38 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...