MueLu Version of the Day
Loading...
Searching...
No Matches
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
22#include <Teuchos_ParameterList.hpp>
23
24// Xpetra
25#include <Xpetra_MapExtractor_fwd.hpp>
26#include <Xpetra_MultiVectorFactory_fwd.hpp>
27#include <Xpetra_Matrix_fwd.hpp>
28
29// MueLu
31#include "MueLu_SmootherPrototype.hpp"
35
38
39namespace MueLu {
40
51template <class Scalar = SmootherPrototype<>::scalar_type,
55class IndefBlockedDiagonalSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
56 typedef Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node> MapExtractorClass;
57
58#undef MUELU_INDEFBLOCKEDDIAGONALSMOOTHER_SHORT
60
61 public:
63
64
68
72
74
75
76 RCP<const ParameterList> GetValidParameterList() const;
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
100 RCP<SmootherPrototype> Copy() const;
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
121 RCP<const FactoryBase> AFact_;
122
124 RCP<Matrix> A_; // < ! internal blocked operator "A" generated by AFact_
125 RCP<Matrix> F_;
126 RCP<Matrix> Z_;
127
128 RCP<const MapExtractorClass> rangeMapExtractor_;
129 RCP<const MapExtractorClass> domainMapExtractor_;
130
132 Teuchos::RCP<SmootherBase> velPredictSmoo_;
133 Teuchos::RCP<SmootherBase> schurCompSmoo_;
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_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Cheap Blocked diagonal smoother for indefinite 2x2 block matrices.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
RCP< Matrix > Z_
pressure stabilization term or null block
std::string description() const
Return a simple one-line description of this object.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
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)
RCP< const MapExtractorClass > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
Teuchos::RCP< SmootherBase > schurCompSmoo_
smoother for SchurComplement equation
Teuchos::RCP< SmootherBase > velPredictSmoo_
Block smoothers.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
RCP< const ParameterList > GetValidParameterList() const
Input.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
Class that holds all level-specific information.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.