46#ifndef MUELU_IFPACKSMOOTHER_HPP
47#define MUELU_IFPACKSMOOTHER_HPP
50#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK)
52#include <Teuchos_ParameterList.hpp>
53#include <Xpetra_Matrix.hpp>
54#include <Xpetra_MultiVectorFactory_fwd.hpp>
58#include "MueLu_SmootherPrototype.hpp"
76 template <class Node = typename SmootherPrototype<double,int,int>::node_type>
81#undef MUELU_IFPACKSMOOTHER_SHORT
123 IfpackSmoother(std::string
const & type, Teuchos::ParameterList
const & paramList = Teuchos::ParameterList(), LO
const &overlap=0);
157 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
164 RCP<SmootherPrototype>
Copy()
const;
185 void SetPrecParameters(
const Teuchos::ParameterList& list = Teuchos::ParameterList())
const;
208 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
209 RCP<MueLu::SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
211 const Teuchos::ParameterList& = Teuchos::ParameterList (),
214 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"IfpackSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int");
215 TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
219#if defined(HAVE_MUELU_EPETRA)
221 inline RCP<MueLu::SmootherPrototype<double, int, int, Xpetra::EpetraNode> >
229#define MUELU_IFPACKSMOOTHER_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
Exception throws to report errors in the internal logical of the program.
Class that encapsulates Ifpack smoothers.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
virtual ~IfpackSmoother()
Destructor.
std::string description() const
Return a simple one-line description of this object.
std::string type_
ifpack-specific key phrase that denote smoother type
void Setup(Level ¤tLevel)
Set up the smoother.
RCP< SmootherPrototype > Copy() const
void DeclareInput(Level ¤tLevel) const
Input.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void SetupAggregate(Level ¤tLevel)
RCP< Matrix > A_
Matrix. Not used directly, but held inside of prec_. So we have to keep an RCP pointer to it!
RCP< Ifpack_Preconditioner > prec_
pointer to Ifpack solver object
LO overlap_
overlap when using the smoother in additive Schwarz mode
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
Class that holds all level-specific information.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.
RCP< MueLu::SmootherPrototype< Scalar, LocalOrdinal, GlobalOrdinal, Node > > GetIfpackSmoother(const std::string &="", const Teuchos::ParameterList &=Teuchos::ParameterList(), const LocalOrdinal &=0)
RCP< MueLu::SmootherPrototype< double, int, int, Xpetra::EpetraNode > > GetIfpackSmoother< double, int, int, Xpetra::EpetraNode >(const std::string &type, const Teuchos::ParameterList ¶mList, const int &overlap)