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)
63 #include "Teuchos_AbstractFactoryStd.hpp"
67 namespace Stratimikos {
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 #if defined(HAVE_MUELU_STRATIMIKOS) && defined(HAVE_MUELU_THYRA)
79 "Stratimikos::enableMueLu cannot add \"" + stratName +
"\" because it is already included in builder!");
81 typedef Thyra::PreconditionerFactoryBase<double> Base;
82 typedef Thyra::MueLuPreconditionerFactory<double, LocalOrdinal, GlobalOrdinal, Node> Impl;
84 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
91 template <
typename LocalOrdinal = MueLu::DefaultLocalOrdinal,
typename GlobalOrdinal = MueLu::DefaultGlobalOrdinal,
typename Node = MueLu::DefaultNode>
92 void enableMueLuRefMaxwell(DefaultLinearSolverBuilder& builder,
const std::string& stratName =
"MueLuRefMaxwell")
94 #if defined(HAVE_MUELU_STRATIMIKOS) && defined(HAVE_MUELU_THYRA)
98 "Stratimikos::enableMueLuRefMaxwell cannot add \"" + stratName +
"\" because it is already included in builder!");
100 typedef Thyra::PreconditionerFactoryBase<double> Base;
101 typedef Thyra::MueLuRefMaxwellPreconditionerFactory<double, LocalOrdinal, GlobalOrdinal, Node> Impl;
103 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
107 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO)
110 void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder,
const std::string &stratName =
"MueLu");
116 template <
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
121 "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +
"\" because it is already included in builder!");
123 typedef Thyra::PreconditionerFactoryBase<double> Base;
126 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLu")
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Concrete preconditioner factory subclass based on MueLu.
bool isParameter(const std::string &name) const
void enableMueLu(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLu")
void enableMueLuRefMaxwell(DefaultLinearSolverBuilder &builder, const std::string &stratName="MueLuRefMaxwell")