MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_SmootherFactory_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_SMOOTHERFACTORY_DECL_HPP
11 #define MUELU_SMOOTHERFACTORY_DECL_HPP
12 
13 #include "MueLu_ConfigDefs.hpp"
15 
17 
18 #include "MueLu_Level_fwd.hpp"
21 
22 namespace MueLu {
23 
50 template <class Scalar = double,
51  class LocalOrdinal = int,
53  class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
55  public:
59  typedef Node node_type;
60 
61  private:
62 #undef MUELU_SMOOTHERFACTORY_SHORT
63 #include "MueLu_UseShortNames.hpp"
64 
65  public:
67 
68 
107  // Note: Teuchos::null as parameter allowed (= no smoother)
108  // Note: precondition: input smoother must not be Setup()
109  SmootherFactory(RCP<SmootherPrototype> preAndPostSmootherPrototype = Teuchos::null);
110 
111  SmootherFactory(RCP<SmootherPrototype> preSmootherPrototype, RCP<SmootherPrototype> postSmootherPrototype);
112 
113  virtual ~SmootherFactory();
115 
117 
118 
120  void SetSmootherPrototypes(RCP<SmootherPrototype> preAndPostSmootherPrototype);
121 
123  void SetSmootherPrototypes(RCP<SmootherPrototype> preSmootherPrototype, RCP<SmootherPrototype> postSmootherPrototype);
124 
126  void GetSmootherPrototypes(RCP<SmootherPrototype>& preSmootherPrototype, RCP<SmootherPrototype>& postSmootherPrototype) const;
127 
129 
130 
132 
133  void DeclareInput(Level& currentLevel) const;
134 
136 
138 
139 
156  void Build(Level& currentLevel) const;
157 
158  void BuildSmoother(Level& currentLevel, const PreOrPost preOrPost = BOTH) const; // Build()
159 
161 
163 
164 
166  std::string description() const;
167 
169  using MueLu::Describable::describe; // overloading, not hiding
170  void describe(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const;
171 
173 
174  private:
177 
178  void CheckPrototypes() const;
179 
181 
182 }; // class SmootherFactory
183 
184 } // namespace MueLu
185 
186 // TODO: doc: setup done twice if PostSmoother object != PreSmoother object and no adv. reused capability
187 #define MUELU_SMOOTHERFACTORY_SHORT
188 #endif // MUELU_SMOOTHERFACTORY_DECL_HPP
Generic Smoother Factory for generating the smoothers of the MG hierarchy.
SmootherFactory(RCP< SmootherPrototype > preAndPostSmootherPrototype=Teuchos::null)
Constructor.
MueLu::DefaultLocalOrdinal LocalOrdinal
virtual void describe(Teuchos::FancyOStream &out_arg, const VerbLevel verbLevel=Default) const
RCP< SmootherPrototype > postSmootherPrototype_
RCP< const ParameterList > GetValidParameterList() const
Input.
MueLu::DefaultNode Node
void BuildSmoother(Level &currentLevel, const PreOrPost preOrPost=BOTH) const
void describe(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
void Build(Level &currentLevel) const
Creates pre and post smoothers.
void SetSmootherPrototypes(RCP< SmootherPrototype > preAndPostSmootherPrototype)
Set smoother prototypes.
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
std::string description() const
Return a simple one-line description of this object.
RCP< SmootherPrototype > preSmootherPrototype_
void GetSmootherPrototypes(RCP< SmootherPrototype > &preSmootherPrototype, RCP< SmootherPrototype > &postSmootherPrototype) const
Get smoother prototypes.
void DeclareInput(Level &currentLevel) const
Specifies the data that this class needs, and the factories that generate that data.