MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_IndefBlockedDiagonalSmoother_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 /*
11  * MueLu_IndefBlockedDiagonalSmoother_decl.hpp
12  *
13  * Created on: 13 May 2014
14  * Author: wiesner
15  */
16 
17 #ifndef MUELU_INDEFBLOCKEDDIAGONALSMOOTHER_DECL_HPP_
18 #define MUELU_INDEFBLOCKEDDIAGONALSMOOTHER_DECL_HPP_
19 
20 #include "MueLu_ConfigDefs.hpp"
21 
23 
24 // Xpetra
27 #include <Xpetra_Matrix_fwd.hpp>
28 
29 // MueLu
31 #include "MueLu_SmootherPrototype.hpp"
35 
38 
39 namespace MueLu {
40 
51 template <class Scalar = SmootherPrototype<>::scalar_type,
52  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
53  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
54  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
55 class IndefBlockedDiagonalSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
57 
58 #undef MUELU_INDEFBLOCKEDDIAGONALSMOOTHER_SHORT
59 #include "MueLu_UseShortNames.hpp"
60 
61  public:
63 
64 
68 
72 
74 
75 
77 
78  void DeclareInput(Level &currentLevel) const;
79 
81  void AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos = 0);
82 
84 
86 
87 
90  void Setup(Level &currentLevel);
91 
97  void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero = false) const;
99 
101 
103 
104 
106  std::string description() const;
107 
109  // using MueLu::Describable::describe; // overloading, not hiding
110  void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
111 
113  size_t getNodeSmootherComplexity() const;
114 
116 
117  private:
119  std::string type_;
120 
122 
124  RCP<Matrix> A_; // < ! internal blocked operator "A" generated by AFact_
127 
130 
134 
136 
141  std::vector<Teuchos::RCP<const FactoryManagerBase> > FactManager_;
142 };
143 
144 } // namespace MueLu
145 
146 #define MUELU_INDEFBLOCKEDDIAGONALSMOOTHER_SHORT
147 
148 #endif /* MUELU_INDEFBLOCKEDDIAGONALSMOOTHER_DECL_HPP_ */
std::string description() const
Return a simple one-line description of this object.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
MueLu::DefaultLocalOrdinal LocalOrdinal
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
Base class for smoother prototypes.
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.
MueLu::DefaultNode Node
RCP< const MapExtractorClass > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
Cheap Blocked diagonal smoother for indefinite 2x2 block matrices.
RCP< const ParameterList > GetValidParameterList() const
Input.
RCP< Matrix > Z_
pressure stabilization term or null block
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Teuchos::RCP< SmootherBase > velPredictSmoo_
Block smoothers.
Teuchos::RCP< SmootherBase > schurCompSmoo_
smoother for SchurComplement equation
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos=0)
Add a factory manager for BraessSarazin internal SchurComplement handling.
RCP< const MapExtractorClass > domainMapExtractor_
domain map extractor (from A_ generated by AFact)