Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MetisMeshPartitioner_axl.h
1/*---------------------------------------------------------------------------*/
2/*---------------------------------------------------------------------------*/
3// #WARNING#: This file has been generated automatically. Do not edit.
4// Arcane version 1.0 : 11/18/2024 02:52:34
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_METISMESHPARTITIONER_H
9#define ARCANE_CASEOPTION_AXLSTAR_METISMESHPARTITIONER_H
10
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/String.h"
15
16#include "arcane/CaseOptions.h"
17#include "arcane/CaseOptionsMulti.h"
18#include "arcane/CaseOptionBuildInfo.h"
19#include "arcane/XmlNodeList.h"
20#include "arcane/std/TypesMetisMeshPartitioner.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
33{
34public:
35
36 /*-------------------------------------------------------------------------*/
37 /*--------------------------- Complex Options -----------------------------*/
38 /*-------------------------------------------------------------------------*/
39
40 /*-------------------------------------------------------------------------*/
41 /*--------------------------- Non Complex Options -------------------------*/
42 /*-------------------------------------------------------------------------*/
43
45 : m_case_options(co)
46 , maxDiffusiveCount(Arcane::CaseOptionBuildInfo(_configList(),
47 /* name */ "max-diffusive-count", _element(),
48 /* default */ "10",
49 /* min-occurs */ 1,
50 /* max-occurs */ 1,
51 /* optional */ false))
52 , imbalanceRelativeTolerance(Arcane::CaseOptionBuildInfo(_configList(),
53 /* name */ "imbalance-relative-tolerance", _element(),
54 /* default */ "4.0",
55 /* min-occurs */ 1,
56 /* max-occurs */ 1,
57 /* optional */ false))
58 , toleranceTarget(Arcane::CaseOptionBuildInfo(_configList(),
59 /* name */ "tolerance-target", _element(),
60 /* default */ "1.05",
61 /* min-occurs */ 1,
62 /* max-occurs */ 1,
63 /* optional */ false))
64 , dumpGraph(Arcane::CaseOptionBuildInfo(_configList(),
65 /* name */ "dump-graph", _element(),
66 /* default */ "false",
67 /* min-occurs */ 1,
68 /* max-occurs */ 1,
69 /* optional */ false))
70 , inputOutputDigest(Arcane::CaseOptionBuildInfo(_configList(),
71 /* name */ "input-output-digest", _element(),
72 /* default */ "false",
73 /* min-occurs */ 1,
74 /* max-occurs */ 1,
75 /* optional */ false))
76 , metisCallStrategy(Arcane::CaseOptionBuildInfo(_configList(),
77 /* name */ "metis-call-strategy", _element(),
78 /* default */ "one-processor-per-node",
79 /* min-occurs */ 1,
80 /* max-occurs */ 1,
81 /* optional */ false),
82 /* type */ "MetisCallStrategy")
83 , emptyPartitionStrategy(Arcane::CaseOptionBuildInfo(_configList(),
84 /* name */ "empty-partition-strategy", _element(),
85 /* default */ "take-from-biggest-partition-v2",
86 /* min-occurs */ 1,
87 /* max-occurs */ 1,
88 /* optional */ false),
89 /* type */ "MetisEmptyPartitionStrategy")
90 {
91
92 {
93 auto x = new Arcane::CaseOptionEnumValue(
94 /* enum value name */ Arcane::String("all-processors"),
95 /* enum object */ (int)(MetisCallStrategy::all_processors));
96 metisCallStrategy.addEnumValue(x,false);
97 }
98 {
99 auto x = new Arcane::CaseOptionEnumValue(
100 /* enum value name */ Arcane::String("one-processor-per-node"),
101 /* enum object */ (int)(MetisCallStrategy::one_processor_per_node));
102 metisCallStrategy.addEnumValue(x,false);
103 }
104 {
105 auto x = new Arcane::CaseOptionEnumValue(
106 /* enum value name */ Arcane::String("two-processors-two-nodes"),
107 /* enum object */ (int)(MetisCallStrategy::two_processors_two_nodes));
108 metisCallStrategy.addEnumValue(x,false);
109 }
110 {
111 auto x = new Arcane::CaseOptionEnumValue(
112 /* enum value name */ Arcane::String("two-gathered-processors"),
113 /* enum object */ (int)(MetisCallStrategy::two_gathered_processors));
114 metisCallStrategy.addEnumValue(x,false);
115 }
116 {
117 auto x = new Arcane::CaseOptionEnumValue(
118 /* enum value name */ Arcane::String("two-scattered-processors"),
119 /* enum object */ (int)(MetisCallStrategy::two_scattered_processors));
120 metisCallStrategy.addEnumValue(x,false);
121 }
122 {
123 auto x = new Arcane::CaseOptionEnumValue(
124 /* enum value name */ Arcane::String("none"),
125 /* enum object */ (int)(MetisEmptyPartitionStrategy::DoNothing));
126 emptyPartitionStrategy.addEnumValue(x,false);
127 }
128 {
129 auto x = new Arcane::CaseOptionEnumValue(
130 /* enum value name */ Arcane::String("take-from-biggest-partition-v1"),
131 /* enum object */ (int)(MetisEmptyPartitionStrategy::TakeFromBiggestPartitionV1));
132 emptyPartitionStrategy.addEnumValue(x,false);
133 }
134 {
135 auto x = new Arcane::CaseOptionEnumValue(
136 /* enum value name */ Arcane::String("take-from-biggest-partition-v2"),
137 /* enum object */ (int)(MetisEmptyPartitionStrategy::TakeFromBiggestPartitionV2));
138 emptyPartitionStrategy.addEnumValue(x,false);
139 }
140addAlternativeNodeName(
141 /* language */ Arcane::String("fr"),
142 /* alternative name */ Arcane::String("metis"));
143 }
144
145public:
146 // Interfaces for main CaseOptions
147
148 Arcane::Integer getMaxDiffusiveCount() { return maxDiffusiveCount(); }
149 Arcane::ICaseFunction* getMaxDiffusiveCountFunction() { return maxDiffusiveCount.function(); }
150 Arcane::IStandardFunction* getMaxDiffusiveCountStandardFunction() { return maxDiffusiveCount.standardFunction(); }
151 Arcane::Real getImbalanceRelativeTolerance() { return imbalanceRelativeTolerance(); }
152 Arcane::ICaseFunction* getImbalanceRelativeToleranceFunction() { return imbalanceRelativeTolerance.function(); }
153 Arcane::IStandardFunction* getImbalanceRelativeToleranceStandardFunction() { return imbalanceRelativeTolerance.standardFunction(); }
154 Arcane::Real getToleranceTarget() { return toleranceTarget(); }
155 Arcane::ICaseFunction* getToleranceTargetFunction() { return toleranceTarget.function(); }
156 Arcane::IStandardFunction* getToleranceTargetStandardFunction() { return toleranceTarget.standardFunction(); }
157 bool getDumpGraph() { return dumpGraph(); }
158 Arcane::ICaseFunction* getDumpGraphFunction() { return dumpGraph.function(); }
159 Arcane::IStandardFunction* getDumpGraphStandardFunction() { return dumpGraph.standardFunction(); }
160 bool getInputOutputDigest() { return inputOutputDigest(); }
161 Arcane::ICaseFunction* getInputOutputDigestFunction() { return inputOutputDigest.function(); }
162 Arcane::IStandardFunction* getInputOutputDigestStandardFunction() { return inputOutputDigest.standardFunction(); }
163
164
165 MetisCallStrategy getMetisCallStrategy() { return metisCallStrategy(); }
166 MetisEmptyPartitionStrategy getEmptyPartitionStrategy() { return emptyPartitionStrategy(); }
167
168 // Interfaces for complex options
169
170
171public:
172
173 Arcane::ICaseOptions* caseOptions() const
174 {
175 return m_case_options.get();
176 }
177
178 Arcane::ICaseOptionList* configList() const
179 {
180 return m_case_options->configList();
181 }
182
183 void setCaseModule(Arcane::IModule* m)
184 {
185 m_case_options->setCaseModule(m);
186 }
187
188 void setCaseServiceInfo(Arcane::IServiceInfo* si)
189 {
190 m_case_options->setCaseServiceInfo(si);
191 }
192
193 void addAlternativeNodeName(const Arcane::String& lang,
194 const Arcane::String& name)
195 {
196 m_case_options->addAlternativeNodeName(lang,name);
197 }
198
199private:
200
201 Arcane::ICaseOptionList* _configList() const { return configList(); }
202 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
203
204private:
205
206 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
207
209
210public:
211
212
213 Arcane::CaseOptionInteger maxDiffusiveCount;
214 Arcane::CaseOptionReal imbalanceRelativeTolerance;
215 Arcane::CaseOptionReal toleranceTarget;
216 Arcane::CaseOptionBool dumpGraph;
217 Arcane::CaseOptionBool inputOutputDigest;
220};
221
222/*---------------------------------------------------------------------------*/
223/*---------------------------------------------------------------------------*/
224
225ARCANE_END_NAMESPACE
226
227/*---------------------------------------------------------------------------*/
228/*---------------------------------------------------------------------------*/
229
230#endif
231
232
233
234/*---------------------------------------------------------------------------*/
235/*---------------------------------------------------------------------------*/
236// #WARNING#: This file has been generated automatically. Do not edit.
237// Arcane version 1.0 : 11/18/2024 02:52:34
238/*---------------------------------------------------------------------------*/
239/*---------------------------------------------------------------------------*/
240
241#ifndef ARCANE_MODULE_AXLSTAR_METISMESHPARTITIONER_H
242#define ARCANE_MODULE_AXLSTAR_METISMESHPARTITIONER_H
243
244/*---------------------------------------------------------------------------*/
245/*---------------------------------------------------------------------------*/
246
247#include "arcane/VariableTypes.h"
248#include "arcane/ServiceInfo.h"
249#include "arcane/ISubDomain.h"
250#include "arcane/ServiceBuildInfo.h"
251#include "arcane/ServiceFactory.h"
252#include "arcane/ServiceRegisterer.h"
253#include "arcane/BasicService.h"
254
255#ifndef ARCANE_HAS_SPECIFIC_BASIC_SERVICE
256// Code pour les versions de Arcane avant la 3.8 qui ne possèdent pas les
257// classes de base spécifiques pour les services
258namespace Arcane
259{
263}
264#endif
265
266/*---------------------------------------------------------------------------*/
267/*---------------------------------------------------------------------------*/
268
269namespace Arcane
270{
271
272/*---------------------------------------------------------------------------*/
273/*---------------------------------------------------------------------------*/
274
275class CaseOptionsMetisMeshPartitioner;
276
277/*---------------------------------------------------------------------------*/
278/*---------------------------------------------------------------------------*/
279
282 : public MeshPartitionerBase
283{
284public:
285 // NOTE GG: attention code dupliqué avec 'ServiceT4CaseAndStrong'. Bien reporter les modifications
286 template <typename ServiceClassType> static void fillServiceInfo(Arcane::ServiceInfo* si)
287 {
288 si->setCaseOptionsFileName("MetisMeshPartitioner_arcane_std");
289 si->setAxlVersion(0.0);
290 si->setDefaultTagName("metis-mesh-partitioner");
291 si->setAxlContent(getAxlContent());
292 si->setTagName("metis","fr");
296);
297 }
298
299public:
300
304 , m_options(nullptr)
305 {
307 if (co) {
309 }
310
311 }
312
315 {
316 delete m_options;
317 }
318
319
320public:
321
324
325private:
326
329
330protected:
331
333private:
335 {
336 const Arcane::Byte* content = (const Arcane::Byte*)"";
337 Arcane::Span<const Arcane::Byte> bytes(content,0);
338 int file_version = 1;
339 return Arcane::FileContent(bytes,file_version,"");
340 }
341};
342
343/*---------------------------------------------------------------------------*/
344/*---------------------------------------------------------------------------*/
345
346#define ARCANE_REGISTER_SERVICE_METISMESHPARTITIONER(service_name,class_name) \
347 ARCANE_REGISTER_AXL_SERVICE(class_name,Arcane::ServiceProperty(#service_name,Arcane::ST_CaseOption,\
348 Arcane::SFP_None ))
349
350/*---------------------------------------------------------------------------*/
351/*---------------------------------------------------------------------------*/
352
353} // End namespace Arcane
354
355/*---------------------------------------------------------------------------*/
356/*---------------------------------------------------------------------------*/
357
358#endif
359
#define ARCANE_SERVICE_INTERFACE(ainterface)
Macro pour déclarer une interface lors de l'enregistrement d'un service.
Generation de la classe de base du Service.
ArcaneMetisMeshPartitionerObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
CaseOptionsMetisMeshPartitioner * m_options
Options du jeu de données du service.
static Arcane::FileContent getAxlContent()
Variables du service.
CaseOptionsMetisMeshPartitioner * options() const
Options du jeu de données du service.
Classe de base de service lié à un sous-domaine.
Informations pour construire une option de jeu de données.
Nom et valeur d'une énumération du jeu de données.
Description et contenu d'un fichier.
Definition FileContent.h:32
Interface d'une fonction du jeu de données.
Interface du gestionnaire de cas.
Definition ICaseMng.h:56
Interface d'une liste d'options du jeu de données.
Interface d'une liste d'options du jeu de données.
Interface d'un partitionneur de maillage.
Interface d'un partitionneur de maillage.
Interface d'un module.
Definition IModule.h:39
Interface des informations d'un service ou d'un module.
Interface gérant une fonction standard.
static void registerToServiceInfo(ServiceInfo *si, const Interfaces &... args)
Enregistre dans le service les fabriques pour les interfacs Interfaces.
Informations d'un service.
Definition ServiceInfo.h:46
Classe de base d'un service d'équilibrage de charge.
ICaseOptions * caseOptions() const
Accès au ICaseOptions associé.
Structure contenant les informations pour créer un service.
Noeud d'un arbre DOM.
Definition XmlNode.h:51
Encapsulation d'un pointeur avec compteur de référence.
Vue d'un tableau d'éléments de type T.
Definition Span.h:510
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
unsigned char Byte
Type d'un octet.
Definition UtilsTypes.h:142