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" 70 template <
typename LocalOrdinal =
int,
typename GlobalOrdinal =
int,
typename Node = KokkosClassic::DefaultNode::DefaultNodeType>
71 void enableMueLu(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLu")
73 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
75 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
76 "Stratimikos::enableMueLu cannot add \"" + stratName +
"\" because it is already included in builder!");
78 typedef Thyra::PreconditionerFactoryBase<double> Base;
81 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
84 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 87 void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder,
const std::string &stratName =
"MueLu");
93 template <
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
95 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
97 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
98 "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +
"\" because it is already included in builder!");
100 typedef Thyra::PreconditionerFactoryBase<double> Base;
103 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="MueLu")