MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_SmootherBase.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_SMOOTHERBASE_HPP
11#define MUELU_SMOOTHERBASE_HPP
12
13#include "Xpetra_MultiVector.hpp"
14
15#include "MueLu_ConfigDefs.hpp"
16#include "MueLu_BaseClass.hpp"
17
18namespace MueLu {
28template <class Scalar = DefaultScalar,
31 class Node = DefaultNode>
32class SmootherBase : public virtual BaseClass {
33 public:
37 typedef Node node_type;
38
39 private:
40#undef MUELU_SMOOTHERBASE_SHORT
42
43 public:
46
47 virtual ~SmootherBase() {}
49
51
52
54 virtual void Apply(MultiVector& x, const MultiVector& rhs, bool InitialGuessIsZero = false) const = 0;
55
57 virtual size_t getNodeSmootherComplexity() const = 0;
58
59 void declareConstructionOutcome(bool fail, std::string msg) {
61 if (!fail)
63 else
65 };
68
70
71 private:
74
75}; // class SmootherBase
76} // namespace MueLu
77
78#define MUELU_SMOOTHERBASE_SHORT
79
80#endif // ifndef MUELU_SMOOTHERBASE_HPP
81
82// SmootherBase = Interface used by Hierarchy.Iterate(). Minimal condition to be used as smoother.
83// SmootherPrototype = minimal interface used by the generic SmootherFactory.
84// Note that one can implements and use his own SmootherFactory. In this case, SmootherBase is enough.
85// AdvSmootherPrototype = for more complex case of reusing setup between presmoother and postsmoother
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Base class for MueLu classes.
Base class for smoothers.
void declareConstructionOutcome(bool fail, std::string msg)
virtual void Apply(MultiVector &x, const MultiVector &rhs, bool InitialGuessIsZero=false) const =0
Apply smoother.
std::string constructionErrorMsg()
GlobalOrdinal global_ordinal_type
virtual size_t getNodeSmootherComplexity() const =0
Compute a rough estimate of the cost to apply this smoother on this MPI rank. Return Teuchos::Ordinal...
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar