Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ArcaneCheckpoint_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_ARCANECHECKPOINT_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANECHECKPOINT_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
27{
28public:
29
30 /*-------------------------------------------------------------------------*/
31 /*--------------------------- Complex Options -----------------------------*/
32 /*-------------------------------------------------------------------------*/
33
34 /*-------------------------------------------------------------------------*/
35 /*--------------------------- Non Complex Options -------------------------*/
36 /*-------------------------------------------------------------------------*/
37
39 : m_case_options(new Arcane::CaseOptions(cm,"arcane-checkpoint"))
40 , frequency(Arcane::CaseOptionBuildInfo(_configList(),
41 /* name */ "frequency", _element(),
42 /* default */ "0.",
43 /* min-occurs */ 1,
44 /* max-occurs */ 1,
45 /* optional */ false))
46 , period(Arcane::CaseOptionBuildInfo(_configList(),
47 /* name */ "period", _element(),
48 /* default */ "0",
49 /* min-occurs */ 1,
50 /* max-occurs */ 1,
51 /* optional */ false))
52 , frequencyCpu(Arcane::CaseOptionBuildInfo(_configList(),
53 /* name */ "frequency-cpu", _element(),
54 /* default */ "0",
55 /* min-occurs */ 1,
56 /* max-occurs */ 1,
57 /* optional */ false))
58 , doDumpAtEnd(Arcane::CaseOptionBuildInfo(_configList(),
59 /* name */ "do-dump-at-end", _element(),
60 /* default */ "true",
61 /* min-occurs */ 1,
62 /* max-occurs */ 1,
63 /* optional */ false))
64 , checkpointService(Arcane::CaseOptionBuildInfo(_configList(),
65 /* name */ "checkpoint-service", _element(),
66 /* default */ "ArcaneHdf5Checkpoint2",
67 /* min-occurs */ 1,
68 /* max-occurs */ 1,
69 /* optional */ false),
70 /* allow-null */ true,
71 /* optional */ false)
72 {
73
75 /* language */ Arcane::String("fr"),
76 /* alternative name */ Arcane::String("frequence"));
78 /* language */ Arcane::String("fr"),
79 /* alternative name */ Arcane::String("periode"));
80frequencyCpu.addAlternativeNodeName(
81 /* language */ Arcane::String("fr"),
82 /* alternative name */ Arcane::String("frequence-cpu"));
83doDumpAtEnd.addAlternativeNodeName(
84 /* language */ Arcane::String("fr"),
85 /* alternative name */ Arcane::String("en-fin-de-calcul"));
86checkpointService.addAlternativeNodeName(
87 /* language */ Arcane::String("fr"),
88 /* alternative name */ Arcane::String("service-protection"));
89addAlternativeNodeName(
90 /* language */ Arcane::String("fr"),
91 /* alternative name */ Arcane::String("arcane-protections-reprises"));
92 }
93
94public:
95 // Interfaces for main CaseOptions
96
97 Arcane::Real getFrequency() { return frequency(); }
98 Arcane::ICaseFunction* getFrequencyFunction() { return frequency.function(); }
99 Arcane::IStandardFunction* getFrequencyStandardFunction() { return frequency.standardFunction(); }
100 Arcane::Integer getPeriod() { return period(); }
101 Arcane::ICaseFunction* getPeriodFunction() { return period.function(); }
102 Arcane::IStandardFunction* getPeriodStandardFunction() { return period.standardFunction(); }
103 Arcane::Integer getFrequencyCpu() { return frequencyCpu(); }
104 Arcane::ICaseFunction* getFrequencyCpuFunction() { return frequencyCpu.function(); }
105 Arcane::IStandardFunction* getFrequencyCpuStandardFunction() { return frequencyCpu.standardFunction(); }
106 bool getDoDumpAtEnd() { return doDumpAtEnd(); }
107 Arcane::ICaseFunction* getDoDumpAtEndFunction() { return doDumpAtEnd.function(); }
108 Arcane::IStandardFunction* getDoDumpAtEndStandardFunction() { return doDumpAtEnd.standardFunction(); }
109
110
111
112 Arcane::ICheckpointWriter* getCheckpointService() { return checkpointService(); }
113 // Interfaces for complex options
114
115
116public:
117
118 Arcane::ICaseOptions* caseOptions() const
119 {
120 return m_case_options.get();
121 }
122
123 Arcane::ICaseOptionList* configList() const
124 {
125 return m_case_options->configList();
126 }
127
128 void setCaseModule(Arcane::IModule* m)
129 {
130 m_case_options->setCaseModule(m);
131 }
132
133 void setCaseServiceInfo(Arcane::IServiceInfo* si)
134 {
135 m_case_options->setCaseServiceInfo(si);
136 }
137
138 void addAlternativeNodeName(const Arcane::String& lang,
139 const Arcane::String& name)
140 {
141 m_case_options->addAlternativeNodeName(lang,name);
142 }
143
144private:
145
146 Arcane::ICaseOptionList* _configList() const { return configList(); }
147 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
148
149private:
150
151 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
152
154
155public:
156
157
158 Arcane::CaseOptionReal frequency;
160 Arcane::CaseOptionInteger frequencyCpu;
161 Arcane::CaseOptionBool doDumpAtEnd;
163};
164
165/*---------------------------------------------------------------------------*/
166/*---------------------------------------------------------------------------*/
167
168#endif
169
170
171
172/*---------------------------------------------------------------------------*/
173/*---------------------------------------------------------------------------*/
174// #WARNING#: This file has been generated automatically. Do not edit.
175// Arcane version 1.0 : 11/18/2024 02:52:34
176/*---------------------------------------------------------------------------*/
177/*---------------------------------------------------------------------------*/
178
179#ifndef ARCANE_MODULE_AXLSTAR_ARCANECHECKPOINT_H
180#define ARCANE_MODULE_AXLSTAR_ARCANECHECKPOINT_H
181
182/*---------------------------------------------------------------------------*/
183/*---------------------------------------------------------------------------*/
184
185#include "arcane/VariableTypes.h"
186#include "arcane/EntryPoint.h"
187#include "arcane/ISubDomain.h"
188#include "arcane/ModuleBuildInfo.h"
189#include "arcane/ModuleFactory.h"
190#include "arcane/ServiceRegisterer.h"
191#include "arcane/BasicModule.h"
192#include "arcane/ServiceInfo.h"
193
194/*---------------------------------------------------------------------------*/
195/*---------------------------------------------------------------------------*/
196
197namespace Arcane
198{
199class ISubDomain;
200class IModule;
201}
202
203/*---------------------------------------------------------------------------*/
204/*---------------------------------------------------------------------------*/
205
207
208/*---------------------------------------------------------------------------*/
209/*---------------------------------------------------------------------------*/
210
213 : public Arcane::BasicModule
214{
215public:
216
217 static void fillServiceInfo(Arcane::ServiceInfo* si)
218 {
219 si->setCaseOptionsFileName("ArcaneCheckpoint_arcane_std");
220 si->setAxlVersion(1.0);
221 si->setDefaultTagName(Arcane::String("arcane-checkpoint"));
222 si->setAxlContent(getAxlContent());
223 si->setTagName(Arcane::String("arcane-protections-reprises"),Arcane::String("fr"));
224 }
225
226public:
227
230 , m_options(nullptr)
231 , m_next_iteration(Arcane::VariableBuildInfo(this, "ArcaneCheckpointNextIteration" ))
232 , m_next_global_time(Arcane::VariableBuildInfo(this, "ArcaneCheckpointNextGlobalTime" ))
233 , m_next_cpu_time(Arcane::VariableBuildInfo(this, "ArcaneCheckpointNextCPUTime" ))
234 , m_checkpoints_time(Arcane::VariableBuildInfo(this, "ArcaneCheckpointCheckpointsTime" ))
235 {
237 m_options->setCaseModule(this);
238 addEntryPoint(this, "ArcaneCheckpointCheckAndWriteData",
242 addEntryPoint(this, "ArcaneCheckpointStartInit",
243 &ArcaneArcaneCheckpointObject::checkpointStartInit,
246 addEntryPoint(this, "ArcaneCheckpointInit",
247 &ArcaneArcaneCheckpointObject::checkpointInit,
250 addEntryPoint(this, "ArcaneCheckpointExit",
251 &ArcaneArcaneCheckpointObject::checkpointExit,
252 Arcane::IEntryPoint::WExit,
254 }
255
257 {
258 delete m_options;
259 }
260
261public:
262
264 virtual void checkpointCheckAndWriteData() = 0; // CheckpointCheckAndWriteData
265 virtual void checkpointStartInit() = 0; // CheckpointStartInit
266 virtual void checkpointInit() = 0; // CheckpointInit
267 virtual void checkpointExit() = 0; // CheckpointExit
268
271
272private:
273
276
277protected:
278
281 Arcane::VariableScalarReal m_next_global_time;
282 Arcane::VariableScalarInteger m_next_cpu_time;
283 Arcane::VariableArrayReal m_checkpoints_time;
284
285private:
286 static Arcane::FileContent getAxlContent()
287 {
288 const char* str_content = "";
289 const Arcane::Byte* content = (const Arcane::Byte*)(str_content);
290 Arcane::Span<const Arcane::Byte> bytes(content,0);
291 int file_version = 1;
292 return Arcane::FileContent(bytes,file_version,"");
293 }
294
295};
296
297/*---------------------------------------------------------------------------*/
298/*---------------------------------------------------------------------------*/
299
300#define ARCANE_REGISTER_MODULE_ARCANECHECKPOINT(class_name) \
301 ARCANE_REGISTER_AXL_MODULE(class_name,Arcane::ModuleProperty("ArcaneCheckpoint",false))
302
303/*---------------------------------------------------------------------------*/
304/*---------------------------------------------------------------------------*/
305
306#endif
307
Generation de la classe de base du Module.
virtual void checkpointCheckAndWriteData()=0
points d'entrée
CaseOptionsArcaneCheckpoint * options() const
Options du jeu de données du module.
Arcane::VariableScalarInteger m_next_iteration
Variables du module.
CaseOptionsArcaneCheckpoint * m_options
Options du jeu de données du module.
Module basique.
Definition BasicModule.h:45
void addAlternativeNodeName(const String &lang, const String &name)
Ajoute une traduction pour le nom de l'option.
Informations pour construire une option de jeu de données.
ICaseFunction * function() const override
Fonction associée à cette option (0 si aucune).
virtual IStandardFunction * standardFunction() const
Fonction standard associée à cette option (0 si aucune).
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.
Interface du service d'écriture d'une protection/reprise.
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 WStartInit
appelé pendant l'initialisation d'un nouveau cas
Definition IEntryPoint.h:50
static const char *const WInit
appelé pendant l'initialisation
Definition IEntryPoint.h:46
Interface d'un module.
Definition IModule.h:39
Interface des informations d'un service ou d'un module.
Interface gérant une fonction standard.
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é
Paramètres nécessaires à la construction d'une variable.
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