51 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 55 #include "Teuchos_RCP.hpp" 56 #include "Teuchos_ParameterList.hpp" 57 #include "Teuchos_TestForException.hpp" 58 #include "Teuchos_AbstractFactoryStd.hpp" 62 void enableMueLu(DefaultLinearSolverBuilder &builder,
const std::string &stratName) {
63 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
65 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
66 "Stratimikos::enableMueLu cannot add \"" + stratName +
"\" because it is already included in builder!");
68 typedef Thyra::PreconditionerFactoryBase<double> Base;
71 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
74 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 76 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
78 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
79 "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +
"\" because it is already included in builder!");
81 typedef Thyra::PreconditionerFactoryBase<double> Base;
84 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder, const std::string &stratName)
Concrete preconditioner factory subclass based on MueLu.
Concrete preconditioner factory subclass for Thyra based on MueLu.Add support for MueLu preconditione...
void enableMueLu(DefaultLinearSolverBuilder &builder, const std::string &stratName)