MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_SimpleSmoother_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_SIMPLESMOOTHER_DECL_HPP_
11 #define MUELU_SIMPLESMOOTHER_DECL_HPP_
12 
13 #include "MueLu_ConfigDefs.hpp"
14 
16 
17 // Xpetra
20 #include <Xpetra_Matrix_fwd.hpp>
21 
22 // MueLu
24 #include "MueLu_SmootherPrototype.hpp"
28 #include "MueLu_Utilities_fwd.hpp"
29 
32 
33 namespace MueLu {
34 
41 template <class Scalar = SmootherPrototype<>::scalar_type,
42  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
43  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
44  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
45 class SimpleSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
47 
48 #undef MUELU_SIMPLESMOOTHER_SHORT
49 #include "MueLu_UseShortNames.hpp"
50 
51  public:
53 
54 
57 
59  virtual ~SimpleSmoother();
60 
62 
64 
65 
67 
68  void DeclareInput(Level &currentLevel) const;
69 
73 
77 
79  void AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos);
80 
82 
84 
85 
95  void Setup(Level &currentLevel);
96 
102  void Apply(MultiVector &X, MultiVector const &B, bool InitialGuessIsZero = false) const;
104 
106 
108 
109 
111  std::string description() const;
112 
114  // using MueLu::Describable::describe; // overloading, not hiding
115  void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
116 
118  size_t getNodeSmootherComplexity() const;
119 
121 
122  private:
124  std::string type_;
125 
128 
131 
134 
137 
140 
143 
146 
149 
152 
155 
157 
160 
163 
169  std::vector<Teuchos::RCP<const FactoryManagerBase> > FactManager_;
170 };
171 
172 } // namespace MueLu
173 
174 #define MUELU_SIMPLESMOOTHER_SHORT
175 
176 #endif /* MUELU_SIMPLESMOOTHER_DECL_HPP_ */
Teuchos::RCP< SmootherBase > velPredictSmoo_
Smoother for velocity prediction.
void SetSchurCompFactoryManager(RCP< FactoryManager > FactManager)
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager at a specific position.
MueLu::DefaultLocalOrdinal LocalOrdinal
std::string type_
smoother type
Teuchos::RCP< SmootherBase > schurCompSmoo_
Smoother for SchurComplement equation.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
Vector of internal factory managers.
void Setup(Level &currentLevel)
Setup routine.
Teuchos::RCP< Matrix > G_
Pressure gradient operator.
Base class for smoother prototypes.
void DeclareInput(Level &currentLevel) const
Input.
void SetVelocityPredictionFactoryManager(RCP< FactoryManager > FactManager)
virtual ~SimpleSmoother()
Destructor.
MueLu::DefaultNode Node
RCP< SmootherPrototype > Copy() const
RCP< Matrix > A_
Internal blocked operator &quot;A&quot; generated by AFact_.
Teuchos::RCP< Matrix > F_
Fluid operator.
RCP< const ParameterList > GetValidParameterList() const
Input.
std::string description() const
Return a simple one-line description of this object.
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
Teuchos::RCP< Vector > diagFinv_
Inverse diagonal of fluid operator (vector).
Teuchos::RCP< Matrix > Z_
Pressure stabilization term or null block.
Teuchos::RCP< Matrix > D_
Divergence operator.
void Apply(MultiVector &X, MultiVector const &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
RCP< const MapExtractorClass > domainMapExtractor_
Domain map extractor (from A_ generated by AFact)
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
RCP< const FactoryBase > AFact_
RCP< const MapExtractorClass > rangeMapExtractor_
Range map extractor (from A_ generated by AFact)
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
SIMPLE smoother for 2x2 block matrices.