Salome HOME
Updates for Telemac
[tools/eficas.git] / Telemac / stbtel_cata_auto.py
1
2 # -*- coding: latin-1 -*-
3
4 from Accas import *
5 class DateJJMMAAAA:
6   def __init__(self):
7     self.ntuple=3
8
9   def __convert__(self,valeur):
10     if type(valeur) == types.StringType: return None
11     if len(valeur) != self.ntuple: return None
12     return valeur
13
14   def info(self):
15     return "Date : jj/mm/aaaa "
16
17   __repr__=info
18   __str__=info
19
20 class grma(GEOM):
21   pass
22
23 import types
24 class Tuple:
25   def __init__(self,ntuple):
26     self.ntuple=ntuple
27
28   def __convert__(self,valeur):
29     if type(valeur) == types.StringType:
30       return None
31     if len(valeur) != self.ntuple:
32       return None
33     return valeur
34
35   def info(self):
36     return "Tuple de %s elements" % self.ntuple
37
38
39
40 JdC = JDC_CATA (code = 'STBTEL',
41                 execmodul = None,
42                 )
43 # =======================================================================
44 # Catalog entry for the MAP function : c_pre_interfaceBody_mesh
45 # =======================================================================
46
47 VERSION_CATALOGUE="TRUNK_20210323"
48 # -----------------------------------------------------------------------
49 TREATMENT = PROC(nom= "TREATMENT",op = None,
50 # -----------------------------------------------------------------------
51 #   -----------------------------------
52     MINIMUM_DISTANCE_BETWEEN_TWO_POINTS = SIMP(statut ='o',
53 #   -----------------------------------
54         typ = 'R',
55         defaut = 1.E-5,
56         fr = """Distance (en metres)en dessous de laquelle deux noeuds sont consideres
57 comme confondus par \stbtel, lors de la verification des resultats
58 fournis par le mailleur. Lorsque deux noeuds sont confondus, l''un
59 d''entre eux est elimine, et tous les noeuds du maillage sont
60 renumerotes.""",
61         ang = """Distance (in meters) below which two nodes are considered as identical
62 by \stbtel when the results supplied by the mesh generator are being
63 checked. When two nodes occur at the same place, one of them is
64 eliminated and all the mesh nodes are renumbered.""",
65     ),
66 #   -----------------------------------
67     MESH_GENERATOR = SIMP(statut ='o',
68 #   -----------------------------------
69         typ = 'TXM',
70         into = ['SUPERTAB4','SUPERTAB6','MASTER2','SIMAIL','SELAFIN','TRIGRID','ADCIRC','FASTTABS'],
71         defaut = 'MASTER2',
72         fr = """Nom du mailleur utilise pour la creation du \telkey{FICHIER UNIVERSEL}.
73 Ce peut etre :
74 \begin{itemize}
75 \item SUPERTAB6 (version 6 du mailleur SUPERTAB),
76 \item SUPERTAB4 (version 4 du mailleur SUPERTAB),
77 \item MASTER2 (version 2 du mailleur MASTER-SERIES),
78 \item SIMAIL,
79 \item SELAFIN (afin de modifier un maillage deja utilise, comme pour :
80 \begin{itemize}
81 \item interpoler de nouveau fonds
82 \item eliminer des dependances arrieres
83 \item coupe triangles surcontraints),
84 \end{itemize}
85 \item TRIGRID,
86 \item FASTTABS.
87 \end{itemize}""",
88         ang = """Name of the mesh generator used for preparing the \telkey{UNIVERSAL
89 FILE}. It will be selected among the following:
90 \begin{itemize}
91 \item SUPERTAB6 (version 6 of SUPERTAB mesh generator),
92 \item SUPERTAB4 (version 4 of SUPERTAB mesh generator),
93 \item MASTER2 (version 2 of MASTER-SERIES mesh generator),
94 \item SIMAIL,
95 \item SELAFIN (in order to modify a mesh already used, as for example :
96 \begin{itemize}
97 \item to interpolate a new bathymetry
98 \item to eliminate backward dependencies
99 \item to cut overstressed triangles ),
100 \end{itemize}
101 \item TRIGRID,
102 \item FASTTABS.
103 \end{itemize}""",
104     ),
105 #   -----------------------------------
106     b_MESH_GENERATORG = BLOC(condition="MESH_GENERATOR == 'TRIGRID'",
107 #   -----------------------------------
108 #       -----------------------------------
109         BOTTOM_CORRECTION_OF_TRIGRID = SIMP(statut ='o',
110 #       -----------------------------------
111             typ = 'R',
112             defaut = 0.,
113             fr = """Fixe la valeur a ajouter a la bathymetrie lue dans le fichier
114 gemere par Trigrid.""",
115             ang = """Value to be added at the bottom value read in the Trigrid file""",
116         ),
117     ),
118 #   -----------------------------------
119     b_MESH_GENERATORH = BLOC(condition="MESH_GENERATOR in ['FASTTABS', 'TRIGRID']",
120 #   -----------------------------------
121 #       -----------------------------------
122         BATHYMETRY_IN_THE_UNIVERSAL_FILE = SIMP(statut ='o',
123 #       -----------------------------------
124             typ = bool,
125             defaut = False,
126             fr = """Permet de relire la bathymetrie directement dans le fichier de
127 maillage (Trigrid ou Fasttabs).""",
128             ang = """The bathymetry will be read in the mesh file (Trigrid or Fasttabs).""",
129         ),
130 #       -----------------------------------
131         MESH_ADDITIONAL_DATA_FILE = SIMP(statut ='o',
132 #       -----------------------------------
133             typ = ('Fichier','All Files (*)'),
134             defaut = '',
135             fr = """Nom du fichier additionnel. Ce fichier a une signification
136 differente en fonction du mailleur choisi.
137 \begin{itemize}
138 \item Trigrid : Fichier contenant la table de connectivites
139 (obligatoire).
140 \item Fasttabs : Fichier contenant les conditions limites (optionnel).
141 \end{itemize}""",
142             ang = """Name of the additionql file. The meaning of this file depend on the
143 type of mesh generator.
144 \begin{itemize}
145 \item Trigrid : containing the connectivity table built (mandatory).
146 \item Fasttabs  : boundary condition file built by Fasttabs (optional).
147 \end{itemize}""",
148         ),
149     ),
150 #   -----------------------------------
151     BINARY_STANDARD = SIMP(statut ='f',
152 #   -----------------------------------
153         typ = 'TXM',
154         into = ['STD','IBM','I3E'],
155         defaut = 'STD',
156         fr = """Adapte l''ecriture du \telkey{FICHIER DE GEOMETRIE POUR TELEMAC} au
157 standard binaire choisi pour celui-ci. Ce peut etre :
158 \begin{itemize}
159 \item IBM : binaire IBM,
160 \item I3E : binaire HP,
161 \item STD : prend par defaut le binaire de la machine sur laquelle
162             l''utilisateur travaille. Ce sont alors des ordres READ et
163             WRITE normaux qui sont utilises.
164 \end{itemize}""",
165         ang = """Matches the writing of the \telkey{GEOMETRY FILE FOR TELEMAC} to the
166 binary standard chosen for the latter. It will be selected among the
167 following:
168 \begin{itemize}
169 \item IBM: IBM binary,
170 \item I3E: HP binary,
171 \item STD: takes by default the binary on the computer with which
172           the user is working. The normal READ and WRITE commands
173           are then used.
174 \end{itemize}""",
175     ),
176 #   -----------------------------------
177     UNIVERSAL_FILE = SIMP(statut ='o',
178 #   -----------------------------------
179         typ = ('Fichier','All Files (*)'),
180         defaut = '',
181         fr = """Nom du fichier construit par le mailleur, a partir duquel \stbtel va
182 travailler.""",
183         ang = """Name of the file created by the mesh generator, and from which \stbtel
184 will work.""",
185     ),
186 #   -----------------------------------
187     GEOMETRY_FILE_FORMAT_FOR_TELEMAC = SIMP(statut ='f',
188 #   -----------------------------------
189         typ = 'TXM',
190         into = ['','SERAFIN','SERAFIND','MED'],
191         defaut = '',
192         fr = """Format du fichier qui contiendra le maillage, et qui servira pour
193 les calculs \telemac{2D}. Si aucun format n''est donné il prendra
194 soit le même format que le fichier universel si il est en
195 SERAFIN/SERAFIND sinon SERAFIN""",
196         ang = """Format of the file that will contain the mesh data,
197 and to be used in \telemac{2D} computations.
198 If no format is given it will take the format of the universal
199 file (if it is SERAFIN file) SERAFIN otherwise""",
200     ),
201 #   -----------------------------------
202     GEOMETRY_FILE_FOR_TELEMAC = SIMP(statut ='o',
203 #   -----------------------------------
204         typ = ('Fichier','All Files (*)','Sauvegarde'),
205         defaut = '',
206         fr = """Nom du fichier qui contiendra le maillage mis au format SELAFIN, et
207 qui servira pour les calculs \telemac{2D}.""",
208         ang = """Name of the file that will contain the mesh data to SELAFIN format,
209 and to be used in \telemac{2D} computations.""",
210     ),
211 #   -----------------------------------
212     BOUNDARY_CONDITIONS_FILE = SIMP(statut ='o',
213 #   -----------------------------------
214         typ = ('Fichier','All Files (*)','Sauvegarde'),
215         defaut = '',
216         fr = """Nom du fichier qui contiendra les conditions aux limites lues dans le
217 \telkey{FICHIER UNIVERSEL}, et qui servira pour les calculs
218 \telemac{2D}. (les conditions aux limites sont definies lors de la
219 realisation du maillage, au moyen de couleurs affectees aux noeuds des
220 frontieres du domaine de calcul).""",
221         ang = """Name of the file that will contain the boundary conditions being read
222 from the \telkey{UNIVERSAL FILE}, and to be used in \telemac{2D}
223 computations. (The boundary conditions are defined when preparing the
224 meshes, through colours that are allotted to the nodes of the
225 computation domain boundaries).""",
226     ),
227 #   -----------------------------------
228     BOUNDARY_CONDITIONS_IN_THE_ADDITIONAL_FILE = SIMP(statut ='o',
229 #   -----------------------------------
230         typ = bool,
231         defaut = False,
232         fr = """Permet de relire les conditions limites dans le fichier
233 additionnel (Fasttabs).""",
234         ang = """The boundary condition will be read in the additional file
235  (Fasttabs).""",
236     ),
237 #   -----------------------------------
238     BOUNDARY_UNIVERSAL_FILE = SIMP(statut ='f',
239 #   -----------------------------------
240         typ = ('Fichier','All Files (*)'),
241         defaut = '',
242         fr = """Nom du fichier construit par le mailleur, a partir duquel \stbtel va
243 travailler.""",
244         ang = """Name of the file created by the mesh generator, and from which \stbtel
245 will work.""",
246     ),
247 #   -----------------------------------
248     OVERSTRESSED_TRIANGLES_CUTTING = SIMP(statut ='o',
249 #   -----------------------------------
250         typ = bool,
251         defaut = False,
252         fr = """Un triangle surcontraint est tel que ses trois noeuds soient situes
253 sur une frontiere du domaine de calcul. La presence de tels triangles
254 peut entrainer des instabilites lors des calculs realises par
255 TELEMAC 2D.\\
256 Cette option permet, en creant un noeud place au barycentre de des
257 triangles surcontraints, d''eviter de tels problemes.""",
258         ang = """An overstressed triangle is one whose three nodes are located along a
259 boundary of the computational domain. The occurrence of such triangles
260 may bring about instabilities in the computations made by TELEMAC 2D.
261 Such problems can be prevented by this option, through the creation of
262 a node at the geometric centres of the overstressed triangles.""",
263     ),
264 #   -----------------------------------
265     ELIMINATION_OF_BACKWARD_DEPENDENCIES = SIMP(statut ='o',
266 #   -----------------------------------
267         typ = bool,
268         defaut = True,
269         fr = """Permet de renumeroter les noeuds du maillage de maniere a eliminer les
270 dependances arrieres et autoriser ainsi le forcage de la vectorisation
271 lorsque les calculs TELEMAC 2D son effectues sur CRAY.\\
272 \begin{WarningBlock}{Attention :}
273 Un nombre minimum d''environ 500 noeuds est requis pour
274 l''activation de cette option.
275 \end{WarningBlock}""",
276         ang = """Provides for renumbering of the mesh nodes in order to eliminate the
277 backward dependencies, thereby enabling a forced vectorisation when
278 the TELEMAC 2D computations are made on a CRAY.\\
279 \begin{WarningBlock}{Warning:}
280 About 500 nodes is the least number required for activating
281 this option.
282 \end{WarningBlock}""",
283     ),
284 #   -----------------------------------
285     NODES_RENUMBERING = SIMP(statut ='o',
286 #   -----------------------------------
287         typ = bool,
288         defaut = False,
289         fr = """Permet d''utiliser le nouveau type de stockage des matrices.""",
290         ang = """Necessary to use the new storage scheme for the matrix.""",
291     ),
292 #   -----------------------------------
293     WRITING_NODE_COLOURS = SIMP(statut ='o',
294 #   -----------------------------------
295         typ = bool,
296         defaut = False,
297         fr = """Option non activee.""",
298         ang = """Option not activated""",
299     ),
300 #   -----------------------------------
301     BOTTOM = FACT(statut='f',
302 #   -----------------------------------
303 #       -----------------------------------
304         MAXIMUM_NUMBER_OF_BATHYMETRIC_POINTS = SIMP(statut ='o',
305 #       -----------------------------------
306             typ = 'I',
307             defaut = 20000,
308             fr = """Permet de dimensionner le tableau utilise pour la lecture, dans les
309 \telkey{FICHIERS DES FONDS}, des points releves a la table a
310 digitaliser.""",
311             ang = """Designed for dimensioning the array that is used for reading, in the
312 \telkey{BOTTOM TOPOGRAPHY FILES}, the points recorded at the digitizing
313 tablet.""",
314         ),
315 #       -----------------------------------
316         MINIMUM_DISTANCE_AT_BOUNDARY = SIMP(statut ='o',
317 #       -----------------------------------
318             typ = 'R',
319             defaut = 0.,
320             fr = """L''interpolation de la bathymetrie sur les noeuds du maillage est
321 realisee de la facon suivante. Pour chaque noeud du maillage, on
322 decoupe le plan en 4 quadrans. Dans chacun de ces quadrans, on cherche
323 le point releve a la table a digitaliser le plus proche. On affecte
324 alors au noeud considere une profondeur correspondant a la moyenne,
325 ponderee par la distance a ce noeud, des profondeurs en chacun des 4
326 points precedemment trouves.\\
327 On verifie toutefois que, lors de la recherche des points, les
328 frontieres du domaine ne sont pas franchies, de maniere a ne pas
329 introduire d''aberration dans la bathymetrie.\\
330 Ce mot-cle permet alors de definir la distance minimale aux frontieres
331 du domaine en dessous de laquelle on refuse de prendre en compte les
332 points releves.""",
333             ang = """The bathymetric data at the mesh nodes are interpolated. At each mesh
334 node, the plane is cut into 4 quadrants in each of which, among the
335 points recorded at the digitizing tablet, the closest one to the node
336 being considered is searched for.\\
337 This node is thenn given a depth corresponding to the mean depth at
338 each of the 4 points previously found, these depths being weighted
339 by the distance to the node.\\
340 When searching for the points in the quadrants, however, one shall
341 make sure the boundaries aare not overstepped in order to prevent
342 aberrations from being introduced into the bathymetric data.\\
343 The keyword can then be used for specifying the minimum distance to
344 the boundaries below which the recorded points should be ignored.""",
345         ),
346 #       -----------------------------------
347         BOTTOM_TOPOGRAPHY_FILES = SIMP(statut ='f',
348 #       -----------------------------------
349             typ = ('Fichier','All Files (*)'),
350             defaut = '',
351             fr = """Nom du fichier contenant la bathymetrie (au standard SINUSX), qui
352 servira pour la definition, par interpolation, de la profondeur en
353 chaque point du maillage.""",
354             ang = """Name of the file containing the bathymetric points (to SINUSX
355 standard), to be used, through interpolation, for defining the depth
356 at each point of the mesh.""",
357         ),
358 #       -----------------------------------
359         BOTTOM_TOPOGRAPHY_FILES_2 = SIMP(statut ='f',
360 #       -----------------------------------
361             typ = ('Fichier','All Files (*)'),
362             defaut = '',
363             fr = """Nom du fichier contenant la bathymetrie (au standard SINUSX), qui
364 servira pour la definition, par interpolation, de la profondeur en
365 chaque point du maillage.""",
366             ang = """Name of the file containing the bathymetric points (to SINUSX
367 standard), to be used, through interpolation, for defining the depth
368 at each point of the mesh.""",
369         ),
370 #       -----------------------------------
371         BOTTOM_TOPOGRAPHY_FILES_3 = SIMP(statut ='f',
372 #       -----------------------------------
373             typ = ('Fichier','All Files (*)'),
374             defaut = '',
375             fr = """Nom du fichier contenant la bathymetrie (au standard SINUSX), qui
376 servira pour la definition, par interpolation, de la profondeur en
377 chaque point du maillage.""",
378             ang = """Name of the file containing the bathymetric points (to SINUSX
379 standard), to be used, through interpolation, for defining the depth
380 at each point of the mesh.""",
381         ),
382 #       -----------------------------------
383         BOTTOM_TOPOGRAPHY_FILES_4 = SIMP(statut ='f',
384 #       -----------------------------------
385             typ = ('Fichier','All Files (*)'),
386             defaut = '',
387             fr = """Nom du fichier contenant la bathymetrie (au standard SINUSX), qui
388 servira pour la definition, par interpolation, de la profondeur en
389 chaque point du maillage.""",
390             ang = """Name of the file containing the bathymetric points (to SINUSX
391 standard), to be used, through interpolation, for defining the depth
392 at each point of the mesh.""",
393         ),
394 #       -----------------------------------
395         BOTTOM_TOPOGRAPHY_FILES_5 = SIMP(statut ='f',
396 #       -----------------------------------
397             typ = ('Fichier','All Files (*)'),
398             defaut = '',
399             fr = """Nom du fichier contenant la bathymetrie (au standard SINUSX), qui
400 servira pour la definition, par interpolation, de la profondeur en
401 chaque point du maillage.""",
402             ang = """Name of the file containing the bathymetric points (to SINUSX
403 standard), to be used, through interpolation, for defining the depth
404 at each point of the mesh.""",
405         ),
406     ),
407 #   -----------------------------------
408     EXTRACTION = FACT(statut='f',
409 #   -----------------------------------
410 #       -----------------------------------
411         NUMBER_OF_VERTICES_OF_THE_POLYGON_TO_EXTRACT_THE_MESH = SIMP(statut ='o',
412 #       -----------------------------------
413             typ = 'I',
414             defaut = 0,
415             fr = """Lorsque l''on souhaite extraire une partie du maillage, permet de
416 definir le nombre de sommets du polygone a l''interieur duquel le
417 maillage sera effectivement extrait.\\
418 \begin{WarningBlock}{Attention :}
419 Ce polygone doit etre convexe et les coordonnees des sommets donnes dans
420 l''ordre trigonometrique.  \end{WarningBlock}""",
421             ang = """When you want to extract a piece of the mesh, this key-word fixes
422 the number of vertices of a polygon inside of which the mesh will be
423 finally extracted.\\
424 \begin{WarningBlock}{Warning:}
425 This polygon should have a convex shape and the coordinates of the
426 vertices be given with an anti clock wise order.
427 \end{WarningBlock}""",
428         ),
429 #       -----------------------------------
430         b_NUMBER_OF_VERTICES_OF_THE_POLYGON_TO_EXTRACT_THE_MESHG = BLOC(condition="NUMBER_OF_VERTICES_OF_THE_POLYGON_TO_EXTRACT_THE_MESH > 0",
431 #       -----------------------------------
432 #           -----------------------------------
433             ABSCISSAE_OF_THE_VERTICES_OF_THE_POLYGON_TO_EXTRACT_THE_MESH = SIMP(statut ='o',
434 #           -----------------------------------
435                 typ = 'R', min=0, max='**',
436                 defaut = [0,0,0,0,0,0,0,0,0],
437                 fr = """Lorsque l''on souhaite extraire une partie du maillage,
438 permet de definir les abscisses des sommets du polygone a l''interieur
439 duquel le maillage sera effectivement extrait.
440 \begin{WarningBlock}{Attention :}
441 ce polygone doit etre convexe et les coordonnees des
442 sommets donnes dans l''ordre trigonometrique.
443 \end{WarningBlock}""",
444                 ang = """When you want to extract a piece of the mesh, this key-word fixes
445 the abscissae of the vertices of a polygon inside of which the mesh
446 will be finally extracted.\\
447 \begin{WarningBlock}{Warning:}
448 This polygon should have a convex shape and the coordinates
449 of the vertices be given with an anti clock wise order.
450 \end{WarningBlock}""",
451             ),
452 #           -----------------------------------
453             ORDINATES_OF_THE_VERTICES_OF_THE_POLYGON_TO_EXTRACT_THE_MESH = SIMP(statut ='o',
454 #           -----------------------------------
455                 typ = 'R', min=0, max='**',
456                 defaut = [0,0,0,0,0,0,0,0,0],
457                 fr = """Lorsque l''on souhaite extraire une partie du maillage,
458 permet de definir les ordonnees des sommets du polygone a l''interieur
459 duquel le maillage sera effectivement extrait.\\
460 \begin{WarningBlock}{Attention :}
461 Ce polygone doit etre convexe et les coordonnees des
462 sommets donnes dans l''ordre trigonometrique.
463 \end{WarningBlock}""",
464                 ang = """When you want to extract a piece of the mesh, this key-word fixes
465 the ordinates of the vertices of a polygon inside of which the mesh
466 will be finally extracted.\\
467 \begin{WarningBlock}{Warning:}
468 This polygon should have a convex shape and the coordinates
469 of the vertices be given with an anti clock wise order.
470 \end{WarningBlock}""",
471             ),
472 #           -----------------------------------
473             PROJECTION_AFTER_EXTRACTION = SIMP(statut ='o',
474 #           -----------------------------------
475                 typ = bool, min=0, max='**',
476                 defaut = [True ],
477                 fr = """Lors d''une extraction de maillage suivant un polygone, projette ou
478 non le maillage extrait sur les aretes du polygone.""",
479                 ang = """When a mesh is extracted inside a polygon, indicates whether the mesh
480 should be projected through the faces of the polygon or not.""",
481             ),
482         ),
483     ),
484 #   -----------------------------------
485     REFINEMENT = FACT(statut='f',
486 #   -----------------------------------
487 #       -----------------------------------
488         CUTTING_ELEMENTS_IN_FOUR = SIMP(statut ='o',
489 #       -----------------------------------
490             typ = bool,
491             defaut = False,
492             fr = """Decoupe chaque element du mayage en quatre elements homothetiques
493 en joignant les milieux des aretes.""",
494             ang = """Cuts every element of the mesh in four homothetic elements
495 by joigning the middle points of each side.""",
496         ),
497 #       -----------------------------------
498         MAX_SEGMENTS_PER_POINT = SIMP(statut ='f',
499 #       -----------------------------------
500             typ = 'I',
501             defaut = 11,
502             fr = """Nombre max de segments qui contiennent le meme point.
503 Cette valeur est Ã  incrémentée si le code le demande.""",
504             ang = """Max number of segments containing the same point.
505 This is to be increased if the code asks for it.""",
506         ),
507 #       -----------------------------------
508         NUMBER_OF_VERTICES_OF_THE_POLYGON_TO_REFINE_THE_MESH = SIMP(statut ='f',
509 #       -----------------------------------
510             typ = 'I',
511             defaut = 0,
512             fr = """Lorsque l''on souhaite raffiner une partie du maillage,
513 permet de definir le nombre de sommets du polygone a l''interieur
514 duquel le maillage sera effectivement raffine.\\
515 \begin{WarningBlock}{Attention:}
516 Ce polygone doit etre convexe et les coordonnees des
517 sommets donnes dans l''ordre trigonometrique.
518 \end{WarningBlock}""",
519             ang = """When you want to refine a piece of the mesh, this key-word fixes
520 the number of vertices of a polygon inside of which the mesh will be
521 finally refined.\\
522 \begin{WarningBlock}{ATTENTION:}
523 This polygon should have a convex shape and the coordinates
524 of the vertices be given with an anti clock wise order.
525 \end{WarningBlock}""",
526         ),
527 #       -----------------------------------
528         b_NUMBER_OF_VERTICES_OF_THE_POLYGON_TO_REFINE_THE_MESHG = BLOC(condition="NUMBER_OF_VERTICES_OF_THE_POLYGON_TO_REFINE_THE_MESH > 0",
529 #       -----------------------------------
530 #           -----------------------------------
531             ABSCISSAE_OF_THE_VERTICES_OF_THE_POLYGON_TO_REFINE_THE_MESH = SIMP(statut ='o',
532 #           -----------------------------------
533                 typ = 'R', min=0, max='**',
534                 defaut = [0,0,0,0,0,0,0,0,0],
535                 fr = """Lorsque l''on souhaite raffiner une partie du maillage,
536 permet de definir les abscisses des sommets du polygone a l''interieur
537 duquel le maillage sera effectivement raffine.\\
538 \begin{WarningBlock}{Attention :}
539 ce polygone doit etre convexe et les coordonnees des
540 sommets donnes dans l''ordre trigonometrique.
541 \end{WarningBlock}""",
542                 ang = """When you want to refine a piece of the mesh, this key-word fixes
543 the abscissae of the vertices of a polygon inside of which the mesh
544 will be finally refined.\\
545 \begin{WarningBlock}{Warning:}
546 This polygon should have a convex shape and the coordinates
547 of the vertices be given with an anti clock wise order.
548 \end{WarningBlock}""",
549             ),
550 #           -----------------------------------
551             ORDINATES_OF_THE_VERTICES_OF_THE_POLYGON_TO_REFINE_THE_MESH = SIMP(statut ='o',
552 #           -----------------------------------
553                 typ = 'R', min=0, max='**',
554                 defaut = [0,0,0,0,0,0,0,0,0],
555                 fr = """Lorsque l''on souhaite raffiner une partie du maillage,
556 permet de definir les ordonnees des sommets du polygone a l''interieur
557 duquel le maillage sera effectivement raffine.\\
558 \begin{WarningBlock}{Attention :}
559 ce polygone doit etre convexe et les coordonnees des
560 sommets donnes dans l''ordre trigonometrique.
561 \end{WarningBlock}""",
562                 ang = """When you want to refine a piece of the mesh, this key-word fixes
563 the ordinates of the vertices of a polygon inside of which the mesh
564 will be finally refined.\\
565 \begin{WarningBlock}{Warning:}
566 This polygon should have a convex shape and the coordinates
567 of the vertices be given with an anti clock wise order.
568 \end{WarningBlock}""",
569             ),
570         ),
571     ),
572 #   -----------------------------------
573     DRY_ELEMENTS = FACT(statut='f',
574 #   -----------------------------------
575 #       -----------------------------------
576         DRY_ELEMENTS_ELIMINATION = SIMP(statut ='o',
577 #       -----------------------------------
578             typ = bool,
579             defaut = False,
580             fr = """Lors du traitement d''un fichier de resultats issu de \telemac{2D},
581 permet d''activer l''elimination des elements secs.""",
582             ang = """When using a \telemac{2D} results file, this keyword activates the
583 dry elements elimination.""",
584         ),
585 #       -----------------------------------
586         PARTIALLY_DRY_ELEMENTS_ELIMINATION = SIMP(statut ='o',
587 #       -----------------------------------
588             typ = bool,
589             defaut = False,
590             fr = """Lors de l''elimination des elements secs, permet de specifier si
591 on traite les elements parteillement secs (au moins un noeud sec).""",
592             ang = """When removing dry elements, specify if the partially dry elements are
593 treated (at least one dry node).""",
594         ),
595 #       -----------------------------------
596         DRY_LIMIT = SIMP(statut ='o',
597 #       -----------------------------------
598             typ = 'R',
599             defaut = 0.1,
600             fr = """Fixe la valeur du seuil (en metre) de hauteur d''eau en dessous
601 duquel un noeud est considere comme sec.""",
602             ang = """Limit of water depth value (in meter) under which the node is
603 considered as dry node.""",
604         ),
605 #       -----------------------------------
606         STORAGE_OF_ALL_TIME_STEPS = SIMP(statut ='o',
607 #       -----------------------------------
608             typ = bool,
609             defaut = False,
610             fr = """Lors du traitement d''elimination des elements secs, permet de
611 specifier si on restocke tous les pas de temps dans le fichier
612 resultat""",
613             ang = """When treating dry elements elimination, specify that
614 all time steps are to be stored in the results file.""",
615         ),
616     ),
617 )
618 # -----------------------------------------------------------------------
619 CONVERTER_INFO = PROC(nom= "CONVERTER_INFO",op = None,
620 # -----------------------------------------------------------------------
621 #   -----------------------------------
622     DEBUG = SIMP(statut ='o',
623 #   -----------------------------------
624         typ = bool,
625         defaut = False,
626         fr = """Permet d activer le mode debuggage.""",
627         ang = """Activate the debug mode.""",
628     ),
629 #   -----------------------------------
630     CONVERTER = SIMP(statut ='o',
631 #   -----------------------------------
632         typ = bool,
633         defaut = False,
634         fr = """Permet d activer le module de conversion.""",
635         ang = """Activate the conversion module.""",
636     ),
637 #   -----------------------------------
638     INPUT = FACT(statut='o',
639 #   -----------------------------------
640 #       -----------------------------------
641         INPUT_FILE_FORMAT = SIMP(statut ='o',
642 #       -----------------------------------
643             typ = 'TXM',
644             into = ['SERAFIN','SERAFIND','MED','UNV','CGNS'],
645             defaut = 'SERAFIN',
646             fr = """Specifie le format du fichier d entree""",
647             ang = """Specify input file format""",
648         ),
649 #       -----------------------------------
650         INPUT_FILE = SIMP(statut ='o',
651 #       -----------------------------------
652             typ = ('Fichier','All Files (*)'),
653             defaut = '',
654             fr = """Nom du fichier a convertir.""",
655             ang = """Name of the file to convert.""",
656         ),
657 #       -----------------------------------
658         BOUNDARY_FILE = SIMP(statut ='f',
659 #       -----------------------------------
660             typ = ('Fichier','All Files (*)'),
661             defaut = '',
662             fr = """Nom du fichier des conditions limites""",
663             ang = """Name of the boundary condition file""",
664         ),
665 #       -----------------------------------
666         LOG_FILE = SIMP(statut ='f',
667 #       -----------------------------------
668             typ = ('Fichier','All Files (*)'),
669             defaut = '',
670             fr = """Nom du fichier complementaire pour le format UNV""",
671             ang = """Name of the complementary file for the UNV format""",
672         ),
673 #       -----------------------------------
674         BOUNDARY_CONDITION_IN_SERAFIN_FORMAT = SIMP(statut ='o',
675 #       -----------------------------------
676             typ = bool,
677             defaut = False,
678             fr = """Fichier de conditions limites dans le cas d''une conversion depuis
679 SERAFIN.""",
680             ang = """Boundary condition file when converting from SERAFIN.""",
681         ),
682     ),
683 #   -----------------------------------
684     OUTPUT = FACT(statut='o',
685 #   -----------------------------------
686 #       -----------------------------------
687         OUTPUT_FILE_FORMAT = SIMP(statut ='o',
688 #       -----------------------------------
689             typ = 'TXM',
690             into = ['SERAFIN','SERAFIND','MED','UNV','CGNS','VTK','CGNS'],
691             defaut = 'SERAFIN',
692             fr = """Specifie le format du fichier de sortie""",
693             ang = """Specify output file format""",
694         ),
695 #       -----------------------------------
696         OUTPUT_FILE = SIMP(statut ='o',
697 #       -----------------------------------
698             typ = ('Fichier','All Files (*)','Sauvegarde'),
699             defaut = '',
700             fr = """Nom du fichier converti""",
701             ang = """Name of the converted file""",
702         ),
703 #       -----------------------------------
704         OUTPUT_BOUNDARY_FILE = SIMP(statut ='f',
705 #       -----------------------------------
706             typ = ('Fichier','All Files (*)','Sauvegarde'),
707             defaut = '',
708             fr = """Nom du fichier des conditions limites pour le fichier converti""",
709             ang = """Name of the boundary file for the converted file""",
710         ),
711 #       -----------------------------------
712         OUTPUT_LOG_FILE = SIMP(statut ='f',
713 #       -----------------------------------
714             typ = ('Fichier','All Files (*)','Sauvegarde'),
715             defaut = '',
716             fr = """Nom du fichier complementaire pour le fichier converti""",
717             ang = """Name of the complementary file for the converted file""",
718         ),
719     ),
720 #   -----------------------------------
721     TRANSLATION_INFO = FACT(statut='o',
722 #   -----------------------------------
723 #       -----------------------------------
724         TRANSLATION = SIMP(statut ='o',
725 #       -----------------------------------
726             typ = bool,
727             defaut = False,
728             fr = """Permet d activer la translation de maillage.""",
729             ang = """Activate the translation of the mesh.""",
730         ),
731 #       -----------------------------------
732         b_TRANSLATIONG = BLOC(condition="TRANSLATION == True",
733 #       -----------------------------------
734 #           -----------------------------------
735             X_TRANSLATION = SIMP(statut ='o',
736 #           -----------------------------------
737                 typ = 'R',
738                 defaut = 0.,
739                 fr = """Translation selon x""",
740                 ang = """Translation on the x axes""",
741             ),
742 #           -----------------------------------
743             Y_TRANSLATION = SIMP(statut ='o',
744 #           -----------------------------------
745                 typ = 'R',
746                 defaut = 0.,
747                 fr = """Translation selon y""",
748                 ang = """Translation on the y axes""",
749             ),
750         ),
751     ),
752 )
753 # -----------------------------------------------------------------------
754 SETTINGS = PROC(nom= "SETTINGS",op = None,
755 # -----------------------------------------------------------------------
756 #   -----------------------------------
757     PARALLEL_PROCESSORS = SIMP(statut ='o',
758 #   -----------------------------------
759         typ = 'I',
760         defaut = 0,
761         fr = """Nombre de processeurs en calcul parallele
762 \begin{itemize}
763 \item 0 : 1 machine, compilation sans bibliotheque de parallelisme
764 \item 1 : 1 machine, compilation avec bibliotheque de parallelisme
765 \item 2 : 2 processeurs ou machines en parallele
766 \item etc\ldots
767 \end{itemize}""",
768         ang = """Number of processors for parallel processing
769 \begin{itemize}
770 \item 0 : 1 machine, compiling without parallel library
771 \item 1 : 1 machine, compiling with a parallel library
772 \item 2 : 2 processors or machines in parallel
773 \item etc\ldots
774 \end{itemize}""",
775     ),
776 #   -----------------------------------
777     FORTRAN_FILE = SIMP(statut ='f',
778 #   -----------------------------------
779         typ = 'FichierOuRepertoire',
780         defaut = '',
781         fr = """Nom du fichier Fortran a soumettre.
782 Il ne sert a priori qu''a dimensionner les tableaux utilises par
783 \stbtel, mais peut contenir des sous-programmes modifies ou propres a
784 l''utilisateur.""",
785         ang = """Name of Fortran file to be entered.
786 It is a priori only designed for dimensioning the arrays that are
787 used by \stbtel, but it may contain either modified or user-written
788 subroutines.""",
789     ),
790 #   -----------------------------------
791     VECTOR_LENGTH = SIMP(statut ='o',
792 #   -----------------------------------
793         typ = 'I',
794         defaut = 1,
795         fr = """Permet de fixer, sur machine vectorielle, la longueur du vecteur.""",
796         ang = """Designed for dimensioning the vector length on vector machine.""",
797     ),
798 )
799 # -----------------------------------------------------------------------
800 INTERNAL = PROC(nom= "INTERNAL",op = None,
801 # -----------------------------------------------------------------------
802     UIinfo = {"groupes": ("CACHE")},
803 #   -----------------------------------
804     STEERING_FILE = SIMP(statut ='o',
805 #   -----------------------------------
806         typ = ('Fichier','All Files (*)'),
807         defaut = '',
808         fr = """Nom du fichier contenant les references des fichiers et les options
809 du calcul a realiser.""",
810         ang = """Name of the file that contains the file references and of options for
811 the computation to be made.""",
812     ),
813 #   -----------------------------------
814     DICTIONARY = SIMP(statut ='o',
815 #   -----------------------------------
816         typ = ('Fichier','All Files (*)'),
817         defaut = 'stbtel.dico',
818         fr = """Dictionnaire des mots cles.""",
819         ang = """Key word dictionary.""",
820     ),
821 )
822 TEXTE_NEW_JDC = "\
823 "
824 Ordre_Des_Commandes = (
825 'TREATMENT',
826 'CONVERTER_INFO',
827 'SETTINGS',
828 'INTERNAL')
829 try:
830     import TelApy
831     source = "eficas"
832 except Exception as excpt:
833     source = "Telemac"
834 enum = source+'.stbtel_enum_auto'
835 dicoCasEn = source+'.stbtel_dicoCasEnToCata'
836 dicoCasFr = source+'.stbtel_dicoCasFrToCata'