MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
16 
17 #include <Xpetra_Matrix_fwd.hpp>
22 
24 
25 #include "MueLu_SmootherPrototype.hpp"
29 
30 namespace MueLu {
31 
74 // ToDo (mayr) Inherit from common base class with BlockedGaussSeidelSmoother
75 template <class Scalar = SmootherPrototype<>::scalar_type,
76  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
77  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
78  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
79 class BlockedJacobiSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
81 
82 #undef MUELU_BLOCKEDJACOBISMOOTHER_SHORT
83 #include "MueLu_UseShortNames.hpp"
84 
85  public:
87 
88 
92 
94  virtual ~BlockedJacobiSmoother();
96 
98 
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 
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 
165 
168 
171 
174 }; // class BlockedJacobiSmoother
175 
176 } // namespace MueLu
177 
178 #define MUELU_BLOCKEDJACOBISMOOTHER_SHORT
179 
180 #endif /* MUELU_BLOCKEDJACOBISMOOTHER_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
RCP< const ParameterList > GetValidParameterList() const
Input.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
std::string description() const
Return a simple one-line description of this object.
Base class for smoother prototypes.
std::vector< Teuchos::RCP< const SmootherBase > > Inverse_
vector of smoother/solver factories
void Setup(Level &currentLevel)
Setup routine In the Setup method the Inverse_ vector is filled with the corresponding SmootherBase o...
MueLu::DefaultNode Node
RCP< const MapExtractorClass > domainMapExtractor_
std::vector< bool > bIsBlockedOperator_
vector storing whether sub-block is a blocked operator (needed for nested blocked smoothers using Thy...
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
void DeclareInput(Level &currentLevel) const
Input.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
block Jacobi method for blocked matrices
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver.
RCP< const MapExtractorClass > rangeMapExtractor_
domain map extractor (from A_ generated by AFact)
RCP< Matrix > A_
internal blocked operator &quot;A&quot; generated by AFact_
RCP< SmootherPrototype > Copy() const
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager.