MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_SmootherPrototype_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_SMOOTHERPROTOTYPE_DECL_HPP
11#define MUELU_SMOOTHERPROTOTYPE_DECL_HPP
12
13#include "MueLu_ConfigDefs.hpp"
16#include "MueLu_Factory.hpp"
17
18namespace MueLu {
19
20class Level;
21
34template <class Scalar = SmootherBase<>::scalar_type,
38class SmootherPrototype : public SmootherBase<Scalar, LocalOrdinal, GlobalOrdinal, Node>,
39 public Factory {
40 public:
44 typedef Node node_type;
45
46 private:
47#undef MUELU_SMOOTHERPROTOTYPE_SHORT
49
50 public:
52
53
55
56 virtual ~SmootherPrototype();
57
59
61
62
63 virtual void DeclareInput(Level &currentLevel) const = 0;
64
66
68
69
70 virtual void Setup(Level &) = 0;
71
72 virtual RCP<SmootherPrototype> Copy() const = 0;
73
75
77
78
80 bool IsSetup() const;
81
83 // Developpers: this method must be called by your Setup() method.
84 void IsSetup(bool const &ToF);
85
87
89
90 virtual void CallBuild(Level & /* requestedLevel */) const {
91 TEUCHOS_TEST_FOR_EXCEPT(true);
92 }
93
95 virtual void CallDeclareInput(Level &requestedLevel) const {
96 DeclareInput(requestedLevel);
97 }
98
100
101 private:
103
104}; // class SmootherPrototype
105
106} // namespace MueLu
107
108// TODO: private copy constructor
109// TODO: update comments
110
111#define MUELU_SMOOTHERPROTOTYPE_SHORT
112#endif // MUELU_SMOOTHERPROTOTYPE_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Base class for smoothers.
GlobalOrdinal global_ordinal_type
Base class for smoother prototypes.
virtual void DeclareInput(Level &currentLevel) const =0
Input.
SmootherPrototype()
@nameConstructors/Destructors.
virtual void CallDeclareInput(Level &requestedLevel) const
virtual RCP< SmootherPrototype > Copy() const =0
bool IsSetup() const
Get the state of a smoother prototype.
virtual void Setup(Level &)=0
virtual void CallBuild(Level &) const
Namespace for MueLu classes and methods.