MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_ProjectorSmoother_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_PROJECTORSMOOTHER_DECL_HPP
11 #define MUELU_PROJECTORSMOOTHER_DECL_HPP
12 
13 #include <Xpetra_Matrix_fwd.hpp>
15 
16 #include "MueLu_ConfigDefs.hpp"
17 
18 #include "MueLu_SmootherPrototype.hpp"
19 #include "MueLu_Utilities_fwd.hpp"
20 
21 namespace MueLu {
22 
39 template <class Scalar = SmootherPrototype<>::scalar_type,
40  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
41  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
42  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
43 class ProjectorSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
44 #undef MUELU_PROJECTORSMOOTHER_SHORT
45 #include "MueLu_UseShortNames.hpp"
46 
47  public:
49 
50 
53 
55  virtual ~ProjectorSmoother();
57 
59 
60 
61  void DeclareInput(Level &currentLevel) const;
62 
64 
66 
67 
69  void Setup(Level &currentLevel);
70 
77  void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero = false) const;
79 
81 
83 
84 
86  std::string description() const;
87 
89  // using MueLu::Describable::describe; // overloading, not hiding
90  void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const;
91 
93  size_t getNodeSmootherComplexity() const { return coarseSolver_->getNodeSmootherComplexity(); }
94 
96 
97  private:
100 
101 }; // class ProjectorSmoother
102 
103 } // namespace MueLu
104 
105 #define MUELU_PROJECTORSMOOTHER_SHORT
106 #endif // MUELU_PROJECTORSMOOTHER_DECL_HPP
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.
MueLu::DefaultLocalOrdinal LocalOrdinal
Base class for smoother prototypes.
RCP< SmootherPrototype > coarseSolver_
MueLu::DefaultNode Node
virtual ~ProjectorSmoother()
Destructor.
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
RCP< SmootherPrototype > Copy() const
void Setup(Level &currentLevel)
Set up the direct solver.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
This class enables the elimination of the nullspace component of the solution through the use of proj...
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.
ProjectorSmoother(RCP< SmootherPrototype > coarseSolver)
Constructor.
void DeclareInput(Level &currentLevel) const
Input.