47 #ifndef STRATIMIKOS_MUELU_TPETRA_HELPERS_HPP 48 #define STRATIMIKOS_MUELU_TPETRA_HELPERS_HPP 50 #include "Stratimikos_DefaultLinearSolverBuilder.hpp" 54 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 58 #include "Teuchos_RCP.hpp" 59 #include "Teuchos_ParameterList.hpp" 60 #include "Teuchos_TestForException.hpp" 61 #include "Teuchos_AbstractFactoryStd.hpp" 68 void enableMueLu(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLu");
73 template <
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
74 void enableMueLu(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLu")
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::enableMueLu cannot add \"" + stratName +
"\" because it is already included in builder!");
81 typedef Thyra::PreconditionerFactoryBase<double> Base;
84 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
87 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 90 void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder,
const std::string &stratName =
"MueLu");
96 template <
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
98 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
100 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
101 "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +
"\" because it is already included in builder!");
103 typedef Thyra::PreconditionerFactoryBase<double> Base;
106 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLu")
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)