MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_UncoupledAggregationFactory_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_UNCOUPLEDAGGREGATIONFACTORY_DECL_HPP_
11
#define MUELU_UNCOUPLEDAGGREGATIONFACTORY_DECL_HPP_
12
13
#include <Xpetra_Map_fwd.hpp>
14
#include <Xpetra_Vector_fwd.hpp>
15
16
#include "
MueLu_ConfigDefs.hpp
"
17
#include "
MueLu_SingleLevelFactoryBase.hpp
"
18
#include "
MueLu_UncoupledAggregationFactory_fwd.hpp
"
19
20
#include "
MueLu_AggregationAlgorithmBase.hpp
"
21
#include "
MueLu_InterfaceAggregationAlgorithm_fwd.hpp
"
22
#include "
MueLu_OnePtAggregationAlgorithm_fwd.hpp
"
23
#include "
MueLu_PreserveDirichletAggregationAlgorithm_fwd.hpp
"
24
25
#include "
MueLu_AggregationPhase1Algorithm_fwd.hpp
"
26
#include "
MueLu_AggregationPhase2aAlgorithm_fwd.hpp
"
27
#include "
MueLu_AggregationPhase2bAlgorithm_fwd.hpp
"
28
#include "
MueLu_AggregationPhase3Algorithm_fwd.hpp
"
29
30
#include "
MueLu_Level_fwd.hpp
"
31
32
#include "
MueLu_LWGraph_fwd.hpp
"
33
#include "
MueLu_Aggregates_fwd.hpp
"
34
#include "
MueLu_Exceptions.hpp
"
35
36
namespace
MueLu
{
37
100
101
template
<
class
LocalOrdinal
=
DefaultLocalOrdinal
,
102
class
GlobalOrdinal
=
DefaultGlobalOrdinal
,
103
class
Node
=
DefaultNode
>
104
class
UncoupledAggregationFactory
:
public
SingleLevelFactoryBase
{
105
#undef MUELU_UNCOUPLEDAGGREGATIONFACTORY_SHORT
106
#include "
MueLu_UseShortNamesOrdinal.hpp
"
107
108
public
:
110
111
113
UncoupledAggregationFactory
();
114
116
virtual
~UncoupledAggregationFactory
();
117
118
RCP<const ParameterList>
GetValidParameterList
()
const
;
119
120
void
DoGraphColoring
(
Level
& currentLevel,
121
const
std::string& aggAlgo,
122
const
bool
deterministic,
123
const
RCP<const LWGraph_kokkos> graph,
124
RCP<Aggregates> aggregates)
const
;
125
127
129
130
131
// Options shared by all aggregation algorithms
132
133
// deprecated
134
void
SetOrdering
(
const
std::string& ordering) {
135
SetParameter
(
"aggregation: ordering"
, ParameterEntry(ordering));
136
}
137
// deprecated
138
void
SetMaxNeighAlreadySelected
(
int
maxNeighAlreadySelected) {
139
SetParameter
(
"aggregation: max selected neighbors"
, ParameterEntry(Teuchos::as<LocalOrdinal>(maxNeighAlreadySelected)));
// revalidate
140
}
141
// deprecated
142
void
SetMinNodesPerAggregate
(
int
minNodesPerAggregate) {
143
SetParameter
(
"aggregation: min agg size"
, ParameterEntry(Teuchos::as<LocalOrdinal>(minNodesPerAggregate)));
// revalidate
144
}
145
// set information about 1-node aggregates (map name and generating factory)
146
void
SetOnePtMapName
(
const
std::string name, Teuchos::RCP<const FactoryBase> mapFact) {
147
SetParameter
(
"OnePt aggregate map name"
, ParameterEntry(std::string(name)));
// revalidate
148
SetFactory
(
"OnePt aggregate map factory"
, mapFact);
149
}
150
151
// deprecated
152
const
std::string&
GetOrdering
()
const
{
153
const
ParameterList& pL =
GetParameterList
();
154
return
pL.get<std::string>(
"aggregation: ordering"
);
155
}
156
// deprecated
157
int
GetMaxNeighAlreadySelected
()
const
{
158
const
ParameterList& pL =
GetParameterList
();
159
return
Teuchos::as<int>(pL.get<
LocalOrdinal
>(
"aggregation: max selected neighbors"
));
160
}
161
// deprecated
162
int
GetMinNodesPerAggregate
()
const
{
163
const
ParameterList& pL =
GetParameterList
();
164
return
Teuchos::as<int>(pL.get<
LocalOrdinal
>(
"aggregation: min agg size"
));
165
}
166
168
170
171
172
void
DeclareInput
(
Level
& currentLevel)
const
;
173
175
177
178
180
void
Build
(
Level
& currentLevel)
const
;
181
183
185
186
188
// void Append(const RCP<MueLu::AggregationAlgorithmBase<LocalOrdinal, GlobalOrdinal, Node> > & alg);
189
191
// void ClearAggregationAlgorithms() { algos_.clear(); }
193
194
private
:
196
// will be filled in Build routine
197
mutable
std::vector<RCP<MueLu::AggregationAlgorithmBase<LocalOrdinal, GlobalOrdinal, Node> > >
algos_
;
198
202
mutable
bool
bDefinitionPhase_
;
203
204
};
// class UncoupledAggregationFactory
205
206
}
// namespace MueLu
207
208
#define MUELU_UNCOUPLEDAGGREGATIONFACTORY_SHORT
209
#endif
/* MUELU_UNCOUPLEDAGGREGATIONFACTORY_DECL_HPP_ */
MueLu_Aggregates_fwd.hpp
MueLu_AggregationAlgorithmBase.hpp
MueLu_AggregationPhase1Algorithm_fwd.hpp
MueLu_AggregationPhase2aAlgorithm_fwd.hpp
MueLu_AggregationPhase2bAlgorithm_fwd.hpp
MueLu_AggregationPhase3Algorithm_fwd.hpp
MueLu_ConfigDefs.hpp
MueLu_Exceptions.hpp
MueLu_InterfaceAggregationAlgorithm_fwd.hpp
MueLu_LWGraph_fwd.hpp
MueLu_Level_fwd.hpp
MueLu_OnePtAggregationAlgorithm_fwd.hpp
MueLu_PreserveDirichletAggregationAlgorithm_fwd.hpp
MueLu_SingleLevelFactoryBase.hpp
MueLu_UncoupledAggregationFactory_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_UseShortNamesOrdinal.hpp
MueLu::Factory::SetFactory
virtual void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Configuration.
Definition
MueLu_Factory.cpp:25
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::ParameterListAcceptorImpl::GetParameterList
virtual const Teuchos::ParameterList & GetParameterList() const
Definition
MueLu_ParameterListAcceptor.cpp:50
MueLu::ParameterListAcceptorImpl::SetParameter
void SetParameter(const std::string &name, const ParameterEntry &entry)
Set a parameter directly as a ParameterEntry.
Definition
MueLu_ParameterListAcceptor.cpp:77
MueLu::SingleLevelFactoryBase::SingleLevelFactoryBase
SingleLevelFactoryBase()
Constructor.
MueLu::UncoupledAggregationFactory::DeclareInput
void DeclareInput(Level ¤tLevel) const
Input.
Definition
MueLu_UncoupledAggregationFactory_def.hpp:104
MueLu::UncoupledAggregationFactory::SetOnePtMapName
void SetOnePtMapName(const std::string name, Teuchos::RCP< const FactoryBase > mapFact)
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:146
MueLu::UncoupledAggregationFactory::SetMaxNeighAlreadySelected
void SetMaxNeighAlreadySelected(int maxNeighAlreadySelected)
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:138
MueLu::UncoupledAggregationFactory::GetValidParameterList
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Definition
MueLu_UncoupledAggregationFactory_def.hpp:53
MueLu::UncoupledAggregationFactory::Build
void Build(Level ¤tLevel) const
Build aggregates.
Definition
MueLu_UncoupledAggregationFactory_def.hpp:139
MueLu::UncoupledAggregationFactory::GetMaxNeighAlreadySelected
int GetMaxNeighAlreadySelected() const
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:157
MueLu::UncoupledAggregationFactory::GetMinNodesPerAggregate
int GetMinNodesPerAggregate() const
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:162
MueLu::UncoupledAggregationFactory::SetOrdering
void SetOrdering(const std::string &ordering)
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:134
MueLu::UncoupledAggregationFactory::~UncoupledAggregationFactory
virtual ~UncoupledAggregationFactory()
Destructor.
MueLu::UncoupledAggregationFactory::SetMinNodesPerAggregate
void SetMinNodesPerAggregate(int minNodesPerAggregate)
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:142
MueLu::UncoupledAggregationFactory::DoGraphColoring
void DoGraphColoring(Level ¤tLevel, const std::string &aggAlgo, const bool deterministic, const RCP< const LWGraph_kokkos > graph, RCP< Aggregates > aggregates) const
Definition
MueLu_UncoupledAggregationFactory_def.hpp:486
MueLu::UncoupledAggregationFactory::UncoupledAggregationFactory
UncoupledAggregationFactory()
Constructor.
Definition
MueLu_UncoupledAggregationFactory_def.hpp:46
MueLu::UncoupledAggregationFactory::GetOrdering
const std::string & GetOrdering() const
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:152
MueLu::UncoupledAggregationFactory::bDefinitionPhase_
bool bDefinitionPhase_
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:202
MueLu::UncoupledAggregationFactory::algos_
std::vector< RCP< MueLu::AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node > > > algos_
Append a new aggregation algorithm to list of aggregation algorithms.
Definition
MueLu_UncoupledAggregationFactory_decl.hpp:197
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
src
Graph
UncoupledAggregation
MueLu_UncoupledAggregationFactory_decl.hpp
Generated by
1.17.0