MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_RAPShiftFactory_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_RAPSHIFTFACTORY_DECL_HPP
11
#define MUELU_RAPSHIFTFACTORY_DECL_HPP
12
13
#include <string>
14
15
#include <Xpetra_Matrix_fwd.hpp>
16
#include <Xpetra_MatrixFactory2_fwd.hpp>
17
#include <Xpetra_Vector_fwd.hpp>
18
#include <Xpetra_VectorFactory_fwd.hpp>
19
20
#include "
MueLu_ConfigDefs.hpp
"
21
#include "
MueLu_RAPShiftFactory_fwd.hpp
"
22
23
#include "
MueLu_FactoryBase_fwd.hpp
"
24
#include "
MueLu_Level_fwd.hpp
"
25
#include "
MueLu_PerfUtils_fwd.hpp
"
26
#include "
MueLu_TwoLevelFactoryBase.hpp
"
27
28
namespace
MueLu
{
36
template
<
class
Scalar
=
DefaultScalar
,
37
class
LocalOrdinal
=
DefaultLocalOrdinal
,
38
class
GlobalOrdinal
=
DefaultGlobalOrdinal
,
39
class
Node
=
DefaultNode
>
40
class
RAPShiftFactory
:
public
TwoLevelFactoryBase
{
41
#undef MUELU_RAPSHIFTFACTORY_SHORT
42
#include "
MueLu_UseShortNames.hpp
"
43
44
public
:
46
47
48
RAPShiftFactory
();
49
50
virtual
~RAPShiftFactory
() {}
51
53
55
56
57
RCP<const ParameterList>
GetValidParameterList
()
const
;
58
59
void
DeclareInput
(
Level
&fineLevel,
Level
&coarseLevel)
const
;
60
62
64
65
void
Build
(
Level
&fineLevel,
Level
&coarseLevel)
const
;
67
69
70
72
void
SetImplicitTranspose
(
bool
const
&implicit) {
73
implicitTranspose_
= implicit;
74
}
75
76
void
SetShifts
(std::vector<Scalar> &shifts) {
77
shifts_
.clear();
78
shifts_
= shifts;
79
}
80
82
84
89
void
AddTransferFactory
(
const
RCP<const FactoryBase> &factory);
90
91
// TODO add a function to remove a specific transfer factory?
92
94
size_t
NumTransferFactories
()
const
{
return
transferFacts_
.size(); }
95
97
98
private
:
100
bool
implicitTranspose_
;
101
103
std::vector<RCP<const FactoryBase> >
transferFacts_
;
104
105
// vector of shifting terms
106
std::vector<Scalar>
shifts_
;
107
108
};
// class RAPShiftFactory
109
110
}
// namespace MueLu
111
112
#define MUELU_RAPSHIFTFACTORY_SHORT
113
#endif
// MUELU_RAPSHIFTFACTORY_DECL_HPP
MueLu_ConfigDefs.hpp
MueLu_FactoryBase_fwd.hpp
MueLu_Level_fwd.hpp
MueLu_PerfUtils_fwd.hpp
MueLu_RAPShiftFactory_fwd.hpp
MueLu_TwoLevelFactoryBase.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::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::RAPShiftFactory::DeclareInput
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
Definition
MueLu_RAPShiftFactory_def.hpp:74
MueLu::RAPShiftFactory::SetShifts
void SetShifts(std::vector< Scalar > &shifts)
Definition
MueLu_RAPShiftFactory_decl.hpp:76
MueLu::RAPShiftFactory::SetImplicitTranspose
void SetImplicitTranspose(bool const &implicit)
Indicate that the restriction operator action should be implicitly defined by the transpose of the pr...
Definition
MueLu_RAPShiftFactory_decl.hpp:72
MueLu::RAPShiftFactory::RAPShiftFactory
RAPShiftFactory()
Definition
MueLu_RAPShiftFactory_def.hpp:31
MueLu::RAPShiftFactory::GetValidParameterList
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Definition
MueLu_RAPShiftFactory_def.hpp:36
MueLu::RAPShiftFactory::AddTransferFactory
void AddTransferFactory(const RCP< const FactoryBase > &factory)
Add transfer factory in the end of list of transfer factories in RepartitionAcFactory.
Definition
MueLu_RAPShiftFactory_def.hpp:358
MueLu::RAPShiftFactory::~RAPShiftFactory
virtual ~RAPShiftFactory()
Definition
MueLu_RAPShiftFactory_decl.hpp:50
MueLu::RAPShiftFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node >::transferFacts_
std::vector< RCP< const FactoryBase > > transferFacts_
Definition
MueLu_RAPShiftFactory_decl.hpp:103
MueLu::RAPShiftFactory::NumTransferFactories
size_t NumTransferFactories() const
Returns number of transfer factories.
Definition
MueLu_RAPShiftFactory_decl.hpp:94
MueLu::RAPShiftFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node >::shifts_
std::vector< Scalar > shifts_
Definition
MueLu_RAPShiftFactory_decl.hpp:106
MueLu::RAPShiftFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node >::implicitTranspose_
bool implicitTranspose_
Definition
MueLu_RAPShiftFactory_decl.hpp:100
MueLu::RAPShiftFactory::Build
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
Definition
MueLu_RAPShiftFactory_def.hpp:133
MueLu::TwoLevelFactoryBase::TwoLevelFactoryBase
TwoLevelFactoryBase()
Constructor.
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
Misc
MueLu_RAPShiftFactory_decl.hpp
Generated by
1.17.0