10#ifndef MUELU_STRATIMIKOSSMOOTHER_DECL_HPP
11#define MUELU_STRATIMIKOSSMOOTHER_DECL_HPP
13#include <Teuchos_ParameterList.hpp>
15#include <Xpetra_CrsMatrixWrap_fwd.hpp>
16#include <Xpetra_Matrix_fwd.hpp>
21#if defined(HAVE_MUELU_STRATIMIKOS) && defined(HAVE_MUELU_THYRA)
23#include <Tpetra_CrsMatrix.hpp>
27#include "MueLu_SmootherPrototype.hpp"
30#include <Thyra_LinearOpWithSolveBase.hpp>
44template <class Scalar = SmootherPrototype<>::scalar_type,
48class StratimikosSmoother :
public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
49#undef MUELU_STRATIMIKOSSMOOTHER_SHORT
67 template <
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
68 friend class StratimikosSmoother;
71 StratimikosSmoother(
const std::string type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList()){
72 TEUCHOS_TEST_FOR_EXCEPTION(
true, Exceptions::RuntimeError,
"Stratimikos only works for Scalar=double.")};
75 virtual ~StratimikosSmoother() =
default;
79 void SetParameterList(
const Teuchos::ParameterList& paramList){};
84 void DeclareInput(Level& currentLevel)
const {};
96 void Setup(Level& currentLevel){};
106 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {};
113 RCP<SmootherPrototype>
Copy()
const {
return Teuchos::null; };
121 std::string description()
const {
return std::string(
""); };
126 void print(Teuchos::FancyOStream& out,
const VerbLevel verbLevel = Default)
const {};
134 size_t getNodeSmootherComplexity()
const {
return Teuchos::OrdinalTraits<size_t>::invalid(); };
138template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
141#undef MUELU_STRATIMIKOSSMOOTHER_SHORT
144 StratimikosSmoother(
const std::string type,
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
147 virtual ~StratimikosSmoother() =
default;
151 void SetParameterList(
const Teuchos::ParameterList& paramList);
156 void DeclareInput(Level& currentLevel)
const;
168 void Setup(Level& currentLevel);
178 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
185 RCP<SmootherPrototype>
Copy()
const;
193 std::string description()
const;
198 void print(Teuchos::FancyOStream& out,
const VerbLevel verbLevel = Default)
const;
206 size_t getNodeSmootherComplexity()
const;
209 void SetupStratimikos(Level& currentLevel);
216 void ExperimentalDropVertConnections(RCP<Matrix>& filteredA, Level& currentLevel);
222 Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > solver_;
227 bool recurMgOnFilteredA_ =
false;
232#define MUELU_STRATIMIKOSSMOOTHER_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
GlobalOrdinal global_ordinal_type
LocalOrdinal local_ordinal_type
Namespace for MueLu classes and methods.