MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
16 
17 #include <Xpetra_Matrix_fwd.hpp>
22 
24 
25 #include "MueLu_SmootherPrototype.hpp"
29 
30 namespace MueLu {
31 
73 template <class Scalar = SmootherPrototype<>::scalar_type,
74  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
75  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
76  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
77 class BlockedGaussSeidelSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
79 
80 #undef MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_SHORT
81 #include "MueLu_UseShortNames.hpp"
82 
83  public:
85 
86 
90 
94 
96 
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 
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 
163 
166 
169 
172 }; // class Amesos2Smoother
173 
174 } // namespace MueLu
175 
176 #define MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_SHORT
177 
178 #endif /* MUELU_BLOCKEDGAUSSSEIDELSMOOTHER_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
RCP< const MapExtractorClass > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
Base class for smoother prototypes.
block Gauss-Seidel method for blocked matrices
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level verbLevel to an FancyOStream object out.
MueLu::DefaultNode Node
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< bool > bIsBlockedOperator_
vector storing whether sub-block is a blocked operator (needed for nested blocked smoothers using Thy...
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
void Setup(Level &currentLevel)
Setup routine In the Setup method the Inverse_ vector is filled with the corresponding SmootherBase o...
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
RCP< const ParameterList > GetValidParameterList() const
Input.
RCP< Matrix > A_
internal blocked operator &quot;A&quot; generated by AFact_
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.
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager.