Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AlephTestModule_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:11
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_ARCANETEST_ALEPHTESTMODULE_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANETEST_ALEPHTESTMODULE_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/ItemGroup.h"
21#include "arcane/CaseOptionService.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26ARCANE_BEGIN_NAMESPACE
27extern "C++" bool
28_caseOptionConvert(const Arcane::CaseOptionBase&,
29 const Arcane::String&,
31ARCANE_END_NAMESPACE
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36namespace ArcaneTest {
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
43{
44public:
45
46 /*-------------------------------------------------------------------------*/
47 /*--------------------------- Complex Options -----------------------------*/
48 /*-------------------------------------------------------------------------*/
49 // Generation for option 'boundary-condition'
50 // Generating multiple arity CaseOption for complex option value 'boundary-condition'
53 {
54 public:
55
57
59 : Arcane::CaseOptionComplexValue(opt,icl,element)
60 , value(Arcane::CaseOptionBuildInfo(_configList(),
61 /* name */ "value", _element(),
62 /* default */ Arcane::String(),
63 /* min-occurs */ 1,
64 /* max-occurs */ 1,
65 /* optional */ false))
66 , surface(Arcane::CaseOptionBuildInfo(_configList(),
67 /* name */ "surface", _element(),
68 /* default */ Arcane::String(),
69 /* min-occurs */ 1,
70 /* max-occurs */ 1,
71 /* optional */ false),
72 /* type */ "Arcane::FaceGroup")
73
74 {
75
76
77 }
78 public:
79 // Interfaces for multi-arity class CaseOptionsBoundaryCondition
80
81 Arcane::Real getValue() { return value(); }
82 Arcane::ICaseFunction* getValueFunction() { return value.function(); }
83 Arcane::IStandardFunction* getValueStandardFunction() { return value.standardFunction(); }
84
85
86 Arcane::FaceGroup getSurface() { return surface(); }
87
88 // Interfaces for complex options
89
90
91 public:
92
93 const ThatClass* operator->() const { return this; }
94
95 public:
96
99 };
100
101 // Generation for sub-option 'boundary-condition'
104 , private Arcane::ArrayView< CaseOptionBoundaryConditionValue * >
105 {
106 public:
107
109
111
112 public:
113
115 const Arcane::String& s, const Arcane::XmlNode& element)
116 : Arcane::CaseOptionsMulti(icl,s,element,0,-1)
117 {
118 // Generating translations and default values.
119 }
120
121 BaseClass operator()() { return (*this); }
122
123 protected:
124 void multiAllocate(const Arcane::XmlNodeList& elist)
125 {
126 Arcane::Integer s = elist.size();
127 value_type** v = 0;
128 if (s!=0)
129 v = new value_type*[s];
130 _setArray(v,s);
131 v = _ptr();
132 for( Arcane::Integer i=0; i<s; ++i ){
133 v[i] = new value_type(this,configList(),elist[i]);
134 }
135 }
136
137 public:
138
140 {
141 Arcane::Integer s = count();
142 if (s==0) return;
143 value_type** v = _ptr();
144 for( Arcane::Integer i=0; i<s; ++i ){
145 delete v[i];
146 }
147 delete[] v;
148 }
149
150 public:
151
152 const value_type& operator[](Arcane::Integer i) const
153 { return *(BaseClass::operator[](i)); }
154 value_type& operator[](Arcane::Integer i)
155 { return *(BaseClass::operator[](i)); }
156 Arcane::Integer count() const
157 { return BaseClass::size(); }
158 Arcane::Integer size() const
159 { return BaseClass::size(); }
160
161 };
162
163
164 /*-------------------------------------------------------------------------*/
165 /*--------------------------- Non Complex Options -------------------------*/
166 /*-------------------------------------------------------------------------*/
167
169 : m_case_options(new Arcane::CaseOptions(cm,"aleph-test-module"))
170 , iterations(Arcane::CaseOptionBuildInfo(_configList(),
171 /* name */ "iterations", _element(),
172 /* default */ "8",
173 /* min-occurs */ 1,
174 /* max-occurs */ 1,
175 /* optional */ false))
176 , alephDeleteKernel(Arcane::CaseOptionBuildInfo(_configList(),
177 /* name */ "aleph-delete-kernel", _element(),
178 /* default */ "false",
179 /* min-occurs */ 1,
180 /* max-occurs */ 1,
181 /* optional */ false))
182 , alephNumberOfSolvers(Arcane::CaseOptionBuildInfo(_configList(),
183 /* name */ "aleph-number-of-solvers", _element(),
184 /* default */ "2",
185 /* min-occurs */ 1,
186 /* max-occurs */ 1,
187 /* optional */ false))
188 , alephUnderlyingSolver(Arcane::CaseOptionBuildInfo(_configList(),
189 /* name */ "aleph-underlying-solver", _element(),
190 /* default */ "2",
191 /* min-occurs */ 1,
192 /* max-occurs */ 1,
193 /* optional */ false))
194 , alephNumberOfCores(Arcane::CaseOptionBuildInfo(_configList(),
195 /* name */ "aleph-number-of-cores", _element(),
196 /* default */ "1",
197 /* min-occurs */ 1,
198 /* max-occurs */ 1,
199 /* optional */ false))
200 , alephCellOrdering(Arcane::CaseOptionBuildInfo(_configList(),
201 /* name */ "aleph-cell-ordering", _element(),
202 /* default */ "false",
203 /* min-occurs */ 1,
204 /* max-occurs */ 1,
205 /* optional */ false))
206 , deltaT(Arcane::CaseOptionBuildInfo(_configList(),
207 /* name */ "deltaT", _element(),
208 /* default */ "0.005",
209 /* min-occurs */ 1,
210 /* max-occurs */ 1,
211 /* optional */ false))
212 , initTemperature(Arcane::CaseOptionBuildInfo(_configList(),
213 /* name */ "init-temperature", _element(),
214 /* default */ "200",
215 /* min-occurs */ 1,
216 /* max-occurs */ 1,
217 /* optional */ false))
218 , initAmr(Arcane::CaseOptionBuildInfo(_configList(),
219 /* name */ "init-amr", _element(),
220 /* default */ "0.0",
221 /* min-occurs */ 1,
222 /* max-occurs */ 1,
223 /* optional */ false))
224 , trigRefine(Arcane::CaseOptionBuildInfo(_configList(),
225 /* name */ "trig-refine", _element(),
226 /* default */ "0.001",
227 /* min-occurs */ 1,
228 /* max-occurs */ 1,
229 /* optional */ false))
230 , trigCoarse(Arcane::CaseOptionBuildInfo(_configList(),
231 /* name */ "trig-coarse", _element(),
232 /* default */ "0.001",
233 /* min-occurs */ 1,
234 /* max-occurs */ 1,
235 /* optional */ false))
236 , schema(Arcane::CaseOptionBuildInfo(_configList(),
237 /* name */ "schema", _element(),
238 /* default */ "Faces",
239 /* min-occurs */ 1,
240 /* max-occurs */ 1,
241 /* optional */ false),
242 /* allow-null */ false,
243 /* optional */ false)
244 , boundaryCondition(_configList(),
245 /* name */ "boundary-condition", _element())
246 {
247
248 }
249
250public:
251 // Interfaces for main CaseOptions
252
253 Arcane::Integer getIterations() { return iterations(); }
254 Arcane::ICaseFunction* getIterationsFunction() { return iterations.function(); }
255 Arcane::IStandardFunction* getIterationsStandardFunction() { return iterations.standardFunction(); }
256 bool getAlephDeleteKernel() { return alephDeleteKernel(); }
257 Arcane::ICaseFunction* getAlephDeleteKernelFunction() { return alephDeleteKernel.function(); }
258 Arcane::IStandardFunction* getAlephDeleteKernelStandardFunction() { return alephDeleteKernel.standardFunction(); }
259 Arcane::Integer getAlephNumberOfSolvers() { return alephNumberOfSolvers(); }
260 Arcane::ICaseFunction* getAlephNumberOfSolversFunction() { return alephNumberOfSolvers.function(); }
261 Arcane::IStandardFunction* getAlephNumberOfSolversStandardFunction() { return alephNumberOfSolvers.standardFunction(); }
262 Arcane::Integer getAlephUnderlyingSolver() { return alephUnderlyingSolver(); }
263 Arcane::ICaseFunction* getAlephUnderlyingSolverFunction() { return alephUnderlyingSolver.function(); }
264 Arcane::IStandardFunction* getAlephUnderlyingSolverStandardFunction() { return alephUnderlyingSolver.standardFunction(); }
265 Arcane::Integer getAlephNumberOfCores() { return alephNumberOfCores(); }
266 Arcane::ICaseFunction* getAlephNumberOfCoresFunction() { return alephNumberOfCores.function(); }
267 Arcane::IStandardFunction* getAlephNumberOfCoresStandardFunction() { return alephNumberOfCores.standardFunction(); }
268 bool getAlephCellOrdering() { return alephCellOrdering(); }
269 Arcane::ICaseFunction* getAlephCellOrderingFunction() { return alephCellOrdering.function(); }
270 Arcane::IStandardFunction* getAlephCellOrderingStandardFunction() { return alephCellOrdering.standardFunction(); }
271 Arcane::Real getDeltaT() { return deltaT(); }
272 Arcane::ICaseFunction* getDeltaTFunction() { return deltaT.function(); }
273 Arcane::IStandardFunction* getDeltaTStandardFunction() { return deltaT.standardFunction(); }
274 Arcane::Real getInitTemperature() { return initTemperature(); }
275 Arcane::ICaseFunction* getInitTemperatureFunction() { return initTemperature.function(); }
276 Arcane::IStandardFunction* getInitTemperatureStandardFunction() { return initTemperature.standardFunction(); }
277 Arcane::Real getInitAmr() { return initAmr(); }
278 Arcane::ICaseFunction* getInitAmrFunction() { return initAmr.function(); }
279 Arcane::IStandardFunction* getInitAmrStandardFunction() { return initAmr.standardFunction(); }
280 Arcane::Real getTrigRefine() { return trigRefine(); }
281 Arcane::ICaseFunction* getTrigRefineFunction() { return trigRefine.function(); }
282 Arcane::IStandardFunction* getTrigRefineStandardFunction() { return trigRefine.standardFunction(); }
283 Arcane::Real getTrigCoarse() { return trigCoarse(); }
284 Arcane::ICaseFunction* getTrigCoarseFunction() { return trigCoarse.function(); }
285 Arcane::IStandardFunction* getTrigCoarseStandardFunction() { return trigCoarse.standardFunction(); }
286
287
288
289 AlephTestScheme* getSchema() { return schema(); }
290 // Interfaces for complex options
291
292
293public:
294
295 Arcane::ICaseOptions* caseOptions() const
296 {
297 return m_case_options.get();
298 }
299
300 Arcane::ICaseOptionList* configList() const
301 {
302 return m_case_options->configList();
303 }
304
305 void setCaseModule(Arcane::IModule* m)
306 {
307 m_case_options->setCaseModule(m);
308 }
309
310 void setCaseServiceInfo(Arcane::IServiceInfo* si)
311 {
312 m_case_options->setCaseServiceInfo(si);
313 }
314
315 void addAlternativeNodeName(const Arcane::String& lang,
316 const Arcane::String& name)
317 {
318 m_case_options->addAlternativeNodeName(lang,name);
319 }
320
321private:
322
323 Arcane::ICaseOptionList* _configList() const { return configList(); }
324 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
325
326private:
327
328 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
329
331
332public:
333
334
335 Arcane::CaseOptionInteger iterations;
336 Arcane::CaseOptionBool alephDeleteKernel;
337 Arcane::CaseOptionInteger alephNumberOfSolvers;
338 Arcane::CaseOptionInteger alephUnderlyingSolver;
339 Arcane::CaseOptionInteger alephNumberOfCores;
340 Arcane::CaseOptionBool alephCellOrdering;
342 Arcane::CaseOptionReal initTemperature;
344 Arcane::CaseOptionReal trigRefine;
345 Arcane::CaseOptionReal trigCoarse;
347 CaseOptionBoundaryCondition boundaryCondition;
348};
349
350/*---------------------------------------------------------------------------*/
351/*---------------------------------------------------------------------------*/
352
353}
354
355/*---------------------------------------------------------------------------*/
356/*---------------------------------------------------------------------------*/
357
358#endif
359
360
361
362/*---------------------------------------------------------------------------*/
363/*---------------------------------------------------------------------------*/
364// #WARNING#: This file has been generated automatically. Do not edit.
365// Arcane version 1.0 : 11/18/2024 02:52:11
366/*---------------------------------------------------------------------------*/
367/*---------------------------------------------------------------------------*/
368
369#ifndef ARCANE_MODULE_AXLSTAR_ARCANETEST_ALEPHTESTMODULE_H
370#define ARCANE_MODULE_AXLSTAR_ARCANETEST_ALEPHTESTMODULE_H
371
372/*---------------------------------------------------------------------------*/
373/*---------------------------------------------------------------------------*/
374
375#include "arcane/VariableTypes.h"
376#include "arcane/EntryPoint.h"
377#include "arcane/ISubDomain.h"
378#include "arcane/ModuleBuildInfo.h"
379#include "arcane/ModuleFactory.h"
380#include "arcane/ServiceRegisterer.h"
381#include "arcane/BasicModule.h"
382#include "arcane/ServiceInfo.h"
383
384/*---------------------------------------------------------------------------*/
385/*---------------------------------------------------------------------------*/
386
387namespace Arcane
388{
389class ISubDomain;
390class IModule;
391}
392
393/*---------------------------------------------------------------------------*/
394/*---------------------------------------------------------------------------*/
395
396namespace ArcaneTest {
397
398/*---------------------------------------------------------------------------*/
399/*---------------------------------------------------------------------------*/
400
401class CaseOptionsAlephTestModule;
402
403/*---------------------------------------------------------------------------*/
404/*---------------------------------------------------------------------------*/
405
408 : public Arcane::BasicModule
409{
410public:
411
412 static void fillServiceInfo(Arcane::ServiceInfo* si)
413 {
414 si->setCaseOptionsFileName("AlephTestModule_arcane_aleph_tests");
415 si->setAxlVersion(1.0);
416 si->setDefaultTagName(Arcane::String("aleph-test-module"));
417 si->setAxlContent(getAxlContent());
418 }
419
420public:
421
424 , m_options(nullptr)
425 , m_cell_temperature(Arcane::VariableBuildInfo(this, "CellTemperature" ))
426 , m_face_temperature(Arcane::VariableBuildInfo(this, "FaceTemperature" , Arcane::IVariable::PNoDump))
427 , m_cell_matrix_idx(Arcane::VariableBuildInfo(this, "CellMatrixIdx" , Arcane::IVariable::PNoDump| Arcane::IVariable::PNoNeedSync))
430 {
431 m_options = new CaseOptionsAlephTestModule(mb.subDomain()->caseMng());
432 m_options->setCaseModule(this);
433 addEntryPoint(this, "init",
437 addEntryPoint(this, "compute",
438 &ArcaneAlephTestModuleObject::compute,
441 }
442
444 {
445 delete m_options;
446 }
447
448public:
449
451 virtual void init() = 0; // Init
452 virtual void compute() = 0; // Compute
453
456
457private:
458
461
462protected:
463
466 Arcane::VariableFaceReal m_face_temperature;
467 Arcane::VariableCellInteger m_cell_matrix_idx;
468 Arcane::VariableCellInteger m_sub_domain_id;
469 Arcane::VariableCellInt64 m_unique_id;
470
471private:
472 static Arcane::FileContent getAxlContent()
473 {
474 const char* str_content = "";
475 const Arcane::Byte* content = (const Arcane::Byte*)(str_content);
476 Arcane::Span<const Arcane::Byte> bytes(content,0);
477 int file_version = 1;
478 return Arcane::FileContent(bytes,file_version,"");
479 }
480
481};
482
483/*---------------------------------------------------------------------------*/
484/*---------------------------------------------------------------------------*/
485
486#define ARCANE_REGISTER_MODULE_ALEPHTESTMODULE(class_name) \
487 ARCANE_REGISTER_AXL_MODULE(class_name,Arcane::ModuleProperty("AlephTestModule",false))
488
489/*---------------------------------------------------------------------------*/
490/*---------------------------------------------------------------------------*/
491
492}
493
494/*---------------------------------------------------------------------------*/
495/*---------------------------------------------------------------------------*/
496
497#endif
498
Generation de la classe de base du Module.
CaseOptionsAlephTestModule * options() const
Options du jeu de données du module.
virtual void init()=0
points d'entrée
CaseOptionsAlephTestModule * m_options
Options du jeu de données du module.
Arcane::VariableCellReal m_cell_temperature
Variables du module.
Module basique.
Definition BasicModule.h:45
Classe de base d'une option du jeu de donnée.
Informations pour construire une option de jeu de données.
Classe de base d'une valeur d'une option complexe.
Option du jeu de donnée de type étendu.
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'un tableau d'options complexes du 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 présente plusieurs fois.
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
@ PNone
Pas de propriétés.
Definition IEntryPoint.h:66
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.
@ PNoNeedSync
Indique que la variable n'est pas nécessairement synchronisée.
Definition IVariable.h:80
@ PNoDump
Indique que la variable ne doit pas être sauvegardée.
Definition IVariable.h:72
Informations d'un service.
Definition ServiceInfo.h:46
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Informations pour construire un module.
Paramètres nécessaires à la construction d'une variable.
Liste de noeuds d'un arbre DOM.
Definition XmlNodeList.h:33
Noeud d'un arbre DOM.
Definition XmlNode.h:51
Vue modifiable d'un tableau d'un type T.
void _setArray(pointer v, Integer s) noexcept
Modifie le pointeur et la taille du tableau.
constexpr pointer _ptr() noexcept
Retourne un pointeur sur le tableau.
constexpr Integer size() const noexcept
Retourne la taille du tableau.
constexpr reference operator[](Integer i)
i-ème élément du tableau.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
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