MueLu Version of the Day
Loading...
Searching...
No Matches
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>
14#include <Xpetra_MultiVector_fwd.hpp>
15
16#include "MueLu_ConfigDefs.hpp"
17
18#include "MueLu_SmootherPrototype.hpp"
20
21namespace MueLu {
22
39template <class Scalar = SmootherPrototype<>::scalar_type,
43class ProjectorSmoother : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
44#undef MUELU_PROJECTORSMOOTHER_SHORT
46
47 public:
49
50
52 ProjectorSmoother(RCP<SmootherPrototype> coarseSolver);
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
80 RCP<SmootherPrototype> Copy() const;
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:
98 RCP<MultiVector> Borth_;
99 RCP<SmootherPrototype> coarseSolver_;
100
101}; // class ProjectorSmoother
102
103} // namespace MueLu
104
105#define MUELU_PROJECTORSMOOTHER_SHORT
106#endif // MUELU_PROJECTORSMOOTHER_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
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.
RCP< SmootherPrototype > Copy() const
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void Setup(Level &currentLevel)
Set up the direct solver.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
std::string description() const
Return a simple one-line description of this object.
void DeclareInput(Level &currentLevel) const
Input.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.