]> SALOME platform Git repositories - modules/hydrosolver.git/blob - src/salome_hydro/telemac2d/eficas/telemac2d_V6_cata.py
Salome HOME
the version delivered by EDF
[modules/hydrosolver.git] / src / salome_hydro / telemac2d / eficas / telemac2d_V6_cata.py
1 # -*- coding: utf-8 -*-
2 #
3 #  Copyright (C) 2012-2013 EDF
4 #
5 #  This file is part of SALOME HYDRO module.
6 #
7 #  SALOME HYDRO module is free software: you can redistribute it and/or modify
8 #  it under the terms of the GNU General Public License as published by
9 #  the Free Software Foundation, either version 3 of the License, or
10 #  (at your option) any later version.
11 #
12 #  SALOME HYDRO module is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #  GNU General Public License for more details.
16 #
17 #  You should have received a copy of the GNU General Public License
18 #  along with SALOME HYDRO module.  If not, see <http://www.gnu.org/licenses/>.
19
20 import types
21 from Accas import *
22
23 class Tuple:
24   def __init__(self,ntuple):
25     self.ntuple=ntuple
26
27   def __convert__(self,valeur):
28     if type(valeur) == types.StringType:
29       return None
30     if len(valeur) != self.ntuple:
31       return None
32     return valeur
33
34   def info(self):
35     return "Tuple de %s elements" % self.ntuple
36
37   __repr__=info
38   __str__=info
39
40 JdC = JDC_CATA(regles = (UN_PARMI('TELEMAC2D',)),
41                         )
42
43 TELEMAC2D = PROC(
44     nom = "TELEMAC2D", op = None,
45     fr = u"Définition d'un cas d'étude Telemac2D",
46     ang = u"Definition of a Telemac2D study case",
47     FICHIER_CAS = SIMP(statut = "o", typ = 'Fichier',
48                        fr = u"Fichier de description du cas",
49                        ang = u"Case description file"),
50     FICHIER_GEOMETRIE = SIMP(statut = "f", typ = 'Fichier',
51                              fr = u"Fichier de géométrie",
52                              ang = u"Geometry file"),
53     FICHIER_CONDITIONS_LIMITES = SIMP(statut = "f", typ = 'Fichier',
54                                       fr = u"Fichier de conditions limites",
55                                       ang = u"Boundary conditions file"),
56     FICHIER_DICO = SIMP(statut = "f", typ = 'Fichier',
57                         fr = "Fichier Dico",
58                         ang = u"Dictionary file"),
59     FICHIER_FORTRAN_UTILISATEUR = SIMP(statut = "f", typ = 'Fichier',
60                                        fr = "Fichier Fortran utilisateur",
61                                        ang = u"Fortran user file"),
62     RESULTAT = SIMP(statut = "f", typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"),
63                     fr = u"Fichier de résultat",
64                     ang = u"Result file"),
65     VARIABLE_SORTIE = FACT(statut = 'f', max = '**',
66                            fr = u"Variable de sortie du calcul",
67                            ang = u"Computation output variable",
68         NOM = SIMP(statut = "o", typ = 'TXM',
69                    fr = u"Nom de la variable",
70                    ang = u"Variable name"),
71         VARIABLE_T2D = SIMP(statut = "o", typ = 'TXM',
72                             fr = u'Variable Telemac2D (ex : "MODEL.VELOCITYU(2443)")',
73                             ang = u'Telemac2D variable (ex : "MODEL.VELOCITYU(2443)")'),
74                           ),
75     VARIABLE_ENTREE = FACT(statut = 'f', max = '**',
76                            fr = u"Variable d'entrée du calcul",
77                            ang = u"Computation input variable",
78         NOM = SIMP(statut = "o", typ = 'TXM',
79                    fr = u"Nom de la variable",
80                    ang = u"Variable name"),
81         VARIABLE_MODELE_T2D = FACT(statut = "o",
82                                    fr = u'Variable du modèle Telemac2D',
83                                    ang = u'Telemac2D model variable',
84             NOM_VARIABLE_MODELE = SIMP(statut = "o", typ = 'TXM',
85                                        fr = u'Nom de la variable du modèle (ex: "MODEL.DEBIT")',
86                                        ang = u'Model variable name (ex: "MODEL.DEBIT")'),
87             ZONE_DE_DEFINITION = FACT(statut = "o",
88                                       ang = u'Variable definition area',
89                                       fr = u'Zone de définition de la variable',
90                                       regles = (UN_PARMI('INDICE', 'POLYGONE')),
91                 INDICE = SIMP(statut = "f", typ = "I",
92                               ang = "Index of the point / border",
93                               fr = u"Indice du point ou de la frontière",
94                              ),
95                 POLYGONE = SIMP(statut = "f",
96                                 typ = Tuple(2),
97                                 max = '**', 
98                                 fr = u"Liste des sommets (coordonnées X,Y) du "
99                                      u"polygone définissant le contour de la zone",
100                                 ang = "List of points (X,Y coordinates) of the "
101                                       "polygon defining the border of the area",
102                                 validators = VerifTypeTuple(('R', 'R')),
103                                ),
104                                       ),
105                            ),
106                           ),
107 )