46#ifndef MUELU_STRATIMIKOSSMOOTHER_DECL_HPP
47#define MUELU_STRATIMIKOSSMOOTHER_DECL_HPP
49#include <Teuchos_ParameterList.hpp>
51#include <Xpetra_CrsMatrixWrap_fwd.hpp>
52#include <Xpetra_Matrix_fwd.hpp>
57#if defined(HAVE_MUELU_STRATIMIKOS) && defined(HAVE_MUELU_THYRA)
59#include <Tpetra_CrsMatrix.hpp>
63#include "MueLu_SmootherPrototype.hpp"
66#include <Thyra_LinearOpWithSolveBase.hpp>
81 template <class Scalar = SmootherPrototype<>::scalar_type,
85 class StratimikosSmoother :
public SmootherPrototype<Scalar,LocalOrdinal,GlobalOrdinal,Node> {
86#undef MUELU_STRATIMIKOSSMOOTHER_SHORT
105 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
106 friend class StratimikosSmoother;
109 StratimikosSmoother(
const std::string type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList()) {
110 TEUCHOS_TEST_FOR_EXCEPTION(
true, Exceptions::RuntimeError,
"Stratimikos only works for Scalar=double.")
114 virtual ~StratimikosSmoother() =
default;
118 void SetParameterList(
const Teuchos::ParameterList& paramList) {};
123 void DeclareInput(Level ¤tLevel)
const {};
135 void Setup(Level ¤tLevel) {};
145 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {};
152 RCP<SmootherPrototype>
Copy()
const {
return Teuchos::null; };
160 std::string description()
const {
return std::string(
""); };
165 void print(Teuchos::FancyOStream &out,
const VerbLevel verbLevel = Default)
const {};
173 size_t getNodeSmootherComplexity()
const {
return Teuchos::OrdinalTraits<size_t>::invalid(); };
178 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
181#undef MUELU_STRATIMIKOSSMOOTHER_SHORT
184 StratimikosSmoother(
const std::string type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
187 virtual ~StratimikosSmoother() =
default;
191 void SetParameterList(
const Teuchos::ParameterList& paramList);
196 void DeclareInput(Level ¤tLevel)
const;
208 void Setup(Level ¤tLevel);
218 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
225 RCP<SmootherPrototype>
Copy()
const;
233 std::string description()
const;
238 void print(Teuchos::FancyOStream &out,
const VerbLevel verbLevel = Default)
const;
246 size_t getNodeSmootherComplexity()
const;
249 void SetupStratimikos (Level& currentLevel);
256 void ExperimentalDropVertConnections(RCP<Matrix> & filteredA, Level& currentLevel);
262 Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > solver_;
267 bool recurMgOnFilteredA_ =
false;
272#define MUELU_STRATIMIKOSSMOOTHER_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Base class for smoother prototypes.
GlobalOrdinal global_ordinal_type
LocalOrdinal local_ordinal_type
Namespace for MueLu classes and methods.