46 #ifndef MUELU_BELOSSMOOTHER_DECL_HPP 47 #define MUELU_BELOSSMOOTHER_DECL_HPP 49 #include <Teuchos_ParameterList.hpp> 51 #include <Xpetra_Matrix_fwd.hpp> 52 #include <Xpetra_MultiVectorFactory_fwd.hpp> 56 #if defined(HAVE_MUELU_BELOS) 60 #ifdef HAVE_XPETRA_TPETRA 61 #include "BelosTpetraAdapter.hpp" 62 #include <Tpetra_Operator.hpp> 63 #include <Tpetra_MultiVector.hpp> 69 #include "MueLu_SmootherPrototype.hpp" 72 #include <BelosSolverManager.hpp> 87 template <class Scalar = SmootherPrototype<>::scalar_type,
92 #undef MUELU_BELOSSMOOTHER_SHORT 111 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
115 BelosSmoother(
const std::string type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
149 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
156 RCP<SmootherPrototype>
Copy()
const;
186 #ifdef HAVE_MUELU_TPETRA 187 typedef Tpetra::MultiVector<SC, LO, GO, NO>
tMV;
188 typedef Tpetra::Operator<SC, LO, GO, NO>
tOP;
190 RCP<Belos::SolverManager<Scalar, tMV, tOP> >
tSolver_;
199 #ifdef HAVE_MUELU_EPETRA 201 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 202 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 210 #undef MUELU_BELOSSMOOTHER_SHORT 216 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
220 BelosSmoother(
const std::string& type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList(),
const LocalOrdinal& overlap = 0) {
229 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {}
230 RCP<SmootherPrototype>
Copy()
const {
return Teuchos::null;}
241 #endif // HAVE_MUELU_EPETRA 246 #define MUELU_BELOSSMOOTHER_SHORT 247 #endif // HAVE_MUELU_BELOS 248 #endif // MUELU_BELOSSMOOTHER_DECL_HPP
virtual ~BelosSmoother()=default
Destructor.
BelosSmoother(const std::string &type, const Teuchos::ParameterList ¶mList=Teuchos::ParameterList(), const LocalOrdinal &overlap=0)
MueLu::DefaultLocalOrdinal LocalOrdinal
RCP< SmootherPrototype > Copy() const
RCP< Matrix > A_
matrix, used in apply if solving residual equation
size_t getNodeSmootherComplexity() const
For diagnostic purposes.
std::string description() const
Return a simple one-line description of this object.
Class that encapsulates Belos smoothers.
Base class for smoother prototypes.
void Setup(Level ¤tLevel)
Set up the smoother.
Tpetra::Operator< SC, LO, GO, NO > tOP
Namespace for MueLu classes and methods.
LocalOrdinal local_ordinal_type
std::string description() const
Return a simple one-line description of this object.
RCP< Belos::SolverManager< Scalar, tMV, tOP > > tSolver_
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
RCP< Belos::LinearProblem< Scalar, tMV, tOP > > tBelosProblem_
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
void SetupBelos(Level ¤tLevel)
friend class BelosSmoother
Constructor.
void Setup(Level ¤tLevel)
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.
GlobalOrdinal global_ordinal_type
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.
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.
Kokkos::Compat::KokkosSerialWrapperNode EpetraNode
Tpetra::MultiVector< SC, LO, GO, NO > tMV
RCP< SmootherPrototype > Copy() const
void DeclareInput(Level ¤tLevel) const
Input.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
void DeclareInput(Level ¤tLevel) const
Input.