Salome HOME
legere difference ds VARIABLES_TO_BE...
[tools/eficas.git] / Openturns_Wrapper / OpenTURNS_Cata_Wrapper_V1.py
1 # -*- coding: utf-8 -*-
2
3 # --------------------------------------------------
4 # debut entete
5 # --------------------------------------------------
6
7 import Accas
8 from Accas import *
9
10
11 #CONTEXT.debug = 1
12 JdC = JDC_CATA ( code = 'OPENTURNS_WRAPPER',
13                  execmodul = None,
14                  regles = ( AU_MOINS_UN ( 'WRAPPER' ), ),
15                  ) # Fin JDC_CATA
16
17 # --------------------------------------------------
18 # fin entete
19 # --------------------------------------------------
20
21
22 #================================
23 # 2. Definition des variables
24 #================================
25
26 VARIABLEPOOL = PROC ( nom = "VARIABLEPOOL",
27                        op = None,
28                        docu = "",
29                        fr = "L'ensemble des variables probabilistes",
30                        ang = "The pool of probabilistic variables",
31
32                        
33   Variables = FACT ( statut = "o",
34                      min = 1,
35                      max = "**",
36
37
38
39                      Name = SIMP ( statut = "o",
40                                    typ = "TXM",
41                                    max = 1,
42                                    fr = "Nom de la variable, identique au nom dans le solver.",
43                                    ang = "Name of the variable, identical to the name in solver."
44                                    ),
45
46                      Type = SIMP ( statut = "o",
47                                    typ = "TXM",
48                                    max = 1,
49                                    into = ( "in", "out", ),
50                                    defaut = "in",
51                                    fr = "variable d'entree ou de sortie du solver",
52                                    ang = "Input or Output variable",
53                                    ),
54
55                      Unit = SIMP ( statut = "f",
56                                    typ = "TXM",
57                                    max = 1,
58                                    fr = "Unite",
59                                    ang = "Unit",
60                                    ),
61
62                      Comment = SIMP ( statut = "f",
63                                       typ = "TXM",
64                                       max = 1,
65                                       fr = "Commentaire",
66                                       ang = "Comment",
67                                       ),
68
69                      Regexp = SIMP ( statut = "f",
70                                      typ = "TXM",
71                                      max = 1,
72                                      fr = "Expression reguliere",
73                                      ang = "Regular expression",
74                                      ),
75
76                      Format = SIMP ( statut = "f",
77                                      typ = "TXM",
78                                      max = 1,
79                                      fr = "Format d'ecriture",
80                                      ang = "Format",
81                                      ),
82
83
84                       ), # Fin FACT Variables
85
86 ) # Fin PROC VARIABLEPOOL
87
88
89 #================================
90 # Definition des parametres du wrapper
91 #================================
92
93 # Nota : les variables de type PROC doivent etre en majuscules !
94 WRAPPER = PROC ( nom = "WRAPPER",
95                  op = None,
96                  docu = "",
97                  fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.",
98                  ang = "Writes the configuration file for OPENTURNS.",
99
100
101     WrapperPath = SIMP ( statut = "o",
102                          typ = "TXM",
103                          max = 1,
104                          fr = "Chemin d acces au wrapper",
105                          ang = "Wrapper library path",
106                          ),
107
108     FunctionName = SIMP ( statut = "o",
109                           typ = "TXM",
110                           max = 1,
111                           fr = "Nom de la fonction dans le wrapper",
112                           ang = "Function's name in wrapper",
113                           ),
114
115     GradientName = SIMP ( statut = "f",
116                           typ = "TXM",
117                           max = 1,
118                           fr = "Nom du gradient dans le wrapper",
119                           ang = "Gradient's name in wrapper",
120                           ),
121
122     HessianName = SIMP ( statut = "f",
123                          typ = "TXM",
124                          max = 1,
125                          fr = "Nom du hessian dans le wrapper",
126                          ang = "Hessian's name in wrapper",
127                          ),
128
129     WrapCouplingMode = SIMP ( statut = "o",
130                               typ = "TXM",
131                               max = 1,
132                               into = ( "static-link", "dynamic-link", "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", ),
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",  ),
167                              fr = "Mode de transfert des donnees de sortie",
168                              ang = "Output transfering mode",
169                              ),
170
171
172
173
174   Files = FACT ( statut = "f",
175                  min = 1,
176                  max = "**",
177
178                  Id = SIMP ( statut = "o",
179                              typ = "TXM",
180                              max = 1,
181                              fr = "Identificateur du  fichier",
182                              ang = "File id",
183                              ),
184
185                  Type = SIMP ( statut = "o",
186                                typ = "TXM",
187                                max = 1,
188                                into = ( "in", "out", ),
189                                fr = "Fichier d entree ou de sortie du solveur ?",
190                                ang = "Input or Output file ?",
191                                ),
192
193                  Name = SIMP ( statut = "f",
194                                typ = "TXM",
195                                max = 1,
196                                fr = "Nom du fichier",
197                                ang = "File name",
198                                ),
199
200                  Path = SIMP ( statut = "o",
201                                typ = "TXM",
202                                max = 1,
203                                fr = "Chemin du fichier",
204                                ang = "Path file ",
205                                ),
206
207                  Subst = SIMP ( statut = "f",
208                                 typ = "TXM",
209                                 max = "**",
210                                 fr = "Liste de variables",
211                                 ang = "List",
212                                 ),
213
214                  ), # Fin FACT Files
215
216 ) # Fin PROC WRAPPER