MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_BraessSarazinSmoother_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_BRAESSSARAZINSMOOTHER_DECL_HPP_
11 #define MUELU_BRAESSSARAZINSMOOTHER_DECL_HPP_
12 #include "MueLu_ConfigDefs.hpp"
13 
15 
16 // Xpetra
19 #include <Xpetra_Matrix_fwd.hpp>
20 
21 // MueLu
23 #include "MueLu_SmootherPrototype.hpp"
27 #include "MueLu_Utilities_fwd.hpp"
28 
30 
31 namespace MueLu {
32 
39 template <class Scalar = SmootherPrototype<>::scalar_type,
40  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
41  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
42  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
43 class BraessSarazinSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
44 #undef MUELU_BRAESSSARAZINSMOOTHER_SHORT
45 #include "MueLu_UseShortNames.hpp"
46 
47  public:
49 
50 
52 
53  void DeclareInput(Level &currentLevel) const;
54 
56  void AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos = 0);
57 
59 
61 
62 
71  void Setup(Level &currentLevel);
72 
78  void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero = false) const;
80 
82 
84 
85 
87  std::string description() const;
88 
94  void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
95 
97  size_t getNodeSmootherComplexity() const;
98 
100 
101  private:
103  std::string type_ = "Braess Sarazin";
104 
107 
109  RCP<Matrix> A_ = Teuchos::null; // < ! internal blocked operator "A" generated by AFact_
110 
113 
121 
123 
124 }; // class Amesos2Smoother
125 
126 } // namespace MueLu
127 
128 #define MUELU_BRAESSSARAZINSMOOTHER_SHORT
129 #endif /* MUELU_BRAESSSARAZINSMOOTHER_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
BraessSarazin smoother for 2x2 block matrices.
RCP< Vector > D_
Inverse to approximation to block (0,0). Here, D_ = omega*inv(diag(A(0,0)))
RCP< const MapExtractor > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
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.
RCP< SmootherPrototype > Copy() const
MueLu::DefaultNode Node
RCP< Matrix > A01_
Block (0,1) [typically, pressure gradient operator].
void DeclareInput(Level &currentLevel) const
Input.
MueLu::DefaultGlobalOrdinal GlobalOrdinal
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
RCP< Matrix > A11_
Block (1,1) [typically, pressure stabilization term or null block].
RCP< const ParameterList > GetValidParameterList() const
Input.
RCP< const FactoryBase > AFact_
A Factory.
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos=0)
Add a factory manager for BraessSarazin internal SchurComplement handling.
void Setup(Level &currentLevel)
Setup routine.
RCP< Matrix > A10_
Block (1,0) [typically, divergence operator].
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
std::string description() const
Return a simple one-line description of this object.
Teuchos::RCP< SmootherBase > smoo_
Smoother for SchurComplement equation.
RCP< const MapExtractor > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
RCP< const FactoryManagerBase > FactManager_
Factory manager for creating the Schur Complement.