46 #ifndef MUELU_TRILINOSSMOOTHER_DECL_HPP 47 #define MUELU_TRILINOSSMOOTHER_DECL_HPP 51 #include <Xpetra_Matrix_fwd.hpp> 55 #include "MueLu_SmootherPrototype.hpp" 60 #if defined(HAVE_MUELU_IFPACK2) 62 #include "MueLu_Ifpack2Smoother.hpp" 79 template <class Scalar = SmootherPrototype<>::scalar_type,
84 #undef MUELU_TRILINOSSMOOTHER_SHORT 125 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
136 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
141 template<
typename Node2>
201 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
202 template<
typename Node2>
205 #if defined(HAVE_MUELU_IFPACK2) 212 if (ifpack2Smoother != Teuchos::null){
213 cloneSB = ifpack2Smoother->template clone<Node2>(node2, A_newnode);
217 true, std::invalid_argument,
"MueLu::TrilinosSmoother: " 218 "Invalid smoother type to clone (not type Ifpack2)\"");
222 cloneSmoother->s_ = clonedProto;
223 cloneSmoother->IsSetup(
true);
224 return cloneSmoother;
227 true, std::invalid_argument,
"MueLu::SmootherClone: " 228 "clone() only available with IFPACK2 enabled.");
235 #define MUELU_TRILINOSSMOOTHER_SHORT 236 #endif // MUELU_TRILINOSSMOOTHER_DECL_HPP
RCP< SmootherPrototype > Copy() const
When this prototype is cloned using Copy(), the clone is an Ifpack or an Ifpack2 smoother.
RCP< MueLu::TrilinosSmoother< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2, const Teuchos::RCP< const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > &A_newnode) const
RCP< SmootherPrototype > sTpetra_
virtual ~TrilinosSmoother()
Destructor.
Class that encapsulates external library smoothers.
static std::string Ifpack2ToIfpack1Type(const std::string &type)
Convert an Ifpack2 preconditioner name to Ifpack.
static Teuchos::ParameterList Ifpack2ToIfpack1Param(const Teuchos::ParameterList &ifpack2List)
Convert an Ifpack2 parameter list to Ifpack.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Base class for smoother prototypes.
void DeclareInput(Level ¤tLevel) const
Input.
Namespace for MueLu classes and methods.
LocalOrdinal local_ordinal_type
void Setup(Level ¤tLevel)
TrilinosSmoother cannot be turned into a smoother using Setup(). Setup() always returns a RuntimeErro...
friend class TrilinosSmoother
Friend declaration required for clone() functionality.
std::string description() const
Return a simple one-line description of this object.
RCP< SmootherPrototype > s_
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Class that holds all level-specific information.
std::string type_
ifpack1/2-specific key phrase that denote smoother type
RCP< FactoryBase > AFact_
A Factory.
RCP< SmootherPrototype > sEpetra_
Smoother.
GlobalOrdinal global_ordinal_type
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
LO overlap_
overlap when using the smoother in additive Schwarz mode
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
TrilinosSmoother cannot be applied. Apply() always returns a RuntimeError exception.
Class that encapsulates Ifpack2 smoothers.
void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Custom SetFactory.