MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_RefMaxwellSmoother_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef MUELU_REFMAXWELLSMOOTHER_DECL_HPP
11 #define MUELU_REFMAXWELLSMOOTHER_DECL_HPP
12 
14 
15 #include <Xpetra_Matrix_fwd.hpp>
16 
17 #include "MueLu_ConfigDefs.hpp"
18 
20 
21 #include "MueLu_Level_fwd.hpp"
22 #include "MueLu_SmootherPrototype.hpp"
23 #include "MueLu_RefMaxwell.hpp"
24 
25 namespace MueLu {
26 
34 template <class Scalar = SmootherPrototype<>::scalar_type,
35  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
36  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
37  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
38 class RefMaxwellSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
39 #undef MUELU_REFMAXWELLSMOOTHER_SHORT
40 #include "MueLu_UseShortNames.hpp"
41 
42  public:
44 
45 
52  RefMaxwellSmoother(const std::string type, const Teuchos::ParameterList& paramList);
53 
55  virtual ~RefMaxwellSmoother() = default;
56 
58 
59  void SetParameterList(const Teuchos::ParameterList& paramList);
60 
62 
63 
64  void DeclareInput(Level& currentLevel) const;
65 
67 
69 
70 
76  void Setup(Level& currentLevel);
77 
86  void Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero = false) const;
87 
89 
91 
92 
94 
96 
98 
99 
101  std::string description() const;
102 
104  // using MueLu::Describable::describe; // overloading, not hiding
105  // void describe(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const
106  void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const;
107 
109 
111  size_t getNodeSmootherComplexity() const;
112 
113  private:
114  void SetupRefMaxwell(Level& currentLevel);
115 
116  private:
117  std::string type_;
118  std::string cachedDescription_;
119 
122 
123 }; // class RefMaxwellSmoother
124 
125 } // namespace MueLu
126 
127 #define MUELU_REFMAXWELLSMOOTHER_SHORT
128 #endif // MUELU_REFMAXWELLSMOOTHER_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
RefMaxwellSmoother(const std::string type, const Teuchos::ParameterList &paramList)
Constructor.
RCP< SmootherPrototype > Copy() const
void SetupRefMaxwell(Level &currentLevel)
RCP< Operator > op_
matrix, used in apply if solving residual equation
virtual ~RefMaxwellSmoother()=default
Destructor.
Base class for smoother prototypes.
MueLu::DefaultNode Node
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Class that encapsulates Operator smoothers.
std::string description() const
Return a simple one-line description of this object.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void DeclareInput(Level &currentLevel) const
Input.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
void SetParameterList(const Teuchos::ParameterList &paramList)
Set parameters from a parameter list and return with default values.
void Setup(Level &currentLevel)
Set up the smoother.