47 #ifndef STRATIMIKOS_MUELU_TPETRA_HELPERS_HPP
48 #define STRATIMIKOS_MUELU_TPETRA_HELPERS_HPP
51 #include "Stratimikos_DefaultLinearSolverBuilder.hpp"
56 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO)
60 #include "Teuchos_RCP.hpp"
61 #include "Teuchos_ParameterList.hpp"
62 #include "Teuchos_TestForException.hpp"
63 #include "Teuchos_AbstractFactoryStd.hpp"
72 template <
typename LocalOrdinal = MueLu::DefaultLocalOrdinal,
typename GlobalOrdinal = MueLu::DefaultGlobalOrdinal,
typename Node = MueLu::DefaultNode>
73 void enableMueLu(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLu")
75 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
77 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
78 "Stratimikos::enableMueLu cannot add \"" + stratName +
"\" because it is already included in builder!");
80 typedef Thyra::PreconditionerFactoryBase<double> Base;
83 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
89 template <
typename LocalOrdinal = MueLu::DefaultLocalOrdinal,
typename GlobalOrdinal = MueLu::DefaultGlobalOrdinal,
typename Node = MueLu::DefaultNode>
90 void enableMueLuRefMaxwell(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLuRefMaxwell")
92 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
94 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
95 "Stratimikos::enableMueLuRefMaxwell cannot add \"" + stratName +
"\" because it is already included in builder!");
97 typedef Thyra::PreconditionerFactoryBase<double> Base;
100 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
103 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO)
106 void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder,
const std::string &stratName =
"MueLu");
112 template <
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
114 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(),
"Preconditioner Types");
116 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
117 "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +
"\" because it is already included in builder!");
119 typedef Thyra::PreconditionerFactoryBase<double> Base;
122 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
Concrete preconditioner factory subclass for Thyra based on MueLu.Add support for MueLu preconditione...
Concrete preconditioner factory subclass for Thyra based on MueLu.Add support for MueLu preconditione...
Concrete preconditioner factory subclass based on MueLu.
void enableMueLuRefMaxwell(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLuRefMaxwell")
void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLu")
void enableMueLu(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLu")