46 #ifndef MUELU_IFPACK2SMOOTHER_DECL_HPP 47 #define MUELU_IFPACK2SMOOTHER_DECL_HPP 56 #ifdef HAVE_XPETRA_TPETRA // needed for clone() 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" 89 template <class Scalar = SmootherPrototype<>::scalar_type,
94 #undef MUELU_IFPACK2SMOOTHER_SHORT 139 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
179 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
191 template<
typename Node2>
232 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
233 template<
typename Node2>
236 #ifdef HAVE_XPETRA_TPETRA 238 typedef Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> Matrix1;
239 typedef Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node2> Matrix2;
250 cloneSmoother->prec_ = factory.clone<Matrix1, Matrix2>(prec_, tmp->getTpetra_CrsMatrix(), paramList);
251 cloneSmoother->type_ = type_;
252 cloneSmoother->SetParameterList(paramList);
253 cloneSmoother->IsSetup(this->IsSetup());
254 return cloneSmoother;
257 "MueLu::Ifpack2Smoother::clone(): clone only available with Tpetra.");
261 #ifdef HAVE_MUELU_EPETRA 263 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 264 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 272 #undef MUELU_AMESOS2SMOOTHER_SHORT 278 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
291 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {}
294 template<
typename Node2>
304 #endif // HAVE_MUELU_EPETRA 308 #define MUELU_IFPACK2SMOOTHER_SHORT 309 #endif // HAVE_MUELU_TPETRA && HAVE_MUELU_IFPACK2 310 #endif // MUELU_IFPACK2SMOOTHER_DECL_HPP Ifpack2Smoother(const std::string &type, const Teuchos::ParameterList ¶mList=Teuchos::ParameterList(), const LocalOrdinal &overlap=0)
void Setup(Level ¤tLevel)
void SetupGeneric(Level ¤tLevel)
RCP< SmootherPrototype > Copy() const
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
std::string description() const
Return a simple one-line description of this object.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.
friend class Ifpack2Smoother
Constructor.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
RCP< Matrix > A_
matrix, used in apply if solving residual equation
Base class for smoother prototypes.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
Namespace for MueLu classes and methods.
LocalOrdinal local_ordinal_type
virtual ~Ifpack2Smoother()
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.
RCP< MueLu::Ifpack2Smoother< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2, const Teuchos::RCP< const Matrix > &A_newnode) const
std::string type_
ifpack2-specific key phrase that denote smoother type
void SetupSchwarz(Level ¤tLevel)
void SetupLineSmoothing(Level ¤tLevel)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Class that holds all level-specific information.
RCP< MueLu::Ifpack2Smoother< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2, const Teuchos::RCP< const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > &A_newnode) const
Clone the smoother to a different node type.
void Setup(Level ¤tLevel)
Set up the smoother.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
void DeclareInput(Level ¤tLevel) const
Input.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
virtual ~Ifpack2Smoother()
Destructor.
void DeclareInput(Level ¤tLevel) const
Input.
GlobalOrdinal global_ordinal_type
void SetPrecParameters(const Teuchos::ParameterList &list=Teuchos::ParameterList()) const
RCP< SmootherPrototype > Copy() const
std::string description() const
Return a simple one-line description of this object.
Exception throws to report errors in the internal logical of the program.
void SetupChebyshev(Level ¤tLevel)
Class that encapsulates Ifpack2 smoothers.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
RCP< Ifpack2::Preconditioner< Scalar, LocalOrdinal, GlobalOrdinal, Node > > prec_
pointer to Ifpack2 preconditioner object