10#ifndef MUELU_BELOSSMOOTHER_DECL_HPP
11#define MUELU_BELOSSMOOTHER_DECL_HPP
13#include <Teuchos_ParameterList.hpp>
15#include <Xpetra_Matrix_fwd.hpp>
16#include <Xpetra_MultiVectorFactory_fwd.hpp>
20#if defined(HAVE_MUELU_BELOS)
24#ifdef HAVE_XPETRA_TPETRA
25#include "BelosTpetraAdapter.hpp"
26#include <Tpetra_Operator.hpp>
27#include <Tpetra_MultiVector.hpp>
31#include "MueLu_SmootherPrototype.hpp"
34#include <BelosSolverManager.hpp>
48template <class Scalar = SmootherPrototype<>::scalar_type,
53#undef MUELU_BELOSSMOOTHER_SHORT
71 template <
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
75 BelosSmoother(
const std::string type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
109 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
116 RCP<SmootherPrototype>
Copy()
const;
145 typedef Tpetra::MultiVector<SC, LO, GO, NO>
tMV;
146 typedef Tpetra::Operator<SC, LO, GO, NO>
tOP;
148 RCP<Belos::SolverManager<Scalar, tMV, tOP> >
tSolver_;
155#ifdef HAVE_MUELU_EPETRA
157#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
158 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
165 typedef Xpetra::EpetraNode
Node;
166#undef MUELU_BELOSSMOOTHER_SHORT
172 template <
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
176 BelosSmoother(
const std::string& type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList(),
const LocalOrdinal& overlap = 0) {
185 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {}
186 RCP<SmootherPrototype>
Copy()
const {
return Teuchos::null; }
203#define MUELU_BELOSSMOOTHER_SHORT
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
BelosSmoother(const std::string &type, const Teuchos::ParameterList ¶mList=Teuchos::ParameterList(), const LocalOrdinal &overlap=0)
RCP< SmootherPrototype > Copy() const
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
std::string description() const
Return a simple one-line description of this object.
void Setup(Level ¤tLevel)
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void DeclareInput(Level ¤tLevel) const
Input.
Class that encapsulates Belos smoothers.
Tpetra::MultiVector< SC, LO, GO, NO > tMV
RCP< Belos::SolverManager< Scalar, tMV, tOP > > tSolver_
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
friend class BelosSmoother
Constructor.
RCP< Belos::LinearProblem< Scalar, tMV, tOP > > tBelosProblem_
RCP< Matrix > A_
matrix, used in apply if solving residual equation
Tpetra::Operator< SC, LO, GO, NO > tOP
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
void DeclareInput(Level ¤tLevel) const
Input.
void SetupBelos(Level ¤tLevel)
virtual ~BelosSmoother()=default
Destructor.
std::string description() const
Return a simple one-line description of this object.
size_t getNodeSmootherComplexity() const
For diagnostic purposes.
void Setup(Level ¤tLevel)
Set up the smoother.
RCP< SmootherPrototype > Copy() const
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.