MueLu Version of the Day
Loading...
Searching...
No Matches
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
15#include <Teuchos_ParameterList.hpp>
16
17// Xpetra
18#include <Xpetra_MapExtractor_fwd.hpp>
19#include <Xpetra_MultiVectorFactory_fwd.hpp>
20#include <Xpetra_Matrix_fwd.hpp>
21
22// MueLu
24#include "MueLu_SmootherPrototype.hpp"
28
31
32namespace MueLu {
33
40template <class Scalar = SmootherPrototype<>::scalar_type,
44class UzawaSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
45 typedef Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node> MapExtractorClass;
46
47#undef MUELU_UZAWASMOOTHER_SHORT
49
50 public:
52
53
54 RCP<const ParameterList> GetValidParameterList() const;
55
56 void DeclareInput(Level &currentLevel) const;
57
62 void SetVelocityPredictionFactoryManager(RCP<FactoryManager> FactManager);
63
68 void SetSchurCompFactoryManager(RCP<FactoryManager> FactManager);
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
93 RCP<SmootherPrototype> Copy() const;
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
114 RCP<const FactoryBase> AFact_;
115
117 RCP<Matrix> A_ = Teuchos::null; //<! internal blocked operator "A" generated by AFact_
118
119 RCP<const MapExtractorClass> rangeMapExtractor_;
120 RCP<const MapExtractorClass> domainMapExtractor_;
121
123 Teuchos::RCP<Vector> diagFinv_;
124 Teuchos::RCP<Matrix> F_;
125 Teuchos::RCP<Matrix> G_;
126 Teuchos::RCP<Matrix> D_;
127 Teuchos::RCP<Matrix> Z_;
128
129 Teuchos::RCP<SmootherBase> velPredictSmoo_;
130 Teuchos::RCP<SmootherBase> schurCompSmoo_;
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_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Base class for smoother prototypes.
Block triangle Uzawa smoother for 2x2 block matrices.
RCP< Matrix > A_
block operator
RCP< SmootherPrototype > Copy() const
void Setup(Level &currentLevel)
Setup routine.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
Vector of internal factory managers.
RCP< const ParameterList > GetValidParameterList() const
Input.
Teuchos::RCP< Matrix > D_
divergence operator
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager at a specific position.
void Apply(MultiVector &X, MultiVector const &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
Teuchos::RCP< Matrix > Z_
pressure stabilization term or null block
std::string description() const
Return a simple one-line description of this object.
Teuchos::RCP< SmootherBase > velPredictSmoo_
smoother for velocity prediction
void SetSchurCompFactoryManager(RCP< FactoryManager > FactManager)
Set factory manager for internal SchurComplement handling.
Teuchos::RCP< SmootherBase > schurCompSmoo_
smoother for SchurComplement equation
std::string type_
smoother type
RCP< const MapExtractorClass > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
Teuchos::RCP< Matrix > G_
pressure gradient operator
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.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void SetVelocityPredictionFactoryManager(RCP< FactoryManager > FactManager)
Set factory manager for internal velocity prediction.
RCP< const FactoryBase > AFact_
A Factory.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
Teuchos::RCP< Matrix > F_
fluid operator
Teuchos::RCP< Vector > diagFinv_
matrices
RCP< const MapExtractorClass > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
Namespace for MueLu classes and methods.