10 #ifndef MUELU_IFPACK2SMOOTHER_DECL_HPP
11 #define MUELU_IFPACK2SMOOTHER_DECL_HPP
19 #ifdef HAVE_XPETRA_TPETRA // needed for clone()
26 #if defined(HAVE_MUELU_IFPACK2)
28 #include <Tpetra_CrsMatrix.hpp>
30 #include <Ifpack2_Factory_decl.hpp>
31 #include <Ifpack2_Factory_def.hpp>
35 #include "MueLu_SmootherPrototype.hpp"
51 template <class Scalar = SmootherPrototype<>::scalar_type,
52 class LocalOrdinal =
typename SmootherPrototype<Scalar>::local_ordinal_type,
53 class GlobalOrdinal =
typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
54 class Node =
typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
56 #undef MUELU_IFPACK2SMOOTHER_SHORT
100 template <
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
140 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
201 #ifdef HAVE_MUELU_EPETRA
203 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
204 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
212 #undef MUELU_AMESOS2SMOOTHER_SHORT
218 template <
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
223 MUELU_TPETRA_ETI_EXCEPTION(
"Ifpack2Smoother<double,int,int,EpetraNode>",
"Ifpack2Smoother<double,int,int,EpetraNode>",
"int");
231 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {}
248 #endif // HAVE_MUELU_EPETRA
252 #define MUELU_IFPACK2SMOOTHER_SHORT
253 #endif // HAVE_MUELU_IFPACK2
254 #endif // MUELU_IFPACK2SMOOTHER_DECL_HPP
Ifpack2Smoother(const std::string &type, const Teuchos::ParameterList ¶mList=Teuchos::ParameterList(), const LocalOrdinal &overlap=0)
void DeclareInput(Level ¤tLevel) const
Input.
void Setup(Level ¤tLevel)
void SetupGeneric(Level ¤tLevel)
MueLu::DefaultLocalOrdinal LocalOrdinal
friend class Ifpack2Smoother
Constructor.
Base class for smoother prototypes.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
RCP< SmootherPrototype > Copy() const
virtual ~Ifpack2Smoother()
LO overlap_
overlap when using the smoother in additive Schwarz mode
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
RCP< Operator > A_
matrix, used in apply if solving residual equation
std::string type_
ifpack2-specific key phrase that denote smoother type
void SetupBlockRelaxation(Level ¤tLevel)
void SetupSchwarz(Level ¤tLevel)
void SetupLineSmoothing(Level ¤tLevel)
std::string description() const
Return a simple one-line description of this object.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
RCP< SmootherPrototype > Copy() const
Class that holds all level-specific information.
void Setup(Level ¤tLevel)
Set up the smoother.
void DeclareInput(Level ¤tLevel) const
Input.
RCP< Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node > > prec_
pointer to Ifpack2 preconditioner object
void SetupHiptmair(Level ¤tLevel)
void SetupTopological(Level ¤tLevel)
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
std::string description() const
Return a simple one-line description of this object.
RCP< Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getPreconditioner()
For diagnostic purposes.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
virtual ~Ifpack2Smoother()
Destructor.
bool constructionSuccessful_
void SetupAggregate(Level ¤tLevel)
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
void SetupChebyshev(Level ¤tLevel)
Class that encapsulates Ifpack2 smoothers.
Scalar SetupChebyshevEigenvalues(Level ¤tLevel, const std::string &matrixName, const std::string &label, Teuchos::ParameterList ¶mList) const