MueLu Version of the Day
Loading...
Searching...
No Matches
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
14#include <Teuchos_ParameterList.hpp>
15
16// Xpetra
17#include <Xpetra_MapExtractor_fwd.hpp>
18#include <Xpetra_MultiVectorFactory_fwd.hpp>
19#include <Xpetra_Matrix_fwd.hpp>
20
21// MueLu
23#include "MueLu_SmootherPrototype.hpp"
28
30
31namespace MueLu {
32
39template <class Scalar = SmootherPrototype<>::scalar_type,
43class BraessSarazinSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
44#undef MUELU_BRAESSSARAZINSMOOTHER_SHORT
46
47 public:
49
50
51 RCP<const ParameterList> GetValidParameterList() const;
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
81 RCP<SmootherPrototype> Copy() const;
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
105 RCP<const FactoryBase> AFact_;
106 RCP<const FactoryManagerBase> FactManager_;
107
109 RCP<Matrix> A_ = Teuchos::null; // < ! internal blocked operator "A" generated by AFact_
110
111 RCP<const MapExtractor> rangeMapExtractor_;
112 RCP<const MapExtractor> domainMapExtractor_;
113
115 RCP<Matrix> A00_;
116 RCP<Matrix> A01_;
117 RCP<Matrix> A10_;
118 RCP<Matrix> A11_;
119 RCP<Matrix> S_;
120 RCP<Vector> D_;
121
122 Teuchos::RCP<SmootherBase> smoo_;
123
124}; // class Amesos2Smoother
125
126} // namespace MueLu
127
128#define MUELU_BRAESSSARAZINSMOOTHER_SHORT
129#endif /* MUELU_BRAESSSARAZINSMOOTHER_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
BraessSarazin smoother for 2x2 block matrices.
RCP< Matrix > A01_
Block (0,1) [typically, pressure gradient operator].
RCP< Matrix > A10_
Block (1,0) [typically, divergence operator].
RCP< const ParameterList > GetValidParameterList() const
Input.
RCP< const MapExtractor > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
RCP< const FactoryBase > AFact_
A Factory.
RCP< Matrix > A11_
Block (1,1) [typically, pressure stabilization term or null block].
std::string description() const
Return a simple one-line description of this object.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
RCP< Vector > D_
Inverse to approximation to block (0,0). Here, D_ = omega*inv(diag(A(0,0)))
RCP< const MapExtractor > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
void DeclareInput(Level &currentLevel) const
Input.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void Setup(Level &currentLevel)
Setup routine.
Teuchos::RCP< SmootherBase > smoo_
Smoother for SchurComplement equation.
RCP< const FactoryManagerBase > FactManager_
Factory manager for creating the Schur Complement.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos=0)
Add a factory manager for BraessSarazin internal SchurComplement handling.
Class that holds all level-specific information.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.