Salome HOME
4b42fef315598576fdbb0a13decef6eeeaf34f13
[tools/eficas.git] / Openturns_Wrapper / OpenTURNS_Cata_Wrapper_V4.py
1 # -*- coding: utf-8 -*-
2
3 # --------------------------------------------------
4 # debut entete
5 # --------------------------------------------------
6
7 import Accas
8 from Accas import *
9
10 class variable(ASSD ) : pass
11
12
13 #CONTEXT.debug = 1
14 JdC = JDC_CATA ( code = 'OPENTURNS_WRAPPER',
15                  execmodul = None,
16                  regles = ( AU_MOINS_UN ( 'WRAPPER' ), ),
17                  ) # Fin JDC_CATA
18
19 # --------------------------------------------------
20 # fin entete
21 # --------------------------------------------------
22
23
24 #================================
25 # 2. Definition des variables
26 #================================
27
28
29                        
30 VARIABLE = OPER ( nom = "VARIABLE",
31                       sd_prod = variable,
32                       op = None,
33                       fr = "Definitions des lois marginales utilisees par les variables d'entree",
34               
35
36                      Type = SIMP ( statut = "o",
37                                    typ = "TXM",
38                                    max = 1,
39                                    into = ( "in", "out", ),
40                                    defaut = "in",
41                                    fr = "variable d'entree ou de sortie du solver",
42                                    ang = "Input or Output variable",
43                                    ),
44
45                      Unit = SIMP ( statut = "f",
46                                    typ = "TXM",
47                                    max = 1,
48                                    fr = "Unite",
49                                    ang = "Unit",
50                                    ),
51
52                      Comment = SIMP ( statut = "f",
53                                       typ = "TXM",
54                                       max = 1,
55                                       fr = "Commentaire",
56                                       ang = "Comment",
57                                       ),
58
59                      Regexp = SIMP ( statut = "f",
60                                      typ = "TXM",
61                                      max = 1,
62                                      fr = "Expression reguliere",
63                                      ang = "Regular expression",
64                                      ),
65
66                      Format = SIMP ( statut = "f",
67                                      typ = "TXM",
68                                      max = 1,
69                                      fr = "Format d'ecriture",
70                                      ang = "Format",
71                                      ),
72
73
74              ) # Fin FACT Variables
75 #
76
77
78 #================================
79 # Definition des parametres du wrapper
80 #================================
81
82 # Nota : les variables de type PROC doivent etre en majuscules !
83 WRAPPER = PROC ( nom = "WRAPPER",
84                  op = None,
85                  docu = "",
86                  fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.",
87                  ang = "Writes the configuration file for OPENTURNS.",
88
89     Framework = SIMP ( statut = "o",
90                        typ = "TXM",
91                        into = ( "Salome", "Stand-alone", ),
92                        max = 1,
93                        fr = "Dans quel environnement le wrapper doit-il etre utilise ?",
94                        ang = "Which framework is this wrapper designed for ?",
95                        ),
96
97     StandAlone = BLOC ( condition = " Framework in ( 'Stand-alone', ) ",
98     
99     
100         WrapperPath = SIMP ( statut = "o",
101                              typ = "TXM",
102                              max = 1,
103                              fr = "Chemin d acces au wrapper",
104                              ang = "Wrapper library path",
105                              ),
106     
107         FunctionName = SIMP ( statut = "o",
108                               typ = "TXM",
109                               max = 1,
110                               fr = "Nom de la fonction dans le wrapper",
111                               ang = "Function's name in wrapper",
112                               ),
113     
114         GradientName = SIMP ( statut = "f",
115                               typ = "TXM",
116                               max = 1,
117                               fr = "Nom du gradient dans le wrapper",
118                               ang = "Gradient's name in wrapper",
119                               ),
120     
121         HessianName = SIMP ( statut = "f",
122                              typ = "TXM",
123                              max = 1,
124                              fr = "Nom du hessian dans le wrapper",
125                              ang = "Hessian's name in wrapper",
126                              ),
127     
128         WrapCouplingMode = SIMP ( statut = "o",
129                                   typ = "TXM",
130                                   max = 1,
131                                   into = ( "static-link", "dynamic-link", "fork", ),
132                                   defaut = "fork",
133                                   fr = "Mode de couplage du solver",
134                                   ang = "Solver coupling mode",
135                                   ),
136     
137         Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ",
138                         
139                       Command = SIMP ( statut = "o",
140                                        max = 1,
141                                        typ = "TXM",
142                                        fr = "Chemin du solver",
143                                        ang = "Solver path",
144                                        ),
145                         
146                       UserPrefix = SIMP ( statut = "f",
147                                        max = 1,
148                                        typ = "TXM",
149                                        fr = "Prefixe pour retrouver les repertories temporaires de calcul",
150                                        ang = "Prefix to help finding compute directories",
151                                        ),
152                       ), # Fin BLOC Fork
153     
154         State = SIMP ( statut = "f",
155                        typ = "TXM",
156                        max = 1,
157                        into = ( "shared", "specific" ),
158                        fr = "Partage de l'etat interne entre les fonctions",
159                        ang = "Internal state sharing",
160                        ),
161     
162         InDataTransfer = SIMP ( statut = "o",
163                                 typ = "TXM",
164                                 max = 1,
165                                 into = ( "files", "arguments", "corba" ),
166                                 fr = "Mode de transfert des donnees d'entree",
167                                 ang = "Input transfering mode",
168                                 ),
169     
170         OutDataTransfer = SIMP ( statut = "o",
171                                  typ = "TXM",
172                                  max = 1,
173                                  into = ( "files", "arguments", "corba" ),
174                                  fr = "Mode de transfert des donnees de sortie",
175                                  ang = "Output transfering mode",
176                                  ),
177   
178     ), # Fin BLOC StandAlone
179
180
181     Salome = BLOC ( condition = " Framework in ( 'Salome', ) ",
182
183         SolverComponentName  = SIMP ( statut = "f",
184                                       typ = "TXM",
185                                       max = 1,
186                                       defaut = "UNDEFINED",
187                                       fr = "Nom du composant solver",
188                                       ang = "Solver component name",
189                                       ),
190     
191     
192         WrapperPath = SIMP ( statut = "o",
193                              typ = "TXM",
194                              into = ( "GenericWrapper4Salome.so", ),
195                              defaut = "GenericWrapper4Salome.so",
196                              max = 1,
197                              fr = "Chemin d acces au wrapper",
198                              ang = "Wrapper library path",
199                              ),
200     
201         FunctionName = SIMP ( statut = "o",
202                               typ = "TXM",
203                               into = ( "GENERICSOLVER", ),
204                               defaut = "GENERICSOLVER",
205                               max = 1,
206                               fr = "Nom de la fonction dans le wrapper",
207                               ang = "Function's name in wrapper",
208                               ),
209     
210         GradientName = SIMP ( statut = "f",
211                               typ = "TXM",
212                               into = ( "GENERICSOLVER", ),
213                               defaut = "GENERICSOLVER",
214                               max = 1,
215                               fr = "Nom du gradient dans le wrapper",
216                               ang = "Gradient's name in wrapper",
217                               ),
218     
219         HessianName = SIMP ( statut = "f",
220                              typ = "TXM",
221                              into = ( "GENERICSOLVER", ),
222                              defaut = "GENERICSOLVER",
223                              max = 1,
224                              fr = "Nom du hessian dans le wrapper",
225                              ang = "Hessian's name in wrapper",
226                              ),
227     
228         WrapCouplingMode = SIMP ( statut = "o",
229                                   typ = "TXM",
230                                   max = 1,
231                                   into = ( "static-link", ),
232                                   defaut = "static-link",
233                                   fr = "Mode de couplage du solver",
234                                   ang = "Solver coupling mode",
235                                   ),
236     
237         State = SIMP ( statut = "f",
238                        typ = "TXM",
239                        max = 1,
240                        into = ( "shared", "specific" ),
241                        fr = "Partage de l'etat interne entre les fonctions",
242                        ang = "Internal state sharing",
243                        ),
244     
245         InDataTransfer = SIMP ( statut = "o",
246                                 typ = "TXM",
247                                 max = 1,
248                                 into = ( "files", "arguments", "corba", ),
249                                 defaut = "corba",
250                                 fr = "Mode de transfert des donnees d'entree",
251                                 ang = "Input transfering mode",
252                                 ),
253     
254         OutDataTransfer = SIMP ( statut = "o",
255                                  typ = "TXM",
256                                  max = 1,
257                                  into = ( "files", "arguments", "corba", ),
258                                  defaut = "corba",
259                                  fr = "Mode de transfert des donnees de sortie",
260                                  ang = "Output transfering mode",
261                                  ),
262   
263     ), # Fin BLOC Salome
264
265
266   Files = FACT ( statut = "f",
267                  min = 1,
268                  max = "**",
269
270                  Id = SIMP ( statut = "o",
271                              typ = "TXM",
272                              max = 1,
273                              fr = "Identificateur du  fichier",
274                              ang = "File id",
275                              ),
276
277                  Type = SIMP ( statut = "o",
278                                typ = "TXM",
279                                max = 1,
280                                into = ( "in", "out", ),
281                                fr = "Fichier d entree ou de sortie du solveur ?",
282                                ang = "Input or Output file ?",
283                                ),
284
285                  Name = SIMP ( statut = "f",
286                                typ = "TXM",
287                                max = 1,
288                                fr = "Nom du fichier",
289                                ang = "File name",
290                                ),
291
292                  Path = SIMP ( statut = "o",
293                                typ = "TXM",
294                                max = 1,
295                                fr = "Chemin du fichier",
296                                ang = "Path file ",
297                                ),
298
299                  Subst = SIMP ( statut = "f",
300                                 typ = "TXM",
301                                 max = "**",
302                                 fr = "Liste de variables",
303                                 ang = "List",
304                                 ),
305
306                  ), # Fin FACT Files
307
308 ) # Fin PROC WRAPPER