MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_FactoryManager_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_FACTORYMANAGER_DECL_HPP
11
#define MUELU_FACTORYMANAGER_DECL_HPP
12
13
#include "
MueLu_ConfigDefs.hpp
"
14
#include "
MueLu_FactoryManager_fwd.hpp
"
15
#include "
MueLu_FactoryManagerBase.hpp
"
16
17
#include "
MueLu_AmalgamationFactory_fwd.hpp
"
18
#include "
MueLu_AggregateQualityEstimateFactory_fwd.hpp
"
19
#include "
MueLu_CoalesceDropFactory_fwd.hpp
"
20
#include "
MueLu_CoarseMapFactory_fwd.hpp
"
21
#include "
MueLu_ConstraintFactory_fwd.hpp
"
22
#include "
MueLu_DirectSolver_fwd.hpp
"
23
#include "
MueLu_InitialBlockNumberFactory_fwd.hpp
"
24
#include "
MueLu_LineDetectionFactory_fwd.hpp
"
25
#include "
MueLu_NullspaceFactory_fwd.hpp
"
26
#include "
MueLu_PatternFactory_fwd.hpp
"
27
#include "
MueLu_RAPFactory_fwd.hpp
"
28
#include "
MueLu_RepartitionHeuristicFactory_fwd.hpp
"
29
#include "
MueLu_RepartitionFactory_fwd.hpp
"
30
#include "
MueLu_SaPFactory_fwd.hpp
"
31
#include "
MueLu_ScaledNullspaceFactory_fwd.hpp
"
32
#include "
MueLu_SmootherFactory_fwd.hpp
"
33
#include "
MueLu_StructuredAggregationFactory_fwd.hpp
"
34
#include "
MueLu_TentativePFactory_fwd.hpp
"
35
#include "
MueLu_TransPFactory_fwd.hpp
"
36
#include "
MueLu_TrilinosSmoother_fwd.hpp
"
37
#include "
MueLu_UncoupledAggregationFactory_fwd.hpp
"
38
#include "
MueLu_ZoltanInterface_fwd.hpp
"
39
#include "
MueLu_InterfaceMappingTransferFactory_fwd.hpp
"
40
#include "
MueLu_InterfaceAggregationFactory_fwd.hpp
"
41
42
#include "
MueLu_CoalesceDropFactory_kokkos_fwd.hpp
"
43
#include "
MueLu_TentativePFactory_kokkos_fwd.hpp
"
44
45
namespace
MueLu
{
46
65
66
template
<
class
Scalar
=
DefaultScalar
,
67
class
LocalOrdinal
=
DefaultLocalOrdinal
,
68
class
GlobalOrdinal
=
DefaultGlobalOrdinal
,
69
class
Node
=
DefaultNode
>
70
class
FactoryManager
:
public
FactoryManagerBase
{
71
#undef MUELU_FACTORYMANAGER_SHORT
72
#include "
MueLu_UseShortNames.hpp
"
73
74
public
:
76
77
79
FactoryManager
();
80
82
FactoryManager
(
const
std::map<std::string, RCP<const FactoryBase> >& factoryTable);
83
85
virtual
~FactoryManager
();
86
88
90
91
99
void
SetFactory
(
const
std::string& varName,
const
RCP<const FactoryBase>& factory);
100
106
const
RCP<const FactoryBase>
GetFactory
(
const
std::string& varName)
const
;
107
113
const
RCP<FactoryBase>
GetFactoryNonConst
(
const
std::string& varName);
114
116
// Return true if Factory associated with varName is registered
117
bool
hasFactory
(
const
std::string& varName)
const
;
118
120
const
RCP<const FactoryBase>
GetDefaultFactory
(
const
std::string& varName)
const
;
121
122
void
SetKokkosRefactor
(
const
bool
useKokkos) {
123
useKokkos_
= useKokkos;
124
}
125
126
bool
GetKokkosRefactor
()
const
{
return
useKokkos_
; }
127
129
130
void
Clean
()
const
{
defaultFactoryTable_
.clear(); }
131
132
#ifdef HAVE_MUELU_DEBUG
133
void
ResetDebugData()
const
;
134
#endif
135
136
void
Print
()
const
;
137
138
private
:
140
141
146
147
const
RCP<const FactoryBase>
SetAndReturnDefaultFactory
(
const
std::string& varName,
const
RCP<const FactoryBase>& factory)
const
;
149
157
std::map<std::string, RCP<const FactoryBase> >
factoryTable_
;
158
165
mutable
std::map<std::string, RCP<const FactoryBase> >
defaultFactoryTable_
;
166
168
bool
useKokkos_
;
169
170
};
// class
171
172
}
// namespace MueLu
173
174
#define MUELU_FACTORYMANAGER_SHORT
175
#endif
// MUELU_FACTORYMANAGER_DECL_HPP
MueLu_AggregateQualityEstimateFactory_fwd.hpp
MueLu_AmalgamationFactory_fwd.hpp
MueLu_CoalesceDropFactory_fwd.hpp
MueLu_CoalesceDropFactory_kokkos_fwd.hpp
MueLu_CoarseMapFactory_fwd.hpp
MueLu_ConfigDefs.hpp
MueLu_ConstraintFactory_fwd.hpp
MueLu_DirectSolver_fwd.hpp
MueLu_FactoryManager_fwd.hpp
MueLu_FactoryManagerBase.hpp
MueLu_InitialBlockNumberFactory_fwd.hpp
MueLu_InterfaceAggregationFactory_fwd.hpp
MueLu_InterfaceMappingTransferFactory_fwd.hpp
MueLu_LineDetectionFactory_fwd.hpp
MueLu_NullspaceFactory_fwd.hpp
MueLu_PatternFactory_fwd.hpp
MueLu_RAPFactory_fwd.hpp
MueLu_RepartitionFactory_fwd.hpp
MueLu_RepartitionHeuristicFactory_fwd.hpp
MueLu_SaPFactory_fwd.hpp
MueLu_ScaledNullspaceFactory_fwd.hpp
MueLu_SmootherFactory_fwd.hpp
MueLu_StructuredAggregationFactory_fwd.hpp
MueLu_TentativePFactory_fwd.hpp
MueLu_TentativePFactory_kokkos_fwd.hpp
MueLu_TransPFactory_fwd.hpp
MueLu_TrilinosSmoother_fwd.hpp
MueLu_UncoupledAggregationFactory_fwd.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_ZoltanInterface_fwd.hpp
MueLu::FactoryManager::Clean
void Clean() const
Definition
MueLu_FactoryManager_decl.hpp:130
MueLu::FactoryManager::GetDefaultFactory
const RCP< const FactoryBase > GetDefaultFactory(const std::string &varName) const
Definition
MueLu_FactoryManager_def.hpp:98
MueLu::FactoryManager::SetKokkosRefactor
void SetKokkosRefactor(const bool useKokkos)
Definition
MueLu_FactoryManager_decl.hpp:122
MueLu::FactoryManager::SetAndReturnDefaultFactory
const RCP< const FactoryBase > SetAndReturnDefaultFactory(const std::string &varName, const RCP< const FactoryBase > &factory) const
Definition
MueLu_FactoryManager_def.hpp:215
MueLu::FactoryManager< Scalar, LocalOrdinal, GlobalOrdinal, Node >::useKokkos_
bool useKokkos_
Definition
MueLu_FactoryManager_decl.hpp:168
MueLu::FactoryManager< Scalar, LocalOrdinal, GlobalOrdinal, Node >::defaultFactoryTable_
std::map< std::string, RCP< const FactoryBase > > defaultFactoryTable_
Definition
MueLu_FactoryManager_decl.hpp:165
MueLu::FactoryManager::SetFactory
void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Set Factory.
Definition
MueLu_FactoryManager_def.hpp:71
MueLu::FactoryManager::hasFactory
bool hasFactory(const std::string &varName) const
Check.
Definition
MueLu_FactoryManager_def.hpp:92
MueLu::FactoryManager::FactoryManagerBase
MueLu::FactoryManagerBase FactoryManagerBase
MueLu::FactoryManager::GetKokkosRefactor
bool GetKokkosRefactor() const
Definition
MueLu_FactoryManager_decl.hpp:126
MueLu::FactoryManager< Scalar, LocalOrdinal, GlobalOrdinal, Node >::factoryTable_
std::map< std::string, RCP< const FactoryBase > > factoryTable_
Definition
MueLu_FactoryManager_decl.hpp:157
MueLu::FactoryManager::GetFactory
const RCP< const FactoryBase > GetFactory(const std::string &varName) const
Get factory associated with a particular data name.
Definition
MueLu_FactoryManager_def.hpp:76
MueLu::FactoryManager::FactoryManager
FactoryManager()
Constructor.
Definition
MueLu_FactoryManager_def.hpp:55
MueLu::FactoryManager::FactoryManager
FactoryManager(const std::map< std::string, RCP< const FactoryBase > > &factoryTable)
Constructor used by HierarchyFactory (temporary, will be removed).
Definition
MueLu_FactoryManager_def.hpp:61
MueLu::FactoryManager::Print
void Print() const
Definition
MueLu_FactoryManager_def.hpp:226
MueLu::FactoryManager::GetFactoryNonConst
const RCP< FactoryBase > GetFactoryNonConst(const std::string &varName)
Get factory associated with a particular data name (NONCONST version).
Definition
MueLu_FactoryManager_def.hpp:87
MueLu::FactoryManager::~FactoryManager
virtual ~FactoryManager()
Destructor.
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
MueCentral
MueLu_FactoryManager_decl.hpp
Generated by
1.17.0