MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_BlockedGaussSeidelSmoother_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_BLOCKEDGAUSSSEIDELSMOOTHER_DECL_HPP_
11#define MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_DECL_HPP_
12
13#include "MueLu_ConfigDefs.hpp"
14
15#include <Teuchos_ParameterList.hpp>
16
17#include <Xpetra_Matrix_fwd.hpp>
18#include <Xpetra_BlockedCrsMatrix_fwd.hpp>
19#include <Xpetra_ReorderedBlockedCrsMatrix_fwd.hpp>
20#include <Xpetra_MultiVectorFactory_fwd.hpp>
21#include <Xpetra_MapExtractor_fwd.hpp>
22
24
25#include "MueLu_SmootherPrototype.hpp"
29
30namespace MueLu {
31
73template <class Scalar = SmootherPrototype<>::scalar_type,
77class BlockedGaussSeidelSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
78 typedef Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node> MapExtractorClass;
79
80#undef MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_SHORT
82
83 public:
85
86
90
94
96
97 RCP<const ParameterList> GetValidParameterList() const;
98
99 void DeclareInput(Level &currentLevel) const;
100
102 // void AddFactoryManager(RCP<const FactoryManagerBase> FactManager);
103
105 void AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos);
106
108
110
111
117 void Setup(Level &currentLevel);
118
125 void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero = false) const;
127
128 RCP<SmootherPrototype> Copy() const;
129
131
132
134 std::string description() const;
135
141 void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
142
144 size_t getNodeSmootherComplexity() const;
145
147
148 private:
150 std::string type_;
151
153 std::vector<Teuchos::RCP<const FactoryManagerBase> > FactManager_;
154
156 std::vector<Teuchos::RCP<const SmootherBase> > Inverse_;
157
159 std::vector<bool> bIsBlockedOperator_;
160
162 RCP<FactoryBase> AFact_;
163
165 RCP<Matrix> A_;
166
168 RCP<const MapExtractorClass> rangeMapExtractor_;
169
171 RCP<const MapExtractorClass> domainMapExtractor_;
172}; // class Amesos2Smoother
173
174} // namespace MueLu
175
176#define MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_SHORT
177
178#endif /* MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
block Gauss-Seidel method for blocked matrices
void DeclareInput(Level &currentLevel) const
Input.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
std::vector< Teuchos::RCP< const SmootherBase > > Inverse_
vector of smoother/solver factories
RCP< const MapExtractorClass > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
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)
Add a factory manager.
RCP< const ParameterList > GetValidParameterList() const
Input.
RCP< const MapExtractorClass > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
std::vector< bool > bIsBlockedOperator_
vector storing whether sub-block is a blocked operator (needed for nested blocked smoothers using Thy...
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver. Solves the linear system AX=B using the constructed solver.
RCP< Matrix > A_
internal blocked operator "A" generated by AFact_
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level verbLevel to an FancyOStream object out.
void Setup(Level &currentLevel)
Setup routine In the Setup method the Inverse_ vector is filled with the corresponding SmootherBase o...
Class that holds all level-specific information.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.