MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_BelosSmoother_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_BELOSSMOOTHER_DECL_HPP
11
#define MUELU_BELOSSMOOTHER_DECL_HPP
12
13
#include <Teuchos_ParameterList.hpp>
14
15
#include <Xpetra_Matrix_fwd.hpp>
16
#include <Xpetra_MultiVectorFactory_fwd.hpp>
17
18
#include "
MueLu_ConfigDefs.hpp
"
19
20
#if defined(HAVE_MUELU_BELOS)
21
22
#include "
MueLu_BelosSmoother_fwd.hpp
"
23
24
#include "BelosTpetraAdapter.hpp"
25
#include <Tpetra_Operator.hpp>
26
#include <Tpetra_MultiVector.hpp>
27
28
#include "
MueLu_Level_fwd.hpp
"
29
#include "MueLu_SmootherPrototype.hpp"
30
#include "
MueLu_Utilities_fwd.hpp
"
31
32
#include <BelosSolverManager.hpp>
33
34
namespace
MueLu
{
35
45
46
template <class Scalar = SmootherPrototype<>::scalar_type,
47
class
LocalOrdinal
=
typename
SmootherPrototype<Scalar>::local_ordinal_type
,
48
class
GlobalOrdinal
=
typename
SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type
,
49
class
Node
=
typename
SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type
>
50
class
BelosSmoother
:
public
SmootherPrototype
<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
51
#undef MUELU_BELOSSMOOTHER_SHORT
52
#include "
MueLu_UseShortNames.hpp
"
53
54
public
:
56
57
// TODO: update doc for Belos.
66
67
#ifndef _MSC_VER
68
// Avoid error C3772: invalid friend template declaration
69
template
<
class
Scalar2,
class
LocalOrdinal2,
class
GlobalOrdinal2,
class
Node2>
70
friend
class
BelosSmoother
;
71
#endif
72
73
BelosSmoother
(
const
std::string type,
const
Teuchos::ParameterList& paramList = Teuchos::ParameterList());
74
76
virtual
~BelosSmoother
() =
default
;
77
79
80
void
SetParameterList
(
const
Teuchos::ParameterList& paramList);
81
83
84
85
void
DeclareInput
(
Level
& currentLevel)
const
;
86
88
90
91
97
void
Setup
(
Level
& currentLevel);
98
107
void
Apply
(MultiVector& X,
const
MultiVector& B,
bool
InitialGuessIsZero =
false
)
const
;
108
110
112
113
114
RCP<SmootherPrototype>
Copy
()
const
;
115
117
119
120
122
std::string
description
()
const
;
123
125
// using MueLu::Describable::describe; // overloading, not hiding
126
// void describe(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const
127
void
print
(Teuchos::FancyOStream& out,
const
VerbLevel
verbLevel =
Default
)
const
;
128
130
132
// RCP<Ifpack2::Preconditioner<Scalar,LocalOrdinal,GlobalOrdinal,Node> > getPreconditioner(){return prec_;}
133
135
size_t
getNodeSmootherComplexity
()
const
;
136
137
private
:
138
void
SetupBelos
(
Level
& currentLevel);
139
140
private
:
141
std::string
type_
;
142
143
typedef
Tpetra::MultiVector<SC, LO, GO, NO>
tMV
;
144
typedef
Tpetra::Operator<SC, LO, GO, NO>
tOP
;
145
RCP<Belos::LinearProblem<Scalar, tMV, tOP> >
tBelosProblem_
;
146
RCP<Belos::SolverManager<Scalar, tMV, tOP> >
tSolver_
;
147
149
RCP<Matrix>
A_
;
150
151
};
// class BelosSmoother
152
153
}
// namespace MueLu
154
155
#define MUELU_BELOSSMOOTHER_SHORT
156
#endif
// HAVE_MUELU_BELOS
157
#endif
// MUELU_BELOSSMOOTHER_DECL_HPP
MueLu_BelosSmoother_fwd.hpp
MueLu_ConfigDefs.hpp
MueLu_Level_fwd.hpp
LocalOrdinal
MueLu::DefaultLocalOrdinal LocalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:13
GlobalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:14
Node
MueLu::DefaultNode Node
Definition
MueLu_UseDefaultTypes.hpp:15
MueLu_UseShortNames.hpp
MueLu_Utilities_fwd.hpp
MueLu::BelosSmoother::type_
std::string type_
Definition
MueLu_BelosSmoother_decl.hpp:141
MueLu::BelosSmoother::tMV
Tpetra::MultiVector< SC, LO, GO, NO > tMV
Definition
MueLu_BelosSmoother_decl.hpp:143
MueLu::BelosSmoother::tSolver_
RCP< Belos::SolverManager< Scalar, tMV, tOP > > tSolver_
Definition
MueLu_BelosSmoother_decl.hpp:146
MueLu::BelosSmoother::Apply
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
Definition
MueLu_BelosSmoother_def.hpp:98
MueLu::BelosSmoother::print
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
Definition
MueLu_BelosSmoother_def.hpp:152
MueLu::BelosSmoother::BelosSmoother
friend class BelosSmoother
Constructor.
Definition
MueLu_BelosSmoother_decl.hpp:70
MueLu::BelosSmoother::tBelosProblem_
RCP< Belos::LinearProblem< Scalar, tMV, tOP > > tBelosProblem_
Definition
MueLu_BelosSmoother_decl.hpp:145
MueLu::BelosSmoother::A_
RCP< Matrix > A_
matrix, used in apply if solving residual equation
Definition
MueLu_BelosSmoother_decl.hpp:149
MueLu::BelosSmoother::tOP
Tpetra::Operator< SC, LO, GO, NO > tOP
Definition
MueLu_BelosSmoother_decl.hpp:144
MueLu::BelosSmoother::SetParameterList
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
Definition
MueLu_BelosSmoother_def.hpp:61
MueLu::BelosSmoother::DeclareInput
void DeclareInput(Level ¤tLevel) const
Input.
Definition
MueLu_BelosSmoother_def.hpp:66
MueLu::BelosSmoother::SetupBelos
void SetupBelos(Level ¤tLevel)
Definition
MueLu_BelosSmoother_def.hpp:81
MueLu::BelosSmoother::~BelosSmoother
virtual ~BelosSmoother()=default
Destructor.
MueLu::BelosSmoother::description
std::string description() const
Return a simple one-line description of this object.
Definition
MueLu_BelosSmoother_def.hpp:139
MueLu::BelosSmoother::getNodeSmootherComplexity
size_t getNodeSmootherComplexity() const
For diagnostic purposes.
Definition
MueLu_BelosSmoother_def.hpp:178
MueLu::BelosSmoother::Setup
void Setup(Level ¤tLevel)
Set up the smoother.
Definition
MueLu_BelosSmoother_def.hpp:71
MueLu::BelosSmoother::Copy
RCP< SmootherPrototype > Copy() const
Definition
MueLu_BelosSmoother_def.hpp:132
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::SmootherPrototype::node_type
Node node_type
Definition
MueLu_SmootherPrototype_decl.hpp:44
MueLu::SmootherPrototype::SmootherPrototype
SmootherPrototype()
@nameConstructors/Destructors.
Definition
MueLu_SmootherPrototype_def.hpp:18
MueLu::SmootherPrototype::global_ordinal_type
GlobalOrdinal global_ordinal_type
Definition
MueLu_SmootherPrototype_decl.hpp:43
MueLu::SmootherPrototype::local_ordinal_type
LocalOrdinal local_ordinal_type
Definition
MueLu_SmootherPrototype_decl.hpp:42
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
MueLu::VerbLevel
int VerbLevel
Definition
MueLu_VerbosityLevel.hpp:76
MueLu::Default
@ Default
Definition
MueLu_VerbosityLevel.hpp:70
src
Smoothers
MueLu_BelosSmoother_decl.hpp
Generated by
1.17.0