46#ifndef MUELU_IFPACK2SMOOTHER_DECL_HPP
47#define MUELU_IFPACK2SMOOTHER_DECL_HPP
49#include <Teuchos_ParameterList.hpp>
51#include <Xpetra_BlockedCrsMatrix_fwd.hpp>
52#include <Xpetra_CrsMatrixWrap.hpp>
53#include <Xpetra_Matrix_fwd.hpp>
54#include <Xpetra_Matrix.hpp>
55#include <Xpetra_MultiVectorFactory_fwd.hpp>
56#ifdef HAVE_XPETRA_TPETRA
57#include <Xpetra_TpetraCrsMatrix.hpp>
63#if defined(HAVE_MUELU_TPETRA) && defined(HAVE_MUELU_IFPACK2)
65#include <Tpetra_CrsMatrix.hpp>
67#include <Ifpack2_Factory_decl.hpp>
68#include <Ifpack2_Factory_def.hpp>
74#include "MueLu_SmootherPrototype.hpp"
90 template <class Scalar = SmootherPrototype<>::scalar_type,
95#undef MUELU_IFPACK2SMOOTHER_SHORT
140 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
144 Ifpack2Smoother(
const std::string& type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList(),
const LO& overlap = 0);
180 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
187 RCP<SmootherPrototype>
Copy()
const;
211 void SetPrecParameters(
const Teuchos::ParameterList& list = Teuchos::ParameterList())
const;
234 RCP<Ifpack2::Preconditioner<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
prec_;
241#ifdef HAVE_MUELU_EPETRA
243# if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
244 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
251 typedef Xpetra::EpetraNode
Node;
252#undef MUELU_AMESOS2SMOOTHER_SHORT
258 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
271 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {}
272 RCP<SmootherPrototype>
Copy()
const {
return Teuchos::null;}
289#define MUELU_IFPACK2SMOOTHER_SHORT
Kokkos::Compat::KokkosSerialWrapperNode EpetraNode
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
void DeclareInput(Level ¤tLevel) const
Input.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.
virtual ~Ifpack2Smoother()
Ifpack2Smoother(const std::string &type, const Teuchos::ParameterList ¶mList=Teuchos::ParameterList(), const LocalOrdinal &overlap=0)
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
void Setup(Level ¤tLevel)
std::string description() const
Return a simple one-line description of this object.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
RCP< SmootherPrototype > Copy() const
Class that encapsulates Ifpack2 smoothers.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
RCP< Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getPreconditioner()
For diagnostic purposes.
void SetupSchwarz(Level ¤tLevel)
void Setup(Level ¤tLevel)
Set up the smoother.
Scalar SetupChebyshevEigenvalues(Level ¤tLevel, const std::string &matrixName, const std::string &label, Teuchos::ParameterList ¶mList) const
void SetupAggregate(Level ¤tLevel)
void SetupBlockRelaxation(Level ¤tLevel)
virtual ~Ifpack2Smoother()
Destructor.
void SetupChebyshev(Level ¤tLevel)
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
RCP< SmootherPrototype > Copy() const
std::string description() const
Return a simple one-line description of this object.
bool constructionSuccessful_
void SetupHiptmair(Level ¤tLevel)
LO overlap_
overlap when using the smoother in additive Schwarz mode
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
void SetupTopological(Level ¤tLevel)
RCP< Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node > > prec_
pointer to Ifpack2 preconditioner object
std::string type_
ifpack2-specific key phrase that denote smoother type
friend class Ifpack2Smoother
Constructor.
void DeclareInput(Level ¤tLevel) const
Input.
RCP< Operator > A_
matrix, used in apply if solving residual equation
void SetupLineSmoothing(Level ¤tLevel)
void SetupGeneric(Level ¤tLevel)
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
Class that holds all level-specific information.
Base class for smoother prototypes.
GlobalOrdinal global_ordinal_type
LocalOrdinal local_ordinal_type
Namespace for MueLu classes and methods.