Salome HOME
mise à jour catalogues Telemac branche v7p2
[tools/eficas.git] / Openturns_Wrapper / OpenTURNS_Cata_Wrapper_V3.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                       ), # Fin BLOC Fork
146     
147         State = SIMP ( statut = "f",
148                        typ = "TXM",
149                        max = 1,
150                        into = ( "shared", "specific" ),
151                        fr = "Partage de l'etat interne entre les fonctions",
152                        ang = "Internal state sharing",
153                        ),
154     
155         InDataTransfer = SIMP ( statut = "o",
156                                 typ = "TXM",
157                                 max = 1,
158                                 into = ( "files", "arguments", "corba" ),
159                                 fr = "Mode de transfert des donnees d'entree",
160                                 ang = "Input transfering mode",
161                                 ),
162     
163         OutDataTransfer = SIMP ( statut = "o",
164                                  typ = "TXM",
165                                  max = 1,
166                                  into = ( "files", "arguments", "corba" ),
167                                  fr = "Mode de transfert des donnees de sortie",
168                                  ang = "Output transfering mode",
169                                  ),
170   
171     ), # Fin BLOC StandAlone
172
173
174     Salome = BLOC ( condition = " Framework in ( 'Salome', ) ",
175
176         SolverComponentName  = SIMP ( statut = "f",
177                                       typ = "TXM",
178                                       max = 1,
179                                       defaut = "UNDEFINED",
180                                       fr = "Nom du composant solver",
181                                       ang = "Solver component name",
182                                       ),
183     
184     
185         WrapperPath = SIMP ( statut = "o",
186                              typ = "TXM",
187                              into = ( "GenericWrapper4Salome.so", ),
188                              defaut = "GenericWrapper4Salome.so",
189                              max = 1,
190                              fr = "Chemin d acces au wrapper",
191                              ang = "Wrapper library path",
192                              ),
193     
194         FunctionName = SIMP ( statut = "o",
195                               typ = "TXM",
196                               into = ( "GENERICSOLVER", ),
197                               defaut = "GENERICSOLVER",
198                               max = 1,
199                               fr = "Nom de la fonction dans le wrapper",
200                               ang = "Function's name in wrapper",
201                               ),
202     
203         GradientName = SIMP ( statut = "f",
204                               typ = "TXM",
205                               into = ( "GENERICSOLVER", ),
206                               defaut = "GENERICSOLVER",
207                               max = 1,
208                               fr = "Nom du gradient dans le wrapper",
209                               ang = "Gradient's name in wrapper",
210                               ),
211     
212         HessianName = SIMP ( statut = "f",
213                              typ = "TXM",
214                              into = ( "GENERICSOLVER", ),
215                              defaut = "GENERICSOLVER",
216                              max = 1,
217                              fr = "Nom du hessian dans le wrapper",
218                              ang = "Hessian's name in wrapper",
219                              ),
220     
221         WrapCouplingMode = SIMP ( statut = "o",
222                                   typ = "TXM",
223                                   max = 1,
224                                   into = ( "static-link", ),
225                                   defaut = "static-link",
226                                   fr = "Mode de couplage du solver",
227                                   ang = "Solver coupling mode",
228                                   ),
229     
230         State = SIMP ( statut = "f",
231                        typ = "TXM",
232                        max = 1,
233                        into = ( "shared", "specific" ),
234                        fr = "Partage de l'etat interne entre les fonctions",
235                        ang = "Internal state sharing",
236                        ),
237     
238         InDataTransfer = SIMP ( statut = "o",
239                                 typ = "TXM",
240                                 max = 1,
241                                 into = ( "files", "arguments", "corba", ),
242                                 defaut = "corba",
243                                 fr = "Mode de transfert des donnees d'entree",
244                                 ang = "Input transfering mode",
245                                 ),
246     
247         OutDataTransfer = SIMP ( statut = "o",
248                                  typ = "TXM",
249                                  max = 1,
250                                  into = ( "files", "arguments", "corba", ),
251                                  defaut = "corba",
252                                  fr = "Mode de transfert des donnees de sortie",
253                                  ang = "Output transfering mode",
254                                  ),
255   
256     ), # Fin BLOC Salome
257
258
259   Files = FACT ( statut = "f",
260                  min = 1,
261                  max = "**",
262
263                  Id = SIMP ( statut = "o",
264                              typ = "TXM",
265                              max = 1,
266                              fr = "Identificateur du  fichier",
267                              ang = "File id",
268                              ),
269
270                  Type = SIMP ( statut = "o",
271                                typ = "TXM",
272                                max = 1,
273                                into = ( "in", "out", ),
274                                fr = "Fichier d entree ou de sortie du solveur ?",
275                                ang = "Input or Output file ?",
276                                ),
277
278                  Name = SIMP ( statut = "f",
279                                typ = "TXM",
280                                max = 1,
281                                fr = "Nom du fichier",
282                                ang = "File name",
283                                ),
284
285                  Path = SIMP ( statut = "o",
286                                typ = "TXM",
287                                max = 1,
288                                fr = "Chemin du fichier",
289                                ang = "Path file ",
290                                ),
291
292                  Subst = SIMP ( statut = "f",
293                                 typ = "TXM",
294                                 max = "**",
295                                 fr = "Liste de variables",
296                                 ang = "List",
297                                 ),
298
299                  ), # Fin FACT Files
300
301 ) # Fin PROC WRAPPER