47 #ifndef STRATIMIKOS_MUELU_TPETRA_HELPERS_HPP 48 #define STRATIMIKOS_MUELU_TPETRA_HELPERS_HPP 50 #include "Stratimikos_DefaultLinearSolverBuilder.hpp" 55 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 59 #include "Teuchos_RCP.hpp" 60 #include "Teuchos_ParameterList.hpp" 61 #include "Teuchos_TestForException.hpp" 62 #include "Teuchos_AbstractFactoryStd.hpp" 71 template <
typename LocalOrdinal =
int,
typename GlobalOrdinal =
int,
typename Node = KokkosClassic::DefaultNode::DefaultNodeType>
72 void enableMueLu(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLu")
74 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
76 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
77 "Stratimikos::enableMueLu cannot add \"" + stratName +
"\" because it is already included in builder!");
79 typedef Thyra::PreconditionerFactoryBase<double> Base;
82 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
88 template <
typename LocalOrdinal =
int,
typename GlobalOrdinal =
int,
typename Node = KokkosClassic::DefaultNode::DefaultNodeType>
89 void enableMueLuRefMaxwell(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLuRefMaxwell")
91 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
93 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
94 "Stratimikos::enableMueLuRefMaxwell cannot add \"" + stratName +
"\" because it is already included in builder!");
96 typedef Thyra::PreconditionerFactoryBase<double> Base;
99 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
102 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO) 105 void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder,
const std::string &stratName =
"MueLu");
111 template <
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
113 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
115 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
116 "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +
"\" because it is already included in builder!");
118 typedef Thyra::PreconditionerFactoryBase<double> Base;
121 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLu")
Concrete preconditioner factory subclass for Thyra based on MueLu.Add support for MueLu preconditione...
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")
void enableMueLuRefMaxwell(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLuRefMaxwell")