MueLu Version of the Day
Loading...
Searching...
No Matches
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
22namespace MueLu {
23
50template <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
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
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
131 RCP<const ParameterList> GetValidParameterList() const;
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:
175 RCP<SmootherPrototype> preSmootherPrototype_;
176 RCP<SmootherPrototype> postSmootherPrototype_;
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
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
virtual void describe(Teuchos::FancyOStream &out_arg, const VerbLevel verbLevel=Default) const
Class that holds all level-specific information.
Generic Smoother Factory for generating the smoothers of the MG hierarchy.
void GetSmootherPrototypes(RCP< SmootherPrototype > &preSmootherPrototype, RCP< SmootherPrototype > &postSmootherPrototype) const
Get smoother prototypes.
RCP< SmootherPrototype > preSmootherPrototype_
void SetSmootherPrototypes(RCP< SmootherPrototype > preAndPostSmootherPrototype)
Set smoother prototypes.
RCP< const ParameterList > GetValidParameterList() const
Input.
std::string description() const
Return a simple one-line description of this object.
void DeclareInput(Level &currentLevel) const
Specifies the data that this class needs, and the factories that generate that data.
void BuildSmoother(Level &currentLevel, const PreOrPost preOrPost=BOTH) const
void describe(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
RCP< SmootherPrototype > postSmootherPrototype_
void Build(Level &currentLevel) const
Creates pre and post smoothers.
Namespace for MueLu classes and methods.