1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2012-2013 EDF
5 # This file is part of SALOME HYDRO module.
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.
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.
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/>.
24 def __init__(self,ntuple):
27 def __convert__(self,valeur):
28 if type(valeur) == types.StringType:
30 if len(valeur) != self.ntuple:
35 return "Tuple de %s elements" % self.ntuple
40 JdC = JDC_CATA(regles = (UN_PARMI('TELEMAC2D',)),
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 STEERING_FILE = SIMP(statut = "o", typ = 'Fichier',
48 fr = u"Fichier de description du cas",
49 ang = u"Case description file"),
50 USER_FORTRAN = SIMP(statut = "f", typ = 'Fichier',
51 fr = "Fichier Fortran utilisateur",
52 ang = u"Fortran user file"),
53 OUTPUT_VARIABLE = FACT(statut = 'f', max = '**',
54 fr = u"Variable de sortie du calcul",
55 ang = u"Computation output variable",
56 NAME = SIMP(statut = "o", typ = 'TXM',
57 fr = u"Nom de la variable",
58 ang = u"Variable name"),
59 VAR_INFO = FACT(statut = "o",
60 fr = u'Variable du modèle Telemac2D',
61 ang = u'Telemac2D model variable',
62 VAR_NAME = SIMP(statut = "o", typ = 'TXM',
63 fr = u'Nom de la variable du modèle (ex: "MODEL.DEBIT")',
64 ang = u'Model variable name (ex: "MODEL.DEBIT")'),
65 ZONE_DEF = FACT(statut = "o",
66 ang = u'Variable definition area',
67 fr = u'Zone de définition de la variable',
68 regles = (UN_PARMI('INDEX', 'POLYGON')),
69 INDEX = SIMP(statut = "f", typ = Tuple(3),
71 ang = "Index of the point / border",
72 fr = u"Indice du point ou de la frontière",
73 validators = VerifTypeTuple(('I', 'I', 'I')),
75 POLYGON = SIMP(statut = "f",
78 fr = u"Liste des sommets (coordonnées X,Y) du "
79 u"polygone définissant le contour de la zone",
80 ang = "List of points (X,Y coordinates) of the "
81 "polygon defining the border of the area",
82 validators = VerifTypeTuple(('R', 'R')),
87 INPUT_VARIABLE = FACT(statut = 'f', max = '**',
88 fr = u"Variable d'entrée du calcul",
89 ang = u"Computation input variable",
90 NAME = SIMP(statut = "o", typ = 'TXM',
91 fr = u"Nom de la variable (format Python)",
92 ang = u"Variable name (Python format)"),
93 VAR_INFO = FACT(statut = "o",
94 fr = u'Variable du modèle Telemac2D',
95 ang = u'Telemac2D model variable',
96 VAR_NAME = SIMP(statut = "o", typ = 'TXM',
97 fr = u'Nom de la variable du modèle (ex: "MODEL.DEBIT")',
98 ang = u'Model variable name (ex: "MODEL.DEBIT")'),
99 DEFAULT_VALUE = SIMP(statut = "o", typ = 'TXM',
100 fr = u'Valeur par défaut',
101 ang = u'Default value'),
102 ZONE_DEF = FACT(statut = "o",
103 ang = u'Variable definition area',
104 fr = u'Zone de définition de la variable',
105 regles = (UN_PARMI('INDEX', 'POLYGON')),
106 INDEX = SIMP(statut = "f", typ = Tuple(3),
108 ang = "Index of the variable",
109 fr = u"Indice de la variabme",
110 validators = VerifTypeTuple(('I', 'I', 'I')),
112 POLYGON = SIMP(statut = "f",
115 fr = u"Liste des sommets (coordonnées X,Y) du "
116 u"polygone définissant le contour de la zone",
117 ang = "List of points (X,Y coordinates) of the "
118 "polygon defining the border of the area",
119 validators = VerifTypeTuple(('R', 'R')),
126 TEXTE_NEW_JDC="TELEMAC2D()"