Salome HOME
menage
[tools/eficas.git] / Openturns_Wrapper / OpenTURNS_Cata_Wrapper_V2.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
90     WrapperPath = SIMP ( statut = "o",
91                          typ = "TXM",
92                          max = 1,
93                          fr = "Chemin d acces au wrapper",
94                          ang = "Wrapper library path",
95                          ),
96
97     FunctionName = SIMP ( statut = "o",
98                           typ = "TXM",
99                           max = 1,
100                           fr = "Nom de la fonction dans le wrapper",
101                           ang = "Function's name in wrapper",
102                           ),
103
104     GradientName = SIMP ( statut = "f",
105                           typ = "TXM",
106                           max = 1,
107                           fr = "Nom du gradient dans le wrapper",
108                           ang = "Gradient's name in wrapper",
109                           ),
110
111     HessianName = SIMP ( statut = "f",
112                          typ = "TXM",
113                          max = 1,
114                          fr = "Nom du hessian dans le wrapper",
115                          ang = "Hessian's name in wrapper",
116                          ),
117
118     WrapCouplingMode = SIMP ( statut = "o",
119                               typ = "TXM",
120                               max = 1,
121                               into = ( "static-link", "dynamic-link", "fork", ),
122                               defaut = "fork",
123                               fr = "Mode de couplage du solver",
124                               ang = "Solver coupling mode",
125                               ),
126
127     Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ",
128                     
129                   Command = SIMP ( statut = "o",
130                                    max = 1,
131                                    typ = "TXM",
132                                    fr = "Chemin du solver",
133                                    ang = "solver path",
134                                    ),
135                   ), # Fin BLOC Fork
136
137     State = SIMP ( statut = "f",
138                    typ = "TXM",
139                    max = 1,
140                    into = ( "shared", "specific" ),
141                    fr = "Partage de l'etat interne entre les fonctions",
142                    ang = "Internal state sharing",
143                    ),
144
145     InDataTransfer = SIMP ( statut = "o",
146                             typ = "TXM",
147                             max = 1,
148                             into = ( "files", "arguments", ),
149                             fr = "Mode de transfert des donnees d'entree",
150                             ang = "Input transfering mode",
151                             ),
152
153     OutDataTransfer = SIMP ( statut = "o",
154                              typ = "TXM",
155                              max = 1,
156                              into = ( "files", "arguments",  ),
157                              fr = "Mode de transfert des donnees de sortie",
158                              ang = "Output transfering mode",
159                              ),
160
161
162
163
164   Files = FACT ( statut = "f",
165                  min = 1,
166                  max = "**",
167
168                  Id = SIMP ( statut = "o",
169                              typ = "TXM",
170                              max = 1,
171                              fr = "Identificateur du  fichier",
172                              ang = "File id",
173                              ),
174
175                  Type = SIMP ( statut = "o",
176                                typ = "TXM",
177                                max = 1,
178                                into = ( "in", "out", ),
179                                fr = "Fichier d entree ou de sortie du solveur ?",
180                                ang = "Input or Output file ?",
181                                ),
182
183                  Name = SIMP ( statut = "f",
184                                typ = "TXM",
185                                max = 1,
186                                fr = "Nom du fichier",
187                                ang = "File name",
188                                ),
189
190                  Path = SIMP ( statut = "o",
191                                typ = "TXM",
192                                max = 1,
193                                fr = "Chemin du fichier",
194                                ang = "Path file ",
195                                ),
196
197                  Subst = SIMP ( statut = "f",
198                                 typ = "TXM",
199                                 max = "**",
200                                 fr = "Liste de variables",
201                                 ang = "List",
202                                 ),
203
204                  ), # Fin FACT Files
205
206 ) # Fin PROC WRAPPER