MueLu
Version of the Day
Toggle main menu visibility
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
18
namespace
MueLu
{
27
28
template
<
class
Scalar
=
DefaultScalar
,
29
class
LocalOrdinal
=
DefaultLocalOrdinal
,
30
class
GlobalOrdinal
=
DefaultGlobalOrdinal
,
31
class
Node
=
DefaultNode
>
32
class
SmootherBase
:
public
virtual
BaseClass
{
33
public
:
34
typedef
Scalar
scalar_type
;
35
typedef
LocalOrdinal
local_ordinal_type
;
36
typedef
GlobalOrdinal
global_ordinal_type
;
37
typedef
Node
node_type
;
38
39
private
:
40
#undef MUELU_SMOOTHERBASE_SHORT
41
#include "
MueLu_UseShortNames.hpp
"
42
43
public
:
45
SmootherBase
() {}
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) {
60
constructionSuccessful_
= !fail;
61
if
(!fail)
62
constructionErrorMsg_
=
""
;
63
else
64
constructionErrorMsg_
= msg;
65
};
66
bool
constructionSuccessful
() {
return
constructionSuccessful_
; }
67
std::string
constructionErrorMsg
() {
return
constructionErrorMsg_
; }
68
70
71
private
:
72
bool
constructionSuccessful_
;
73
std::string
constructionErrorMsg_
;
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_BaseClass.hpp
MueLu_ConfigDefs.hpp
LocalOrdinal
MueLu::DefaultLocalOrdinal LocalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:13
Scalar
MueLu::DefaultScalar Scalar
Definition
MueLu_UseDefaultTypes.hpp:12
GlobalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:14
Node
MueLu::DefaultNode Node
Definition
MueLu_UseDefaultTypes.hpp:15
MueLu_UseShortNames.hpp
MueLu::BaseClass
Base class for MueLu classes.
Definition
MueLu_BaseClass.hpp:27
MueLu::SmootherBase::scalar_type
Scalar scalar_type
Definition
MueLu_SmootherBase.hpp:34
MueLu::SmootherBase::node_type
Node node_type
Definition
MueLu_SmootherBase.hpp:37
MueLu::SmootherBase< Scalar, LocalOrdinal, GlobalOrdinal, Node >::constructionSuccessful_
bool constructionSuccessful_
Definition
MueLu_SmootherBase.hpp:72
MueLu::SmootherBase::declareConstructionOutcome
void declareConstructionOutcome(bool fail, std::string msg)
Definition
MueLu_SmootherBase.hpp:59
MueLu::SmootherBase::constructionSuccessful
bool constructionSuccessful()
Definition
MueLu_SmootherBase.hpp:66
MueLu::SmootherBase::local_ordinal_type
LocalOrdinal local_ordinal_type
Definition
MueLu_SmootherBase.hpp:35
MueLu::SmootherBase< Scalar, LocalOrdinal, GlobalOrdinal, Node >::constructionErrorMsg_
std::string constructionErrorMsg_
Definition
MueLu_SmootherBase.hpp:73
MueLu::SmootherBase::Apply
virtual void Apply(MultiVector &x, const MultiVector &rhs, bool InitialGuessIsZero=false) const =0
Apply smoother.
MueLu::SmootherBase::constructionErrorMsg
std::string constructionErrorMsg()
Definition
MueLu_SmootherBase.hpp:67
MueLu::SmootherBase::SmootherBase
SmootherBase()
Definition
MueLu_SmootherBase.hpp:45
MueLu::SmootherBase::global_ordinal_type
GlobalOrdinal global_ordinal_type
Definition
MueLu_SmootherBase.hpp:36
MueLu::SmootherBase::~SmootherBase
virtual ~SmootherBase()
Definition
MueLu_SmootherBase.hpp:47
MueLu::SmootherBase::getNodeSmootherComplexity
virtual size_t getNodeSmootherComplexity() const =0
Compute a rough estimate of the cost to apply this smoother on this MPI rank. Return Teuchos::Ordinal...
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
MueLu::DefaultNode
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Definition
MueLu_Details_DefaultTypes.hpp:32
MueLu::DefaultGlobalOrdinal
int DefaultGlobalOrdinal
Definition
MueLu_Details_DefaultTypes.hpp:29
MueLu::DefaultLocalOrdinal
int DefaultLocalOrdinal
Definition
MueLu_Details_DefaultTypes.hpp:22
MueLu::DefaultScalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
Definition
MueLu_Details_DefaultTypes.hpp:20
src
Smoothers
MueLu_SmootherBase.hpp
Generated by
1.17.0