Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ArcaneLoadBalance_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:33
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_ARCANELOADBALANCE_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANELOADBALANCE_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/CaseOptionService.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
32{
33public:
34
35 /*-------------------------------------------------------------------------*/
36 /*--------------------------- Complex Options -----------------------------*/
37 /*-------------------------------------------------------------------------*/
38
39 /*-------------------------------------------------------------------------*/
40 /*--------------------------- Non Complex Options -------------------------*/
41 /*-------------------------------------------------------------------------*/
42
44 : m_case_options(new Arcane::CaseOptions(cm,"arcane-load-balance"))
45 , active(Arcane::CaseOptionBuildInfo(_configList(),
46 /* name */ "active", _element(),
47 /* default */ "false",
48 /* min-occurs */ 1,
49 /* max-occurs */ 1,
50 /* optional */ false))
51 , period(Arcane::CaseOptionBuildInfo(_configList(),
52 /* name */ "period", _element(),
53 /* default */ "10",
54 /* min-occurs */ 1,
55 /* max-occurs */ 1,
56 /* optional */ false))
57 , compact(Arcane::CaseOptionBuildInfo(_configList(),
58 /* name */ "compact", _element(),
59 /* default */ "true",
60 /* min-occurs */ 1,
61 /* max-occurs */ 1,
62 /* optional */ false))
63 , maxImbalance(Arcane::CaseOptionBuildInfo(_configList(),
64 /* name */ "max-imbalance", _element(),
65 /* default */ "0.6",
66 /* min-occurs */ 1,
67 /* max-occurs */ 1,
68 /* optional */ false))
69 , statistics(Arcane::CaseOptionBuildInfo(_configList(),
70 /* name */ "statistics", _element(),
71 /* default */ "false",
72 /* min-occurs */ 1,
73 /* max-occurs */ 1,
74 /* optional */ false))
75 , minCpuTime(Arcane::CaseOptionBuildInfo(_configList(),
76 /* name */ "min-cpu-time", _element(),
77 /* default */ "800.0",
78 /* min-occurs */ 1,
79 /* max-occurs */ 1,
80 /* optional */ false))
81 , partitioner(Arcane::CaseOptionBuildInfo(_configList(),
82 /* name */ "partitioner", _element(),
83 /* default */ "DefaultPartitioner",
84 /* min-occurs */ 1,
85 /* max-occurs */ 1,
86 /* optional */ false),
87 /* allow-null */ false,
88 /* optional */ false)
89 {
90
91partitioner.addAlternativeNodeName(
92 /* language */ Arcane::String("fr"),
93 /* alternative name */ Arcane::String("partitionneur"));
94active.addAlternativeNodeName(
95 /* language */ Arcane::String("fr"),
96 /* alternative name */ Arcane::String("actif"));
97period.addAlternativeNodeName(
98 /* language */ Arcane::String("fr"),
99 /* alternative name */ Arcane::String("periode"));
100compact.addAlternativeNodeName(
101 /* language */ Arcane::String("fr"),
102 /* alternative name */ Arcane::String("compacte"));
103maxImbalance.addAlternativeNodeName(
104 /* language */ Arcane::String("fr"),
105 /* alternative name */ Arcane::String("desequilibre-maximal"));
106statistics.addAlternativeNodeName(
107 /* language */ Arcane::String("fr"),
108 /* alternative name */ Arcane::String("statistiques"));
109minCpuTime.addAlternativeNodeName(
110 /* language */ Arcane::String("fr"),
111 /* alternative name */ Arcane::String("temps-cpu-minimal"));
112addAlternativeNodeName(
113 /* language */ Arcane::String("fr"),
114 /* alternative name */ Arcane::String("arcane-equilibrage-charge"));
115 }
116
117public:
118 // Interfaces for main CaseOptions
119
120 bool getActive() { return active(); }
121 Arcane::ICaseFunction* getActiveFunction() { return active.function(); }
122 Arcane::IStandardFunction* getActiveStandardFunction() { return active.standardFunction(); }
123 Arcane::Integer getPeriod() { return period(); }
124 Arcane::ICaseFunction* getPeriodFunction() { return period.function(); }
125 Arcane::IStandardFunction* getPeriodStandardFunction() { return period.standardFunction(); }
126 bool getCompact() { return compact(); }
127 Arcane::ICaseFunction* getCompactFunction() { return compact.function(); }
128 Arcane::IStandardFunction* getCompactStandardFunction() { return compact.standardFunction(); }
129 Arcane::Real getMaxImbalance() { return maxImbalance(); }
130 Arcane::ICaseFunction* getMaxImbalanceFunction() { return maxImbalance.function(); }
131 Arcane::IStandardFunction* getMaxImbalanceStandardFunction() { return maxImbalance.standardFunction(); }
132 bool getStatistics() { return statistics(); }
133 Arcane::ICaseFunction* getStatisticsFunction() { return statistics.function(); }
134 Arcane::IStandardFunction* getStatisticsStandardFunction() { return statistics.standardFunction(); }
135 Arcane::Real getMinCpuTime() { return minCpuTime(); }
136 Arcane::ICaseFunction* getMinCpuTimeFunction() { return minCpuTime.function(); }
137 Arcane::IStandardFunction* getMinCpuTimeStandardFunction() { return minCpuTime.standardFunction(); }
138
139
140
141 Arcane::IMeshPartitioner* getPartitioner() { return partitioner(); }
142 // Interfaces for complex options
143
144
145public:
146
147 Arcane::ICaseOptions* caseOptions() const
148 {
149 return m_case_options.get();
150 }
151
152 Arcane::ICaseOptionList* configList() const
153 {
154 return m_case_options->configList();
155 }
156
157 void setCaseModule(Arcane::IModule* m)
158 {
159 m_case_options->setCaseModule(m);
160 }
161
162 void setCaseServiceInfo(Arcane::IServiceInfo* si)
163 {
164 m_case_options->setCaseServiceInfo(si);
165 }
166
167 void addAlternativeNodeName(const Arcane::String& lang,
168 const Arcane::String& name)
169 {
170 m_case_options->addAlternativeNodeName(lang,name);
171 }
172
173private:
174
175 Arcane::ICaseOptionList* _configList() const { return configList(); }
176 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
177
178private:
179
180 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
181
183
184public:
185
186
190 Arcane::CaseOptionReal maxImbalance;
191 Arcane::CaseOptionBool statistics;
192 Arcane::CaseOptionReal minCpuTime;
194};
195
196/*---------------------------------------------------------------------------*/
197/*---------------------------------------------------------------------------*/
198
199ARCANE_END_NAMESPACE
200
201/*---------------------------------------------------------------------------*/
202/*---------------------------------------------------------------------------*/
203
204#endif
205
206
207
208/*---------------------------------------------------------------------------*/
209/*---------------------------------------------------------------------------*/
210// #WARNING#: This file has been generated automatically. Do not edit.
211// Arcane version 1.0 : 11/18/2024 02:52:33
212/*---------------------------------------------------------------------------*/
213/*---------------------------------------------------------------------------*/
214
215#ifndef ARCANE_MODULE_AXLSTAR_ARCANELOADBALANCE_H
216#define ARCANE_MODULE_AXLSTAR_ARCANELOADBALANCE_H
217
218/*---------------------------------------------------------------------------*/
219/*---------------------------------------------------------------------------*/
220
221#include "arcane/VariableTypes.h"
222#include "arcane/EntryPoint.h"
223#include "arcane/ISubDomain.h"
224#include "arcane/ModuleBuildInfo.h"
225#include "arcane/ModuleFactory.h"
226#include "arcane/ServiceRegisterer.h"
227#include "arcane/BasicModule.h"
228#include "arcane/ServiceInfo.h"
229
230/*---------------------------------------------------------------------------*/
231/*---------------------------------------------------------------------------*/
232
233namespace Arcane
234{
235class ISubDomain;
236class IModule;
237}
238
239/*---------------------------------------------------------------------------*/
240/*---------------------------------------------------------------------------*/
241
242namespace Arcane
243{
244
245/*---------------------------------------------------------------------------*/
246/*---------------------------------------------------------------------------*/
247
248class CaseOptionsArcaneLoadBalance;
249
250/*---------------------------------------------------------------------------*/
251/*---------------------------------------------------------------------------*/
252
255 : public Arcane::BasicModule
256{
257public:
258
259 static void fillServiceInfo(Arcane::ServiceInfo* si)
260 {
261 si->setCaseOptionsFileName("ArcaneLoadBalance_arcane_std");
262 si->setAxlVersion(0.0);
263 si->setDefaultTagName(Arcane::String("arcane-load-balance"));
264 si->setAxlContent(getAxlContent());
265 si->setTagName(Arcane::String("arcane-equilibrage-charge"),Arcane::String("fr"));
266 }
267
268public:
269
272 , m_options(nullptr)
273 {
275 m_options->setCaseModule(this);
276 addEntryPoint(this, "LoadBalanceCheckLoadBalance",
280 addEntryPoint(this, "LoadBalanceInit",
281 &ArcaneArcaneLoadBalanceObject::loadBalanceInit,
284 }
285
287 {
288 delete m_options;
289 }
290
291public:
292
294 virtual void checkLoadBalance() = 0; // CheckLoadBalance
295 virtual void loadBalanceInit() = 0; // LoadBalanceInit
296
299
300private:
301
304
305protected:
306
308
309private:
311 {
312 const char* str_content = "";
313 const Arcane::Byte* content = (const Arcane::Byte*)(str_content);
314 Arcane::Span<const Arcane::Byte> bytes(content,0);
315 int file_version = 1;
316 return Arcane::FileContent(bytes,file_version,"");
317 }
318
319};
320
321/*---------------------------------------------------------------------------*/
322/*---------------------------------------------------------------------------*/
323
324#define ARCANE_REGISTER_MODULE_ARCANELOADBALANCE(class_name) \
325 ARCANE_REGISTER_AXL_MODULE(class_name,Arcane::ModuleProperty("ArcaneLoadBalance",false))
326
327/*---------------------------------------------------------------------------*/
328/*---------------------------------------------------------------------------*/
329
330} // End namespace Arcane
331
332/*---------------------------------------------------------------------------*/
333/*---------------------------------------------------------------------------*/
334
335#endif
336
Generation de la classe de base du Module.
CaseOptionsArcaneLoadBalance * m_options
Options du jeu de données du module.
static Arcane::FileContent getAxlContent()
Variables du module.
CaseOptionsArcaneLoadBalance * options() const
Options du jeu de données du module.
virtual void checkLoadBalance()=0
points d'entrée
Module basique.
Definition BasicModule.h:45
Informations pour construire une option de jeu de données.
Classe de base d'une liste d'options du jeu de données.
Definition CaseOptions.h:57
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.
static const char *const WComputeLoop
appelé pendant la boucle de calcul
Definition IEntryPoint.h:42
@ PAutoLoadEnd
Chargé automatiquement à la fin. Cela signifie qu'un module possédant un point d'entrée avec cette pr...
Definition IEntryPoint.h:80
static const char *const WInit
appelé pendant l'initialisation
Definition IEntryPoint.h:46
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.
Interface du gestionnaire d'un sous-domaine.
Definition ISubDomain.h:74
virtual ICaseMng * caseMng()=0
Retourne le gestionnaire du jeu de données.
Informations d'un service.
Definition ServiceInfo.h:46
Informations pour construire un module.
ISubDomain * subDomain() const
Accès au sous-domaine associé
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
void addEntryPoint(ModuleType *module, const char *name, void(ModuleType::*func)(), const String &where=IEntryPoint::WComputeLoop, int property=IEntryPoint::PNone)
Routine template permettant de référencer un point d'entrée dans un module.
Definition EntryPoint.h:166