Arcane  v3.16.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AlephIndexTest_axl.h
1/*---------------------------------------------------------------------------*/
2/*---------------------------------------------------------------------------*/
3// #WARNING#: This file has been generated automatically. Do not edit.
4// Axlstar version 1.0
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_ARCANETEST_ALEPHINDEXTEST_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANETEST_ALEPHINDEXTEST_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
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26extern "C++" bool
27_caseOptionConvert(const Arcane::CaseOptionBase&,
28 const Arcane::String&,
30ARCANE_END_NAMESPACE
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35namespace ArcaneTest {
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
41class CaseOptionsAlephIndexTest
42{
43public:
44
45 /*-------------------------------------------------------------------------*/
46 /*--------------------------- Complex Options -----------------------------*/
47 /*-------------------------------------------------------------------------*/
48 // Generation for option 'boundary-condition'
49 // Generating multiple arity CaseOption for complex option value 'boundary-condition'
50 class CaseOptionBoundaryConditionValue
52 {
53 public:
54
55 typedef CaseOptionBoundaryConditionValue ThatClass;
56
57 CaseOptionBoundaryConditionValue(Arcane::ICaseOptionsMulti* opt,Arcane::ICaseOptionList* icl, const Arcane::XmlNode& element)
58 : Arcane::CaseOptionComplexValue(opt,icl,element)
59 , value(Arcane::CaseOptionBuildInfo(_configList(),
60 /* name */ "value", _element(),
61 /* default */ Arcane::String(),
62 /* min-occurs */ 1,
63 /* max-occurs */ 1,
64 /* optional */ false))
65 , surface(Arcane::CaseOptionBuildInfo(_configList(),
66 /* name */ "surface", _element(),
67 /* default */ Arcane::String(),
68 /* min-occurs */ 1,
69 /* max-occurs */ 1,
70 /* optional */ false),
71 /* type */ "Arcane::FaceGroup")
72
73 {
74
75
76 }
77 public:
78 // Interfaces for multi-arity class CaseOptionsBoundaryCondition
79
80 Arcane::Real getValue() { return value(); }
81 Arcane::ICaseFunction* getValueFunction() { return value.function(); }
82 Arcane::IStandardFunction* getValueStandardFunction() { return value.standardFunction(); }
83
84
85 Arcane::FaceGroup getSurface() { return surface(); }
86
87 // Interfaces for complex options
88
89
90 public:
91
92 const ThatClass* operator->() const { return this; }
93
94 public:
95
96 Arcane::CaseOptionReal value;
98 };
99
100 // Generation for sub-option 'boundary-condition'
101 class CaseOptionBoundaryCondition
103 , private Arcane::ArrayView< CaseOptionBoundaryConditionValue * >
104 {
105 public:
106
108
109 typedef CaseOptionBoundaryConditionValue value_type;
110
111 public:
112
113 CaseOptionBoundaryCondition(Arcane::ICaseOptionList* icl,
114 const Arcane::String& s, const Arcane::XmlNode& element)
115 : Arcane::CaseOptionsMulti(icl,s,element,0,-1)
116 {
117 // Generating translations and default values.
118 }
119
120 BaseClass operator()() { return (*this); }
121
122 protected:
123 void multiAllocate(const Arcane::XmlNodeList& elist)
124 {
125 Arcane::Integer s = elist.size();
126 value_type** v = 0;
127 if (s!=0)
128 v = new value_type*[s];
129 _setArray(v,s);
130 v = _ptr();
131 for( Arcane::Integer i=0; i<s; ++i ){
132 v[i] = new value_type(this,configList(),elist[i]);
133 }
134 }
135
136 public:
137
138 ~CaseOptionBoundaryCondition()
139 {
140 Arcane::Integer s = count();
141 if (s==0) return;
142 value_type** v = _ptr();
143 for( Arcane::Integer i=0; i<s; ++i ){
144 delete v[i];
145 }
146 delete[] v;
147 }
148
149 public:
150
151 const value_type& operator[](Arcane::Integer i) const
152 { return *(BaseClass::operator[](i)); }
153 value_type& operator[](Arcane::Integer i)
154 { return *(BaseClass::operator[](i)); }
155 Arcane::Integer count() const
156 { return BaseClass::size(); }
157 Arcane::Integer size() const
158 { return BaseClass::size(); }
159
160 };
161
162
163 /*-------------------------------------------------------------------------*/
164 /*--------------------------- Non Complex Options -------------------------*/
165 /*-------------------------------------------------------------------------*/
166
167 CaseOptionsAlephIndexTest(Arcane::ICaseMng* cm)
168 : m_case_options(new Arcane::CaseOptions(cm,"aleph-index-test"))
169 , iterations(Arcane::CaseOptionBuildInfo(_configList(),
170 /* name */ "iterations", _element(),
171 /* default */ "8",
172 /* min-occurs */ 1,
173 /* max-occurs */ 1,
174 /* optional */ false))
175 , alephNumberOfSolvers(Arcane::CaseOptionBuildInfo(_configList(),
176 /* name */ "aleph-number-of-solvers", _element(),
177 /* default */ "1",
178 /* min-occurs */ 1,
179 /* max-occurs */ 1,
180 /* optional */ false))
181 , deltaT(Arcane::CaseOptionBuildInfo(_configList(),
182 /* name */ "deltaT", _element(),
183 /* default */ "0.005",
184 /* min-occurs */ 1,
185 /* max-occurs */ 1,
186 /* optional */ false))
187 , initTemperature(Arcane::CaseOptionBuildInfo(_configList(),
188 /* name */ "init-temperature", _element(),
189 /* default */ "200",
190 /* min-occurs */ 1,
191 /* max-occurs */ 1,
192 /* optional */ false))
193 , boundaryCondition(_configList(),
194 /* name */ "boundary-condition", _element())
195 {
196
197 }
198
199public:
200 // Interfaces for main CaseOptions
201
202 Arcane::Integer getIterations() { return iterations(); }
203 Arcane::ICaseFunction* getIterationsFunction() { return iterations.function(); }
204 Arcane::IStandardFunction* getIterationsStandardFunction() { return iterations.standardFunction(); }
205 Arcane::Integer getAlephNumberOfSolvers() { return alephNumberOfSolvers(); }
206 Arcane::ICaseFunction* getAlephNumberOfSolversFunction() { return alephNumberOfSolvers.function(); }
207 Arcane::IStandardFunction* getAlephNumberOfSolversStandardFunction() { return alephNumberOfSolvers.standardFunction(); }
208 Arcane::Real getDeltaT() { return deltaT(); }
209 Arcane::ICaseFunction* getDeltaTFunction() { return deltaT.function(); }
210 Arcane::IStandardFunction* getDeltaTStandardFunction() { return deltaT.standardFunction(); }
211 Arcane::Real getInitTemperature() { return initTemperature(); }
212 Arcane::ICaseFunction* getInitTemperatureFunction() { return initTemperature.function(); }
213 Arcane::IStandardFunction* getInitTemperatureStandardFunction() { return initTemperature.standardFunction(); }
214
215
216
217 // Interfaces for complex options
218
219
220public:
221
222 Arcane::ICaseOptions* caseOptions() const
223 {
224 return m_case_options.get();
225 }
226
227 Arcane::ICaseOptionList* configList() const
228 {
229 return m_case_options->configList();
230 }
231
232 void setCaseModule(Arcane::IModule* m)
233 {
234 m_case_options->setCaseModule(m);
235 }
236
237 void setCaseServiceInfo(Arcane::IServiceInfo* si)
238 {
239 m_case_options->setCaseServiceInfo(si);
240 }
241
242 void addAlternativeNodeName(const Arcane::String& lang,
243 const Arcane::String& name)
244 {
245 m_case_options->addAlternativeNodeName(lang,name);
246 }
247
248private:
249
250 Arcane::ICaseOptionList* _configList() const { return configList(); }
251 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
252
253private:
254
255 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
256
257 Arcane::ReferenceCounter<Arcane::ICaseOptions> m_case_options;
258
259public:
260
261
262 Arcane::CaseOptionInteger iterations;
263 Arcane::CaseOptionInteger alephNumberOfSolvers;
264 Arcane::CaseOptionReal deltaT;
265 Arcane::CaseOptionReal initTemperature;
266 CaseOptionBoundaryCondition boundaryCondition;
267};
268
269/*---------------------------------------------------------------------------*/
270/*---------------------------------------------------------------------------*/
271
272}
273
274/*---------------------------------------------------------------------------*/
275/*---------------------------------------------------------------------------*/
276
277#endif
278
279
280
281/*---------------------------------------------------------------------------*/
282/*---------------------------------------------------------------------------*/
283// #WARNING#: This file has been generated automatically. Do not edit.
284// Axlstar version 1.0
285/*---------------------------------------------------------------------------*/
286/*---------------------------------------------------------------------------*/
287
288#ifndef ARCANE_MODULE_AXLSTAR_ARCANETEST_ALEPHINDEXTEST_H
289#define ARCANE_MODULE_AXLSTAR_ARCANETEST_ALEPHINDEXTEST_H
290
291/*---------------------------------------------------------------------------*/
292/*---------------------------------------------------------------------------*/
293
294#include "arcane/VariableTypes.h"
295#include "arcane/EntryPoint.h"
296#include "arcane/ISubDomain.h"
297#include "arcane/ModuleBuildInfo.h"
298#include "arcane/ModuleFactory.h"
299#include "arcane/ServiceRegisterer.h"
300#include "arcane/BasicModule.h"
301#include "arcane/ServiceInfo.h"
302
303/*---------------------------------------------------------------------------*/
304/*---------------------------------------------------------------------------*/
305
306namespace Arcane
307{
308class ISubDomain;
309class IModule;
310}
311
312/*---------------------------------------------------------------------------*/
313/*---------------------------------------------------------------------------*/
314
315namespace ArcaneTest {
316
317/*---------------------------------------------------------------------------*/
318/*---------------------------------------------------------------------------*/
319
321
322/*---------------------------------------------------------------------------*/
323/*---------------------------------------------------------------------------*/
324
326class ArcaneAlephIndexTestObject
327 : public Arcane::BasicModule
328{
329public:
330
331 static void fillServiceInfo(Arcane::ServiceInfo* si)
332 {
333 si->setCaseOptionsFileName("AlephIndexTest_arcane_aleph_tests");
334 si->setAxlVersion(1.0);
335 si->setDefaultTagName(Arcane::String("aleph-index-test"));
336 si->setAxlContent(getAxlContent());
337 }
338
339public:
340
341 ArcaneAlephIndexTestObject(const Arcane::ModuleBuildInfo& mb)
343 , m_options(nullptr)
344 , m_cell_temperature(Arcane::VariableBuildInfo(this, "CellTemperature" ))
345 , m_face_temperature(Arcane::VariableBuildInfo(this, "FaceTemperature" , Arcane::IVariable::PNoDump))
347 {
349 m_options->setCaseModule(this);
350 addEntryPoint(this, "init",
354 addEntryPoint(this, "compute",
355 &ArcaneAlephIndexTestObject::compute,
358 }
359
360 virtual ~ArcaneAlephIndexTestObject()
361 {
362 delete m_options;
363 }
364
365public:
366
368 virtual void init() = 0; // Init
369 virtual void compute() = 0; // Compute
370
373
374private:
375
378
379protected:
380
383 Arcane::VariableFaceReal m_face_temperature;
384 Arcane::VariableCellReal m_cell_coefs;
385
386private:
387 static Arcane::FileContent getAxlContent()
388 {
389 const char* str_content = "";
390 const Arcane::Byte* content = (const Arcane::Byte*)(str_content);
391 Arcane::Span<const Arcane::Byte> bytes(content,0);
392 int file_version = 1;
393 return Arcane::FileContent(bytes,file_version,"");
394 }
395
396};
397
398/*---------------------------------------------------------------------------*/
399/*---------------------------------------------------------------------------*/
400
401#define ARCANE_REGISTER_MODULE_ALEPHINDEXTEST(class_name) \
402 ARCANE_REGISTER_AXL_MODULE(class_name,Arcane::ModuleProperty("AlephIndexTest",false))
403
404/*---------------------------------------------------------------------------*/
405/*---------------------------------------------------------------------------*/
406
407}
408
409/*---------------------------------------------------------------------------*/
410/*---------------------------------------------------------------------------*/
411
412#endif
413
CaseOptionsAlephIndexTest * options() const
Options du jeu de données du module.
Arcane::VariableCellReal m_cell_temperature
Variables du module.
CaseOptionsAlephIndexTest * m_options
Options du jeu de données du module.
virtual void init()=0
points d'entrée
Vue modifiable d'un tableau d'un type T.
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).
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.
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 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.
@ PNoNeedSync
Indique que la variable n'est pas nécessairement synchronisée.
Definition IVariable.h:82
@ PNoDump
Indique que la variable ne doit pas être sauvegardée.
Definition IVariable.h:74
Informations d'un service.
Definition ServiceInfo.h:46
Informations pour construire un module.
ISubDomain * subDomain() const
Accès au sous-domaine associé
Vue d'un tableau d'éléments de type T.
Definition Span.h:513
Chaîne de caractères unicode.
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
ItemGroupT< Face > FaceGroup
Groupe de faces.
Definition ItemTypes.h:178
MeshVariableScalarRefT< Cell, Real > VariableCellReal
Grandeur au centre des mailles de type réel.
MeshVariableScalarRefT< Face, Real > VariableFaceReal
Grandeur aux faces de type réel.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.
double Real
Type représentant un réel.
unsigned char Byte
Type d'un octet.
Definition BaseTypes.h:43
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