MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_UzawaSmoother_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_UZAWASMOOTHER_DECL_HPP_
11 #define MUELU_UZAWASMOOTHER_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 
31 
32 namespace MueLu {
33 
40 template <class Scalar = SmootherPrototype<>::scalar_type,
41  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
42  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
43  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
44 class UzawaSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
46 
47 #undef MUELU_UZAWASMOOTHER_SHORT
48 #include "MueLu_UseShortNames.hpp"
49 
50  public:
52 
53 
55 
56  void DeclareInput(Level &currentLevel) const;
57 
63 
69 
74  void AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos);
75 
77 
79 
80 
83  void Setup(Level &currentLevel);
84 
90  void Apply(MultiVector &X, MultiVector const &B, bool InitialGuessIsZero = false) const;
92 
94 
96 
97 
99  std::string description() const;
100 
102  // using MueLu::Describable::describe; // overloading, not hiding
103  void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
104 
106  size_t getNodeSmootherComplexity() const;
107 
109 
110  private:
112  std::string type_ = "Uzawa";
113 
115 
117  RCP<Matrix> A_ = Teuchos::null; //<! internal blocked operator "A" generated by AFact_
118 
121 
128 
131 
138  std::vector<Teuchos::RCP<const FactoryManagerBase> > FactManager_;
139 
140 }; // class UzawaSmoother
141 
142 } // namespace MueLu
143 
144 #define MUELU_UZAWASMOOTHER_SHORT
145 
146 #endif /* MUELU_UZAWASMOOTHER_DECL_HPP_ */
void Setup(Level &currentLevel)
Setup routine.
MueLu::DefaultLocalOrdinal LocalOrdinal
RCP< const FactoryBase > AFact_
A Factory.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
Base class for smoother prototypes.
Teuchos::RCP< Matrix > D_
divergence operator
RCP< const MapExtractorClass > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
void DeclareInput(Level &currentLevel) const
Input.
void Apply(MultiVector &X, MultiVector const &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
MueLu::DefaultNode Node
RCP< const ParameterList > GetValidParameterList() const
Input.
RCP< const MapExtractorClass > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
void SetVelocityPredictionFactoryManager(RCP< FactoryManager > FactManager)
Set factory manager for internal velocity prediction.
Teuchos::RCP< Matrix > F_
fluid operator
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
Block triangle Uzawa smoother for 2x2 block matrices.
RCP< Matrix > A_
block operator
std::string description() const
Return a simple one-line description of this object.
RCP< SmootherPrototype > Copy() const
Teuchos::RCP< Matrix > Z_
pressure stabilization term or null block
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
Vector of internal factory managers.
Teuchos::RCP< Vector > diagFinv_
matrices
Teuchos::RCP< SmootherBase > schurCompSmoo_
smoother for SchurComplement equation
void SetSchurCompFactoryManager(RCP< FactoryManager > FactManager)
Set factory manager for internal SchurComplement handling.
Teuchos::RCP< Matrix > G_
pressure gradient operator
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Teuchos::RCP< SmootherBase > velPredictSmoo_
smoother for velocity prediction
std::string type_
smoother type
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager at a specific position.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass