MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_BlockedJacobiSmoother_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_BLOCKEDJACOBISMOOTHER_DECL_HPP_
11#define MUELU_BLOCKEDJACOBISMOOTHER_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
74// ToDo (mayr) Inherit from common base class with BlockedGaussSeidelSmoother
75template <class Scalar = SmootherPrototype<>::scalar_type,
79class BlockedJacobiSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
80 typedef Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node> MapExtractorClass;
81
82#undef MUELU_BLOCKEDJACOBISMOOTHER_SHORT
84
85 public:
87
88
92
94 virtual ~BlockedJacobiSmoother();
96
98
99 RCP<const ParameterList> GetValidParameterList() const;
100
101 void DeclareInput(Level &currentLevel) const;
102
104 // void AddFactoryManager(RCP<const FactoryManagerBase> FactManager);
105
107 void AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos);
108
110
112
113
119 void Setup(Level &currentLevel);
120
128 void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero = false) const;
130
131 RCP<SmootherPrototype> Copy() const;
132
134
135
137 std::string description() const;
138
143 void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
144
146 size_t getNodeSmootherComplexity() const;
147
149
150 private:
152 std::string type_;
153
155 std::vector<Teuchos::RCP<const FactoryManagerBase> > FactManager_;
156
158 std::vector<Teuchos::RCP<const SmootherBase> > Inverse_;
159
161 std::vector<bool> bIsBlockedOperator_;
162
164 RCP<FactoryBase> AFact_;
165
167 RCP<Matrix> A_;
168
170 RCP<const MapExtractorClass> rangeMapExtractor_;
171
173 RCP<const MapExtractorClass> domainMapExtractor_;
174}; // class BlockedJacobiSmoother
175
176} // namespace MueLu
177
178#define MUELU_BLOCKEDJACOBISMOOTHER_SHORT
179
180#endif /* MUELU_BLOCKEDJACOBISMOOTHER_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
block Jacobi method for blocked matrices
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver.
RCP< const MapExtractorClass > domainMapExtractor_
RCP< const ParameterList > GetValidParameterList() const
Input.
void Setup(Level &currentLevel)
Setup routine In the Setup method the Inverse_ vector is filled with the corresponding SmootherBase o...
RCP< Matrix > A_
internal blocked operator "A" generated by AFact_
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
std::vector< Teuchos::RCP< const SmootherBase > > Inverse_
vector of smoother/solver factories
std::string description() const
Return a simple one-line description of this object.
void DeclareInput(Level &currentLevel) const
Input.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager.
RCP< const MapExtractorClass > rangeMapExtractor_
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.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
std::vector< bool > bIsBlockedOperator_
vector storing whether sub-block is a blocked operator (needed for nested blocked smoothers using Thy...
Class that holds all level-specific information.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.