]> SALOME platform Git repositories - tools/eficas.git/blob - Telemac/Telemac_Cata.py
Salome HOME
LCN - 150310 - Correction mineure
[tools/eficas.git] / Telemac / Telemac_Cata.py
1 # coding: utf-8
2 # PNPNPNPN
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 import types
21 class Tuple:
22   def __init__(self,ntuple):
23     self.ntuple=ntuple
24
25   def __convert__(self,valeur):
26     if type(valeur) == types.StringType:
27       return None
28     if len(valeur) != self.ntuple:
29       return None
30     return valeur
31
32   def info(self):
33     return "Tuple de %s elements" % self.ntuple
34
35
36
37 JdC = JDC_CATA (code = 'MAP',
38                 execmodul = None,
39                 )
40 # ======================================================================
41 # Catalog entry for the MAP function : c_pre_interfaceBody_mesh
42 # ======================================================================
43 INITIALIZATION=PROC(nom="INITIALIZATION",op=None,
44      fr="Initialisation des fichiers d'entrée et de sortie",
45      ang="Input and Output files initialization",
46
47      Title = SIMP( statut='o',typ='TXM',
48             fr='Titre du cas etudie. Ce titre figurera sur les dessins.',
49             ang='Title of the case being considered. This title shall be marked on the drawings.'
50                  ),
51      #Working_Directory = SIMP( statut='o',typ='Repertoire',defaut='/tmp'),
52
53      Input_Files= FACT(statut='o',
54           Dictionary = SIMP( statut='o', typ = ('Fichier', 'Dico (*.dico);;All Files (*)',), 
55                             defaut='telemac2d.dico', 
56                             fr='Dictionnaire des mots cles.', ang='Key word dictionary.',),
57
58           Geometry_File_Format = SIMP( statut='o',typ='TXM',into=['SERAFIN','MED','SERAFIND'], defaut='SERAFIN',
59                                  fr='Format du fichier de geometrie. Les valeurs possibles sont : \n \
60      - SERAFIN : format standard simple precision pour Telemac;   \n \
61      - SERAFIND: format standard double precision pour Telemac;   \n \
62      - MED     : format MED base sur HDF5',
63                                 ang='Results file format. Possible values are: \n\
64      - SERAFIN : classical single precision format in Telemac;\n\
65      - SERAFIND: classical double precision format in Telemac;\n\
66      - MED     : MED format based on HDF5',) ,
67
68           Geometry_File  = SIMP( statut='o', typ = ('Fichier', 'Geo Files (*.geo);;All Files (*)',),
69                            fr='Nom du fichier contenant le maillage du calcul a realiser.',
70                            ang='Name of the file containing the mesh. \n\
71        This file may also contain the topography and the friction coefficients.'),
72
73           #Steering_File     = SIMP( statut='o', typ = ('Fichier', 'Steering Files (*.cas);;All Files (*)',),),
74
75           Bottom_Topography_File  = SIMP( statut='f', typ = ('Fichier', 'Geo Files (*.geo);;All Files (*)',),
76                             fr = "Nom du fichier eventuel contenant la bathymetrie associee au maillage. \
77 Si ce mot-cle est utilise; c'est cette bathymetrie qui sera utilisee pour le calcul.",
78                             ang = 'Name of the possible file containing the bathymetric data.\
79 Where this keyword is used, these bathymetric data shall be used in the computation.',
80          ),
81
82           Fortran_File = SIMP(statut='f',typ = ('Fichier', 'Fortran files (*.f);;All Files (*)'),
83                               fr='Nom du fichier a soumettre',
84                               ang='Name of FORTRAN file to be submitted',),
85
86           Boundary_Condition_File = SIMP( statut='o', typ = ('Fichier', 'Boundary Condition (*.cli);;All Files (*)',),fr='Nom du fichier contenant les types de conditions aux limites. Ce fichier est rempli de facon automatique par le mailleur au moyen de couleurs affectees aux noeuds des frontieres du domaine de calcul.',ang='Name of the file containing the types of boundary conditions. This file is filled automatically by the mesh generator through through colours that are assigned to the boundary nodes.',),
87
88
89      Validation=FACT( statut='f',
90
91           Reference_File_Format = SIMP( statut='o',typ='TXM',into=['SERAFIN','MED','SERAFIND'], defaut='SERAFIN',
92                                 fr = 'Format du fichier de resultats. Les valeurs possibles sont : \n\
93      - SERAFIN : format standard simple precision pour Telemac;  \n\
94      - SERAFIND: format standard double precision pour Telemac; \n\
95      - MED     : format MED base sur HDF5' ,
96                                ang = 'Results file format. Possible values are:\n \
97      - SERAFIN : classical single precision format in Telemac;\n\
98      - SERAFIND: classical double precision format in Telemac; \n\
99      - MED     : MED format based on HDF5' ,),
100
101              Reference_File     = SIMP( statut='o', typ = ('Fichier', 'Reference File (*.ref);;All Files (*)',), 
102           fr= 'Fichier de resultats de reference pour la validation. Les resultats a placer dans ce fichier seront a ecrire sur le canal 22.',
103           ang= 'Binary-coded result file for validation. The results to be entered into this file shall be written on channel 22.',),
104      ), # Fin de Validation
105
106
107      Formatted_And_Binary_Files=FACT( statut='f',
108
109           Formatted_File1    = SIMP( statut='f', typ = ('Fichier', 'formated File (*.txt);;All Files (*)',),
110               fr = "Fichier de donnees formate mis a la disposition de l''utilisateur.  \n\
111 Les donnees de ce fichier seront a lire sur le canal 26.",
112               ang = 'Formatted data file made available to the user.\n\
113 The data in this file shall be read on channel 26.',
114           ),
115           Formatted_File2    = SIMP( statut='f', typ = ('Fichier', 'formated File (*.txt);;All Files (*)',),
116             fr = "Fichier de donnees formate mis a la disposition de l'utilisateur. \n\
117 Les donnees de ce fichier seront a lire sur le canal 27.",
118            ang = "Formatted data file made available to the user.\n\
119 The data in this file shall be read on channel 27.",
120           ),
121           Binary_Data_File1  = SIMP( statut='f', typ = ('Fichier', 'Reference File (*.txt);;All Files (*)',),
122                   fr = 'Fichier de donnees code en binaire mis a la disposition de l utilisateur. \n\
123 Les donnees de ce fichier seront a lire sur le canal 24.',
124                   ang = 'Binary-coded data file made available to the user.\n\
125 The data in this file shall be read on channel 24.',
126           ),
127           Binary_Data_File2  = SIMP( statut='f', typ = ('Fichier', 'Reference File (*.txt);;All Files (*)',),
128                   fr = 'Fichier de donnees code en binaire mis a la disposition de l utilisateur.\n\
129 Les donnees de ce fichier seront a lire sur le canal 25.',
130                    ang = 'Binary-coded data file made available to the user. \n\
131 The data in this file shall be read on channel 25.',
132           ),
133      ), # fin Formatted_And_Binary_Files
134
135 ), # Fin de InputFile 
136
137
138      Computation_Continued=FACT( statut='f',
139
140           Previous_Computation_File_Format=SIMP( statut='o',typ='TXM',
141                 into=['SERAFIN','MED','SERAFIND'],
142                 defaut='SERAFIN',
143                 fr='Format du fichier de resultats du calcul precedent. Les valeurs possibles sont : \n\
144          - SERAFIN : format standard simple precision pour Telemac;  \n\
145          - SERAFIND: format standard double precision pour Telemac; \n\
146          - MED     : format MED base sur HDF5',
147                 ang='Previous computation results file format. Possible values are: \n\
148          - SERAFIN : classical single precision format in Telemac;  \n\
149          - SERAFIND: classical double precision format in Telemac; \n\
150          - MED     : MED format based on HDF5',
151                   ),
152
153           Previous_Computation_File  = SIMP( statut='o', 
154               typ = ('Fichier', 'Computation File (*.res);;All Files (*)',),
155               fr = "Nom d'un fichier contenant les resultats d'un calcul precedent realise sur le meme maillage \n\
156  et dont le dernier pas de temps enregistre va fournir les conditions initiales pour une suite de de calcul.",
157                ang = 'Name of a file containing the results of an earlier computation which was made on the same mesh.\n\
158  The last recorded time step will provid the initial conditions for the new computation.',
159                     ),
160           Previous_Computation_Comm  = SIMP( statut='f', typ = ('Fichier', 'COMM(*.comm);;All Files (*)',),
161               fr  = "Nom du fichier .comm décrivant le cas précédent",
162               ang = "Name of a file containing the earlier study" ,),
163           Initial_Time_Set     = SIMP(typ=bool, statut='f',
164              fr = 'Remet le temps a zero en cas de suite de calcul',
165              ang = 'Initial time set to zero in case of restart',
166              defaut="False"),
167           Record_Number_For_Restart = SIMP(typ='I', statut='o', defaut=0,
168               fr = "numero de l'enregistrement de depart dans le fichier du calcul precedent. 0 signifie qu'on prend le dernier enregistrement", 
169               ang ="record number to start from in the previous computation file, 0 for last record" ),
170      ),
171
172      Computation=FACT(statut='o',
173         Machine=FACT( statut='o',
174 # A voir plus tar Obsolete ? 
175            Number_of_Processors=SIMP(statut='o',typ='I',val_min=0,defaut=1),
176            #Parallel_Computation=SIMP(statut='o',typ=bool,defaut=False),
177          ),
178         Coupling=FACT( statut='o',
179            Sisyphe=SIMP(statut='o',typ=bool,defaut=False),
180            Tomawac=SIMP(statut='o',typ=bool,defaut=False),
181           Delwacq=SIMP(statut='o',typ=bool,defaut=False),
182         fr='Liste des codes avec lesquels on couple Telemac-2D\n\
183      SISYPHE : couplage interne avec Sisyphe\n\
184      TOMAWAC : couplage interne avec Tomawac\n\
185      DELWAQ : sortie de fichiers de resultats pour Delwaq',
186         ang='List of codes to be coupled with Telemac-2D\n\
187      SISYPHE : internal coupling with Sisyphe\n\
188      TOMAWAC : internal coupling with Tomawac\n\
189      DELWAQ: will yield results file for Delwaq',
190         ),
191      ),
192 )
193
194 TIDE_PARAMETERS=PROC(nom="TIDE_PARAMETERS",op=None,
195      fr="",
196      ang="",
197      Time=FACT( statut='o',
198        #Original_Date_of_Time=SIMP(statut='f',typ=DateJJMMAAAA,validators=VerifTypeTuple(('R','R','R'))),
199        #Original_Hour_of_Time=SIMP(statut='f',typ=HeureHHMMSS,validators=VerifTypeTuple(('R','R','R'))),
200        Original_Date_of_Time=FACT( statut='o',
201          fr = "Permet de fixer la date d'origine des temps du modele lors de la prise en compte de la force generatrice de la maree.",
202          ang ='Give the date of the time origin of the model when taking into account the tide generating force.', 
203          Year=SIMP(statut='o',typ='I',val_min=1900,defaut=1900),
204          Month=SIMP(statut='o',typ='I',val_min=1,val_max=12,defaut=1),
205          Day=SIMP(statut='o',typ='I',val_min=1,val_max=31,defaut=1),
206           ),
207        Original_Hour_of_Time=FACT( statut='f',
208          fr = "Permet de fixer l'heure d'origine des temps du modele lors de la prise en compte de la force generatrice de la maree.",
209          ang ='Give the time of the time origin of the model when taking into account the tide generating force.', 
210          Hour=SIMP(statut='o',typ='I',val_min=0,val_max=24,defaut=0),
211          Minute=SIMP(statut='o',typ='I',val_min=0,val_max=60,defaut=0),
212          Second=SIMP(statut='o',typ='I',val_min=0,val_max=60,defaut=0),
213          ),
214       ),
215      Location=FACT( statut='f',
216         #regles=( PRESENT_PRESENT('Longitude_of_origin','Latitute_of_origin', ),),
217         #Spatial_Projection=SIMP(statut='f',typ='I',into=[1,2,3]),
218         #Geographic_System=SIMP(statut='f',typ='I',into=[-1,0,1,2,3,4,5]),
219
220         Geographic_System=SIMP(statut='f',typ='TXM',
221               into=["DEFINI PAR L'UTILISATEUR", "WGS84 LONGITUDE/LATITUDE EN DEGRES REELS","WGS84 NORD UTM",'WGS84 SUD UTM','LAMBERT', 'MERCATOR'],
222               defaut="DEFINI PAR L'UTILISATEUR",
223               fr = 'Systeme de coordonnees geographiques dans lequel est construit le modele numerique.',
224               ang = 'Geographic coordinates system in which the numerical model is built.Indicate the corresponding zone with the keyword ',
225         ),
226              b_geo_system  = BLOC(condition = "Geographic_System in ('WGS84 LONGITUDE/LATITUDE EN DEGRES REELS','WGS84 NORD UTM','WGS84 SUD UTM','MERCATOR')",
227              Spatial_Projection=SIMP(statut='o',typ='TXM',into=["CARTESIAN, NOT GEOREFERENCED","MERCATOR","LATITUDE LONGITUDE"]),
228              ang = 'Option 2 or 3 mandatory for spherical coordinates Option 3: latitude and longitude in radians!',
229              b_lat     = BLOC(condition = "Spatial_Projection == 'LATITUDE LONGITUDE' ",
230                  Latitude_of_origin=SIMP(statut='o',typ='R',val_min=-90,val_max=90,fr="en radians", ang="in radians"),
231                  Longitude_of_origin=SIMP(statut='o',typ='R',fr="en radians", ang="in radians"),
232                          ), # fin bloc b_lat
233              ), # fin bloc b_geo
234
235         Zone_number_in_Geographic_System=SIMP(statut='f',typ='TXM',
236             #into=[-1,0,1,2,3,4,22,30],
237             into=[ 'LAMBERT 1 NORD', 'LAMBERT 2 CENTRE', 'LAMBERT 3 SUD', 'LAMBERT 4 CORSE', 'LAMBERT 2 ETENDU', 'ZONE UTM, PAR EXEMPLE'],
238             fr="Numero de zone (fuseau ou type de projection) lors de l'utilisation d'une projection plane.\n Indiquer le systeme geographique dans lequel est construit le modele numerique avec le mot-cle SYSTEME GEOGRAPHIQUE",
239             ang='Number of zone when using a plane projection. \nIndicate the geographic system in which the numerical model is built with the keyword GEOGRAPHIC SYSTEM'),
240              ),
241 ) # Fin TIDE_PARAMETERS
242
243 INITIAL_STATE=PROC(nom="INITIAL_STATE",op=None,
244
245        Initial_Conditions=SIMP(statut='o',typ='TXM',
246           into=['ZERO ELEVATION','CONSTANT ELEVATION','ZERO DEPTH','CONSTANT DEPTH','SPECIAL','TPXO SATELLITE ALTIMETRY'],
247           defaut='ZERO ELEVATION',
248           fr = "Permet de definir les conditions initiales sur les hauteurs d'eau. Les valeurs possibles sont :\n\
249        - COTE NULLE. Initialise la cote de surface libre a 0. \nLes hauteurs d'eau initiales sont alors retrouvees en faisant la difference entre les cotes de surface libre et du fond. \n\
250       - COTE CONSTANTE . Initialise la cote de surface libre a la valeur donnee par le mot-cle COTE INITIALE. Les hauteurs d'eau initiales sont calculees comme precedemment.\n\
251       - HAUTEUR NULLE .Initialise les hauteurs d'eau a 0. \n\
252       - HAUTEUR CONSTANTE. Initialise les hauteurs d'eau a la valeur donnee par le mot-cle HAUTEUR INITIALE. \n\
253       - PARTICULIERES. Les conditions initiales sur la hauteur d'eau doivent etre precisees dans le sous-programme CONDIN. \n\
254       - ALTIMETRIE SATELLITE TPXO. Les conditions initiales sur la hauteur  d'eau et les vitesses sont etablies sur \n\
255         la base des donnees satellite TPXO dont les 8 premiers constistuents ont ete extraits et sauves dans le fichier\n\
256          BASE DE DONNEES DE MAREE." ,
257         ang = 'Makes it possible to define the initial conditions with the water depth. The possible values are : \n\
258        - ZERO ELEVATION. Initializes the free surface elevation to 0. \n The initial water depths are then found by computing the difference between the free surface and the bottom.  \n\
259        - CONSTANT ELEVATION. Initializes the water elevation to the value given by the keyword \n\
260        - INITIAL ELEVATION. The initial water depths are computed as in the previous case. \n\
261        - ZERO DEPTH. Initializes the water depths to 0. \n\
262        - CONSTANT DEPTH. Initializes the water depths to the value givenby the key-word  INITIAL DEPTH. \n\
263        - SPECIAL. The initial conditions with the water depth should be stated in the CONDIN subroutine. \n\
264        - TPXO SATELITE ALTIMETRY. The initial conditions on the free surface and velocities are established from the TPXO satellite program data,\n the harmonic constituents of which are stored in the TIDE DATA BASE file.', ),
265  
266          b_initial_elevation = BLOC (condition = "Initial_Conditions == 'CONSTANT ELEVATION'",
267            Initial_Elevation  = SIMP(statut='o',typ='R',
268               fr='Valeur utilisee avec l''option :  CONDITIONS INITIALES - COTE CONSTANTE',
269               ang='Value to be used with the option : INITIAL CONDITIONS  -CONSTANT ELEVATION' 
270               ),
271          ) , # fin b_initial_elevation
272
273          b_initial_depth = BLOC (condition = "Initial_Conditions == 'CONSTANT DEPTH'",
274            Initial_Depth = SIMP(statut='o',typ='R',
275                 fr='Valeur utilisee avec l''option : CONDITIONS INITIALES :-HAUTEUR CONSTANTE-',
276                 ang='Value to be used along with the option: INITIAL CONDITIONS -CONSTANT DEPTH-' ),
277          ),# fin b_initial_depth
278  
279          b_special= BLOC (condition = "Initial_Conditions == 'SPECIAL'",
280            # Ce mot clef est juste informatif
281            special    = SIMP(statut='o',typ='TXM',
282            defaut="The initial conditions with the water depth should be stated in the CONDIN subroutine"),
283          ), # fin b_special
284
285
286          b_initial_TPXO = BLOC (condition = "Initial_Conditions == 'TPXO SATELLITE ALTIMETRY'",
287            Base_Ascii_De_Donnees_De_Maree = SIMP( statut='o', typ = ('Fichier', 'All Files (*)',), ),
288            fr  = 'Base de donnees de constantes harmoniques tirees du fichier du modele de maree',
289            ang = 'Tide data base of harmonic constituents extracted from the tidal model file',
290          ), # fin b_initial_TPXO
291
292     Boundary_Conditions=FACT(statut='f', 
293             fr  = 'On donne un ensemble de conditions par frontiere liquide',
294             ang = 'One condition set per liquid boundary is given',
295  # Dans l ideal il faut aller regarder selon les groupes dans le fichier med
296  # en sortie il faut aller chercher le .cli qui va bien 
297             #Liquid_Boundaries=FACT(statut='f',max='**',
298             #    Options=SIMP(statut='f',typ='I',into=['classical boundary conditions','Thompson method based on characteristics'])
299             #    Prescribed_Flowrates=SIMP(statut='f',typ='R'),
300             #    Prescribed_Elevations=SIMP(statut='f',typ='R'),
301             #    Prescribed_Velocity=SIMP(statut='f',typ='R'),
302       # ),
303
304 # Il va falloir une "traduction dans le langage du dico"
305 # Il faut seulement l un des 3
306
307         Liquid_Boundaries=FACT(statut='f',max='**',
308                 
309             Options=SIMP(statut='f',typ='I',
310             into=['classical boundary conditions','Thompson method based on characteristics'],
311             fr='On donne 1 entier par frontiere liquide',
312             ang='One integer per liquid boundary is given',
313             ),
314
315         Type_Condition=SIMP(statut='o',typ='TXM',into=['Flowrates','Elevations','Velocity'],),
316 #?????
317
318          b_Flowrates     = BLOC (condition = "Type_Condition == 'Flowrates'",
319              Prescribed_Flowrates=SIMP(statut='o',typ='R',
320              fr=' Valeurs des debits imposes aux frontieres liquides entrantes.\n Lire la partie du mode d''emploi consacree aux conditions aux limites',
321             ang='Values of prescribed flowrates at the inflow boundaries.\n The section about boundary conditions is to be read in the manual'),
322              ),
323
324          b_Elevations   = BLOC (condition = "Type_Condition == 'Elevations'",
325                 Prescribed_Elevations=SIMP(statut='o',typ='R',
326                 fr='Valeurs des cotes imposees aux frontieres liquides entrantes.\n Lire la partie du mode d''emploi consacree aux conditions aux limites',
327                 ang='Values of prescribed elevations at the inflow boundaries.\n The section about boundary conditions is to be read in the manual'),
328              ),
329
330          b_Velocity   = BLOC (condition = "Type_Condition == 'Velocity'",
331                Prescribed_Velocity=SIMP(statut='o',typ='R',
332                fr='Valeurs des vitesses imposees aux frontieres liquides entrantes.\n Lire la partie du mode d''emploi consacree aux conditions aux limites',
333                ang='Values of prescribed velocities at the liquid inflow boundaries.\n Refer to the section dealing with the boundary conditions'),
334          ),
335
336        ), # fin des Liquid_Boundaries
337
338        Stage_Discharge_Curves = SIMP(statut='f',typ='I',
339         #into=[0,1,2],
340         into=["no","Z(Q)","not programmed"],
341         fr='Indique si une courbe de tarage doit etre utilisee pour une frontiere',
342         ang='Says if a discharge-elevation curve must be used for a given boundary',
343         ),
344         b_discharge_curve   = BLOC (condition = "Stage_Discharge_Curves == 'Z(Q)'",
345         Stage_Discharge_Curves_File   = SIMP( statut='f', typ = ('Fichier', 'All Files (*)',),
346           fr='Nom du fichier contenant les courbes de tarage',
347           ang='Name of the file containing stage-discharge curves',
348           ),
349         ),
350
351        Treatment_Of_Fluxes_At_The_Boundaries   = SIMP( statut='f',typ='TXM',
352          into=["Priority to prescribed values","Priority to fluxes"],
353          fr='Utilise pour les schemas SUPG, PSI et N, \n\
354 si Priorité aux flux, on ne retrouve pas exactement les valeurs imposees des traceurs,mais le flux est correct',
355          ang='Used so far only with the SUPG, PSI and N schemes.\n\
356 if Priority to fluxes, Dirichlet prescribed values are not obeyed,but the fluxes are correct'
357         ),
358
359 #???? into no coherent avec dico
360 # Ira dans la marée
361        Option_For_Tidal_Boundary_Conditions   = SIMP( statut='f',typ='I',
362        #into=[1,2],sug=1),
363        into=['No tide', 'Real tide (recommended methodology)', 'Astronomical tide', 'Mean spring tide', 'Mean tide',\
364            'Mean neap tide', 'Astronomical neap tide', 'Real tide (methodology before 2010)'],
365        ),
366
367
368   ), # fin Boundary_Conditions
369
370 ) # fin INITIAL_STATE
371
372 NUMERICAL_PARAMETERS=PROC(nom="NUMERICAL_PARAMETERS",op=None,
373
374         Solver=FACT(statut='o',
375
376           Equations=SIMP(statut='o',typ='TXM',
377              into=['SAINT-VENANT EF','SAINT-VENANT VF','BOUSSINESQ'],
378              defaut='SAINT-VENANT EF',
379              fr='Choix des equations a resoudre',
380              ang= 'Choice of equations to solve',
381              ),
382
383           Solver=SIMP(statut='o',typ='TXM',
384            into = ["conjugate gradient", "conjugate residual", "minimum error", "cgstab", "gmres", "direct",],
385            fr = 'Permet de choisir le solveur utilise pour la resolution de l''etape de propagation. \n\
386 Toutes les methodes proposees actuellement s''apparentent au Gradient Conjugue. Ce sont :\n\
387   1 : gradient conjugue 2 : residu conjugue       3 : gradient conjugue sur equation normale \n\
388   4 : erreur minimale   5 : gradient conjugue carre (non programme) 6 : gradient conjugue carre stabilise (cgstab)\n\
389   7 : gmres (voir aussi option du solveur) 8 : direct',
390 ang = 'Makes it possible to select the solver used for solving the propagation step.\n\
391 All the currently available methods are variations of the Conjugate Gradient method. They are as follows: \n\
392 1: conjugate gradient 2: conjugate residual 3: conjugate gradient on a normal equation\n\
393 4: minimum error 5: conjugate gradient squared (not implemented) 6: conjugate gradient squared stabilised (cgstab) \n\
394 7: gmres (see option for solver) 8: direct',
395             ),
396
397           b_gmres = BLOC (condition = "Solver == 'gmres'",
398           Solver_Option = SIMP(statut='o',typ='I', defaut=2, val_min=2,val_max=15,
399               fr = 'la dimension de l''espace de KRILOV',
400               ang = 'dimension of the KRYLOV space',
401                ),
402           ),
403
404           Solver_Accuracy = SIMP(statut='o',typ='R', defaut=1e-4,
405             fr = 'Precision demandee pour la resolution de l''etape de propagation (cf.  Note de principe).',
406             ang = 'Required accuracy for solving the propagation step (refer to Principle note).',
407            ),
408
409           Maximum_Number_of_Iterations_For_Solver=SIMP(statut='o',typ='I', defaut=40,
410           fr = 'Les algorithmes utilises pour la resolution de l''etape de propagation etant iteratifs, \n\
411 il est necessaire de limiter le nombre d''iterations autorisees.\n\
412 Remarque : un maximum de 40 iterations par pas de temps semble raisonnable.',
413           ang = 'Since the algorithms used for solving the propagation step are iterative, \
414 the allowed number of iterations should be limited.\n\
415 Note: a maximum number of 40 iterations per time step seems to be reasonable.',
416            ),
417         ), # fin Solver
418
419         Time=FACT(statut='f',
420         regles=(UN_PARMI('Number_of_Time_Steps','Duration'),),
421
422            Time_Step=SIMP(statut='f',typ='R'),
423            Number_of_Time_Steps=SIMP(statut='f',typ='I',
424               fr='Definit le nombre de pas de temps effectues lors de l''execution du code.',
425               ang='Specifies the number of time steps performed when running the code.'),
426            Duration=SIMP(statut='f',typ='R'),
427            Variable_Time_Step=SIMP(statut='f',typ=bool),
428            b_var_time  = BLOC(condition = "Variable_Time_Step==True" ,
429              Desired_Courant_Number=SIMP(statut='o',typ='R'),
430            ),
431
432            Stop_If_A_Steady_State_Is_Reached=SIMP(statut='f',typ=bool,defaut='False'),
433            b_stop  = BLOC(condition = "Stop_If_A_Steady_State_Is_Reached==True" ,
434
435            Stop_Criteria=SIMP(statut='o',typ=Tuple(3),validators=VerifTypeTuple(('R','R','R')),
436             fr = "Criteres d'arret pour un ecoulement permanent. ces coefficients sont respectivement appliques a\n\
437         1- U et V 2- H 3- T ",
438             ang = 'Stop criteria for a steady state These coefficients are applied respectively to\n\
439         1- U and V 2- H 3-  T ',),
440                     ),
441
442            Control_Of_Limit=SIMP(statut='f',typ=bool,defaut='False',
443 fr = 'Le programme s''arrete si les limites sur u,v,h ou t sont depassees',
444 ang = 'The program is stopped if the limits on u,v,h, or t are trespassed',
445            ),
446
447            b_limit  = BLOC(condition = "Control_Of_Limit==True" ,
448
449               Limit_Values=FACT(statut='o',
450                   fr = 'valeurs mini et maxi acceptables  min puis  max',
451                   ang= 'min and max acceptable values ',
452                   Limit_Values_H=SIMP(statut='o',typ=Tuple(2),validators=VerifTypeTuple(('R','R')),defaut=(-1000,9000)),
453                   Limit_Values_U=SIMP(statut='o',typ=Tuple(2),validators=VerifTypeTuple(('R','R')),defaut=(-1000,1000)),
454                   Limit_Values_V=SIMP(statut='o',typ=Tuple(2),validators=VerifTypeTuple(('R','R')),defaut=(-1000,1000)),
455                   Limit_Values_T=SIMP(statut='o',typ=Tuple(2),validators=VerifTypeTuple(('R','R')),defaut=(-1000,1000)),
456                                ),
457                   ),
458     ), # Fin de Time
459
460      Linearity=FACT(statut='f',
461            Treatment_of_Fluxes_at_the_Boundaries =SIMP( statut='f',typ='I',into=[1,2],sug=1),
462            Continuity_Correction  =SIMP(typ=bool, statut='f'),
463            Number_of_Sub_Iterations=SIMP(statut='f',typ='I'),
464      ),
465      Precondionning=FACT(statut='f',
466
467           Preconditionning=SIMP(statut='f',typ='I',
468               into=[ "diagonal", "no preconditioning", "diagonal condensee", "crout", \
469                      "gauss-seidel", "diagonal and crout", "diagonal condensed and crout"],
470           ),
471           C_U_Preconditionning  =SIMP(typ=bool, statut='f',
472              fr = 'Changement de variable de H en C dans le systeme lineaire final',
473             ang = 'Change of variable from H to C in the final linear system'
474            ),
475         ),# fin Preconditionnement
476      
477      
478      Matrix_Informations=FACT(statut='f',
479           Matrix_Vector_Product =SIMP(statut='f',typ='TXM',
480              into=["classic", "frontal"],
481              fr='attention, si frontal, il faut une numerotation speciale des points',
482              ang='beware, with option 2, a special numbering of points is required',
483           ),
484           Matrix_Storage =SIMP(statut='f',typ='TXM',
485              into=["EBE classique","Stockage par segments",]
486           ),
487      ),# fin Matrix_Informations
488
489      Advection=FACT(statut='f',
490
491           Mass_Lumping_on_H =SIMP(statut='f',typ='R',defaut=0,
492             fr = 'TELEMAC offre la possibilite d''effectuer du mass-lumping sur H ou U.\n\
493 Ceci revient a ramener tout ou partie (suivant la valeur de ce coefficient) des matrices AM1 (h) ou AM2 (U) \n\
494 et AM3 (V) sur leur diagonale.  Cette technique permet d''accelerer le code dans des proportions tres\n\
495 importantes et de le rendre egalement beaucoup plus stable. Cependant les solutions obtenues se trouvent lissees.\n\
496 Ce parametre fixe le taux de mass-lumping effectue sur h.',
497             ang = 'TELEMAC provides an opportunity to carry out mass-lumping either on C,H or on the velocity. \n\
498 This is equivalent to bringing the matrices AM1(h) or AM2(U) and AM3(V) wholly or partly, back onto their diagonal.\n\
499 Thanks to that technique, the code can be speeded up to a quite significant extent and it can also be made much \n\
500 more stable. The resulting solutions, however, become artificially smoothed. \n\
501 This parameter sets the extent of mass-lumping that is performed on h.'),
502
503           Mass_Lumping_on_Velocity =SIMP(statut='f',typ='R',defaut=0,
504             fr = 'Fixe le taux de mass-lumping effectue sur la vitesse.',
505             ang = 'Sets the amount of mass-lumping that is performed on the velocity.'
506 ),
507
508
509 #PNPNPNPN
510 #
511 # Attention a recalculer
512 # Il faut recalculer des listes de 4 en sortie
513 #
514         Advection_Propagation=FACT(statut='f',
515           Advection_Of_U_and_V=SIMP(statut='o',typ=bool,defaut=False,
516             fr = 'Prise en compte ou non de la convection de U et V.',
517             ang= 'The advection of U and V is taken into account or ignored.'
518             ),
519
520           b_u_v = BLOC( condition = "Advection_Of_U_and_V==True",
521
522           Type_of_Advection_U_and_V=SIMP(statut='o',typ='TXM',
523           into=["CARACTERISTIQUES", "SUPG", "SCHEMA VOLUME FINI EXPLICIT", "SCHEMA DISTRIBUTIF N CONSERVATIF",\
524                 "SCHEMA PSI CONSERVATIF", "SCHEMA PSI NON CONSERVATIF", "SCHEMA N IMPLICITE NON CONSERVATIF",\
525                  "SCHEMA N PAR SEGMENTS SCHEMA 3", "SCHEMA N PAR SEGMENTS SCHEMA 4"],
526                  ),
527            b_upwind     =BLOC(condition = "Type_of_Advection_U_and_V== 'SUPG'",
528             Upwind_Coefficients_of_U_and_V=SIMP(statut='o',typ='R',)
529                ),
530            ),
531
532           Advection_Of_H=SIMP(statut='o',typ=bool,defaut=False,
533             fr = 'Prise en compte ou non de la convection de H.',
534             ang= 'The advection of H is taken into account or ignored.'
535             ),
536
537           b_h = BLOC( condition = "Advection_Of_H==True",
538
539           Type_of_Advection_H=SIMP(statut='o',typ='TXM',
540           into=["CARACTERISTIQUES", "SUPG", "SCHEMA VOLUME FINI EXPLICIT", "SCHEMA DISTRIBUTIF N CONSERVATIF",\
541                 "SCHEMA PSI CONSERVATIF", "SCHEMA PSI NON CONSERVATIF", "SCHEMA N IMPLICITE NON CONSERVATIF",\
542                  "SCHEMA N PAR SEGMENTS SCHEMA 3", "SCHEMA N PAR SEGMENTS SCHEMA 4"],
543                  ),
544            b_upwind_H     = BLOC(condition = "Type_of_Advection_H== 'SUPG'",
545             Upwind_Coefficients_of_H=SIMP(statut='o',typ='R',)
546                ),
547            ),
548
549           Advection_Of_Tracers=SIMP(statut='o',typ=bool,defaut=False,
550             fr = 'Prise en compte ou non de la convection de Tracer.',
551             ang= 'The advection of Tracer is taken into account or ignored.'
552             ),
553
554           b_tracers = BLOC( condition = "Advection_Of_Travers==True",
555
556           Type_of_Advection_Tracers=SIMP(statut='o',typ='TXM',
557           into=["CARACTERISTIQUES", "SUPG", "SCHEMA VOLUME FINI EXPLICIT", "SCHEMA DISTRIBUTIF N CONSERVATIF",\
558                 "SCHEMA PSI CONSERVATIF", "SCHEMA PSI NON CONSERVATIF", "SCHEMA N IMPLICITE NON CONSERVATIF",\
559                  "SCHEMA N PAR SEGMENTS SCHEMA 3", "SCHEMA N PAR SEGMENTS SCHEMA 4"],
560                  ),
561            b_upwind_Tracers     =BLOC(condition = "Type_of_Advection_Tracers== 'SUPG'",
562             Upwind_Coefficients_of_Tracers=SIMP(statut='o',typ='R',)
563                ),
564            ),
565
566
567          Advection_of_K_and_Epsilon=SIMP(statut='f',typ=bool,defaut=False,
568            fr = 'Prise en compte ou non de la convection de Tracer.',
569             ang= 'The advection of Tracer is taken into account or ignored.'
570             ),
571
572           b_k = BLOC( condition = "Advection_Of_K_and_Epsilon==True",
573
574           Type_of_Advection_K_and_Epsilon=SIMP(statut='o',typ='TXM',
575           into=["CARACTERISTIQUES", "SUPG", "SCHEMA VOLUME FINI EXPLICIT", "SCHEMA DISTRIBUTIF N CONSERVATIF",\
576                 "SCHEMA PSI CONSERVATIF", "SCHEMA PSI NON CONSERVATIF", "SCHEMA N IMPLICITE NON CONSERVATIF",\
577                  "SCHEMA N PAR SEGMENTS SCHEMA 3", "SCHEMA N PAR SEGMENTS SCHEMA 4"],
578                  ),
579            b_upwind_k     =BLOC(condition = "Type_of_Advection_K_and_Epsilon== 'SUPG'",
580             Upwind_Coefficients_of_K_and_Epsilon=SIMP(statut='o',typ='R',)
581                ),
582            ),
583
584         ),
585       ), # fin Advection
586
587         Propagation=FACT(statut='f',
588           Linearized_Propagation=SIMP(statut='o',typ=bool,defaut=False),
589           b_linear     =BLOC(condition = "Linearized_Propagation==True ",
590             Mean_Depth_For_Linearity=SIMP(statut='o',typ='R',defaut=0.0,val_min=0),
591           ),
592         ),
593         Discretisation_Implicitation=FACT(statut='f',
594           Discretisation_in_Space=SIMP(statut='f',typ='I',min=4,max=4,into=[11,12,13],defaut=(11,11,11),),
595           Implicitation_for_Diffusion_of_velocity=SIMP(statut='f',typ='R',sug=0),
596           Implicitation_for_Depth=SIMP(statut='f',typ='R',sug=0.55),
597           Implicitation_for_Velocity=SIMP(statut='f',typ='R',sug=0.55),
598           Free_Surface_Gradient_Compatibility=SIMP(statut='f',typ='R',sug=1.),
599         ),
600         Initial_Guess_for_H=SIMP(statut='f',typ='TXM',into=['zero','previous','extrapolation'],defaut='previous',),
601         Initial_Guess_for_U=SIMP(statut='f',typ='TXM',into=['zero','previous','extrapolation'],defaut='previous',),
602 )# fin NUMERICAL_PARAMETERS
603
604 PHYSICAL_PARAMETERS=PROC(nom="PHYSICAL_PARAMETERS",op=None,
605         Atmosphere=FACT(statut='f',
606           Wind=SIMP(statut='f',typ=bool,sug=False),
607           b_Wind     =BLOC(condition = "Wind=='True'",
608             regles=( PRESENT_PRESENT('Wind_Velocity_along_X','Wind_Velocity_along_Y', ),),
609             Coefficient_of_Wind_Influence=SIMP(statut='f',typ='R',sug=0,),
610             Wind_Velocity_along_X=SIMP(statut='f',typ='R',sug=0,),
611             Wind_Velocity_along_Y=SIMP(statut='f',typ='R',sug=0,),
612             Threashold_Depth_for_Wind=SIMP(statut='f',typ='R',sug=0,),
613             Air_Pressure=SIMP(statut='f',typ=bool,sug=False),
614          ),
615           Rain_or_Evaporation=SIMP(statut='f',typ=bool,sug=False),
616           b_Rain     =BLOC(condition = "Rain_or_Evaporation=='True'",
617             Rain_or_Evaporation_in_mm_perday=SIMP(statut='f',typ='I',sug=0),
618                          ),
619          ),
620           Tide_Generating_Force=SIMP(statut='f',typ=bool,sug=False),
621           b_Tide     =BLOC(condition = "Tide_Generating_Force=='True'",
622               Tidal_Data_Base=SIMP(statut='f',typ='I',into=[-1,1,2,3,4]),
623               Coefficient_To_Calibrate_Tidal_Range=SIMP(statut='f',typ='R',sug=1.),
624               Coefficient_To_Calibrate_Tidal_Velocity=SIMP(statut='f',typ='R',sug=999999),
625               Coefficient_To_Calibrate_Sea_Level=SIMP(statut='f',typ='R',sug=0.),
626               Binary_Database_1_for_Tide  = SIMP( statut='f', typ = ('Fichier', '(All Files (*)',),),
627               Binary_Database_2_for_Tide  = SIMP( statut='f', typ = ('Fichier', '(All Files (*)',),),
628          ),
629           Wave_Driver_Currents=SIMP(statut='f',typ=bool,sug=False),
630           b_Wave     =BLOC(condition = "Wave_Driver_Currents=='True'",
631               Record_Number_in_Wave_File=SIMP(statut='f',typ='I',sug=1),
632          ),
633 )
634
635 POST_PROCESSING=PROC(nom="POST_PROCESSING",op=None,
636    Graphic_Printouts=FACT(statut='f',
637         Graphic_Printout_Period=SIMP(statut='o', typ='I',defaut=1),
638         Number_of_First_TimeStep_For_Graphic_Printouts=SIMP(statut='o', typ='I',defaut=1),
639         Variables_For_Graphic_Printouts=SIMP(statut='o',max="**", typ='TXM',into=['a','b','c'],),
640         # ajouter le into
641    ),
642   Listing_Printouts=FACT(statut='f',
643
644           Results_File_Format = SIMP( statut='o',typ='TXM',into=['SERAFIN','MED','SERAFIND'], defaut='SERAFIN',
645                                 fr = 'Format du fichier de resultats. Les valeurs possibles sont : \n\
646      - SERAFIN : format standard simple precision pour Telemac;  \n\
647      - SERAFIND: format standard double precision pour Telemac; \n\
648      - MED     : format MED base sur HDF5' ,
649                                ang = 'Results file format. Possible values are:\n \
650      - SERAFIN : classical single precision format in Telemac;\n\
651      - SERAFIND: classical double precision format in Telemac; \n\
652      - MED     : MED format based on HDF5' ,
653                                    ),
654  
655           Results_File     = SIMP( statut='o', typ = ('Fichier', 'Steering Files (*.cas);;All Files (*)',),
656                            fr='Nom du fichier dans lequel seront ecrits les resultats du calcul avec la periodicite donnee par le mot cle : PERIODE POUR LES SORTIES GRAPHIQUES.', 
657                           ang='Name of the file into which the computation results shall be written, the periodicity being given by the key-word: GRAPHIC PRINTOUT PERIOD.',
658                                 ),
659         Listing_Printout_Period = SIMP(statut='o', typ='I',defaut=1,
660           fr  = 'Determine la periode en nombre de pas de temps d''impression des variables',
661           ang = 'Determines, in number of time steps, the printout period for the variables',
662         ),
663
664         Number_Of_First_TimeStep_For_Graphic_Printouts=SIMP(statut='o', typ='I',defaut=1),
665         Variables_To_Be_Printed=SIMP(statut='o',max="**", typ='TXM',into=['a','b','c']),
666    ),#Listing_Printouts
667
668    Debugger     = SIMP(typ=bool, statut='o', defaut=False),
669    Output_Of_Initial_Conditions = SIMP(typ=bool, statut='o', defaut=True,
670         fr = 'Si Vrai, impression des conditions initiales dans les resultats',
671         ang = 'If True, output of initial conditions in the results'
672    ),
673
674    Binary_Results_File = SIMP( statut='f', typ = ('Fichier', ';;All Files (*)',), 
675        fr = "Fichier de resultats code en binaire mis a la disposition de l'utilisateur.\n\
676 Les resultats a placer dans ce fichier seront a ecrire sur le canal 28.",
677        ang = "Additional binary-coded result file made available to the user. \n\
678 The results to be entered into this file shall be written on channel 28.",
679     ),
680
681 Information_About_Solver = SIMP(typ=bool, statut='f',defaut=False,
682        fr = "Si vrai, Donne a chaque pas de temps le nombre d'iterations necessaires a la convergence du solveur de l'etape de propagation.",
683      ang = "if True, prints the number of iterations that have been necessary to get the solution of the linear system.",
684 ),
685
686
687
688 PRECONDITIONING = SIMP( statut='o',typ='I',
689     defaut=2 ,
690     fr = 'Permet de preconditionner le systeme de letape de propagation afin daccelerer la convergence lors de sa resolution.  - 0 : pas de preconditionnement;  - 2 : preconditionnement diagonal.  - 3 : preconditionnement diagonal-bloc  - 7 : preconditionnement de Crout par element ou segment  -11 : preconditionnement de Gauss-Seidel par element ou segment Certains preconditionnements sont cumulables (les diagonaux 2 ou 3 avec les autres) Pour cette raison on ne retient que les nombres premiers pour designer les preconditionnements. Si lon souhaite en cumuler plusieurs on formera le produit des options correspondantes.',
691     ang= 'Choice of the preconditioning in the propagation step linear system that the convergence is speeded up when it is being solved.  0: no preconditioning  2: diagonal preconditioning  3: diagonal preconditioning with the condensed matrix  7: Crouts preconditioning per element or segment 11: Gauss-Seidels preconditioning per element or segment Some operations (either 2 or 3 diagonal preconditioning) can be performed concurrently with the others. Only prime numbers are therefore kept to denote the preconditioning operations. When several of them are to be performed concurrently, the product of relevant options shall be made.',
692      ),
693
694 ) # FIN POST-PRO