From e99acbe1ee3d2bc36653e96f38f3eaae5eb2d703 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 10 May 2017 19:05:20 +0200 Subject: [PATCH] BOUNDARY... dans Telemac2D --- convert/convert_TELEMAC.py | 12 +++++++----- generator/generator_TELEMAC.py | 3 ++- generator/generator_python.py | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/convert/convert_TELEMAC.py b/convert/convert_TELEMAC.py index 07a8521b..f833c8db 100644 --- a/convert/convert_TELEMAC.py +++ b/convert/convert_TELEMAC.py @@ -239,7 +239,7 @@ class TELEMACParser(PythonParser): dicoParMC={} for simp in self.dictSimp: - if simp in TELEMACParser.__dict__ : TELEMACParser.__dict__[simp],(self,) + if simp in TELEMACParser.__dict__ : TELEMACParser.__dict__[simp](self,) for simp in self.dictSimp: if simp in ListeSupprimeCasToEficas: continue @@ -286,6 +286,7 @@ class TELEMACParser(PythonParser): commentaire="COMMENTAIRE("+repr(dicoComment['fin'])+")\n" self.textePy=self.textePy+commentaire + #print (self.textePy) return self.textePy @@ -317,8 +318,9 @@ class TELEMACParser(PythonParser): def convertFACT(self,obj,nom,valeur): + # traitement LIQUID_BOUNDARIES if nom in TELEMACParser.__dict__ : - TELEMACParser.__dict__[nom],(self,) + TELEMACParser.__dict__[nom](self,) return self.textePy += nom + "=_F( " self.traiteMC(valeur) @@ -456,8 +458,8 @@ class TELEMACParser(PythonParser): listeOut.insert(i,k) return listeOut - def LIQUID_BOUNDARIES(self): - texte_Boundaries="LIQUID_BOUNDARIES=( " + def BOUNDARY_CONDITIONS(self): + texte_Boundaries="BOUNDARY_CONDITIONS=_F(LIQUID_BOUNDARIES=( " if 'PRESCRIBED_ELEVATIONS' in self.dictSimp: valeursPE=self.dictSimp["PRESCRIBED_ELEVATIONS"] if not type(valeursPE)==list : valeursPE = (valeursPE,) @@ -508,6 +510,6 @@ class TELEMACParser(PythonParser): continue print ("pb texte_Boundaries avec la valeur numero ", e) - texte_Boundaries +="),\n" + texte_Boundaries +="),)," self.textePy += texte_Boundaries diff --git a/generator/generator_TELEMAC.py b/generator/generator_TELEMAC.py index afd14f1f..aa246773 100644 --- a/generator/generator_TELEMAC.py +++ b/generator/generator_TELEMAC.py @@ -236,12 +236,13 @@ class TELEMACGenerator(PythonGenerator): """ """ s=PythonGenerator.generMCFACT(self,obj) - if obj.nom in TELEMACGenerator.__dict__ : TELEMACGenerator.__dict__[obj.nom],(self,obj) + if obj.nom in TELEMACGenerator.__dict__ : TELEMACGenerator.__dict__[obj.nom](self,obj) return s def LIQUID_BOUNDARIES(self,obj): + print ('jkljklj') if 'BOUNDARY_TYPE' in obj.liste_mc_presents() : objForme=obj.get_child('BOUNDARY_TYPE') valForme=objForme.valeur diff --git a/generator/generator_python.py b/generator/generator_python.py index 024d58fb..b40e6589 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -355,6 +355,7 @@ class PythonGenerator(object): sdname='' else: sdname= self.generator(obj.sd)+'=' + if sdname.find('SD_') != -1: sdname='' except: sdname='sansnom=' l=[] -- 2.39.2