- def Option_De_Supg(self):
- print "ds Option_De_Supg"
- return
-
- def Forme_De_La_Convection(self):
- print "ds Forme_De_La_Convection"
- return
-
- def redecoupeSimp(self,simp):
- # replace('-','_') uniquement dans les identifiants
- while simp.find('-') > 0 :
- ind=simp.find('-')
- if ind==len(simp)-1 : break
- simp=simp[0:ind]+'_'+simp[ind+1].upper()+simp[ind+2:]
- return simp
-
-
-
- def Liquid_Boundaries(self):
- texte_Boundaries="Liquid_Boundaries=( "
- premier=0
- if 'Prescribed_Elevations' in self.dictSimp.keys():
- valeurs=self.dictSimp["Prescribed_Elevations"].split(";")
- elif 'Cotes_Imposees' in self.dictSimp.keys():
- valeurs=self.dictSimp["Cotes_Imposees"].split(";")
- else : valeurs=()
- for e in range(len(valeurs)):
- if valeurs[e] == "" or valeurs[e] == "\n" : continue
- if eval(valeurs[e],{})==0 : continue
- if not premier : premier=1
- texte_Boundaries += "_F(Type_Condition = 'Prescribed Elevations',\n"
- texte_Boundaries += "Prescribed_Elevations = " + str(valeurs[e]) + "),\n"
-
- if 'Prescribed_Flowrates' in self.dictSimp.keys():
- valeurs=self.dictSimp["Prescribed_Flowrates"].split(";")
- elif 'Debits_Imposes' in self.dictSimp.keys():
- valeurs=self.dictSimp["Debits_Imposes"].split(";")
- else : valeurs=()
- for e in range(len(valeurs)):
- if valeurs[e] == "" or valeurs[e] == "\n" : continue
- if eval(valeurs[e],{})==0 : continue
- if not premier : premier=1
- texte_Boundaries += "_F(Type_Condition = 'Prescribed Flowrates',\n"
- texte_Boundaries += "Prescribed_Flowrates = " + str(valeurs[e]) + "),\n"
+
+ for e in range(len(valeursPE)):
+ if valeursPE[e] != "" or valeursPE[e] != "\n" :
+ if eval(valeursPE[e],{}) != 0 :
+ texte_Boundaries += "_F(BOUNDARY_TYPE = 'Prescribed Elevations',\n"
+ texte_Boundaries += "PRESCRIBED_ELEVATIONS = " + str(valeursPE[e]) + "),\n"
+ continue
+
+ if valeursPF[e] != "" or valeursPF[e] != "\n" :
+ if eval(valeursPF[e],{}) != 0 :
+ texte_Boundaries += "_F(BOUNDARY_TYPE = 'Prescribed Flowrates',\n"
+ texte_Boundaries += "PRESCRIBED_FLOWRATES = " + str(valeursPF[e]) + "),\n"
+ continue