From 4735fc32db1990ba100d8f1c2752349a4263555c Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Mon, 20 Sep 2021 12:01:04 +0200 Subject: [PATCH] oublis --- MT/prefs.py | 2 +- MT/qtEficasMT.py | 2 +- convert/convert_TELEMAC.py | 68 ++++---------------------------------- 3 files changed, 8 insertions(+), 64 deletions(-) diff --git a/MT/prefs.py b/MT/prefs.py index 14b8c020..7f8d8fa1 100644 --- a/MT/prefs.py +++ b/MT/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2021 EDF R&D +# Copyright (C) 2007-2012 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MT/qtEficasMT.py b/MT/qtEficasMT.py index 4576464e..3fa63c87 100755 --- a/MT/qtEficasMT.py +++ b/MT/qtEficasMT.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2021 EDF R&D +# Copyright (C) 2007-2013 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_TELEMAC.py b/convert/convert_TELEMAC.py index 26d74151..a7cc908c 100644 --- a/convert/convert_TELEMAC.py +++ b/convert/convert_TELEMAC.py @@ -45,17 +45,17 @@ pattern_finit_par_virgule_ou_affect=re.compile(r'^.*(,|;|=|:)\s*$') pattern_ligne=re.compile(r'^\s*(?P[^=:]*)\s*[:=]\s*(?P.*)$') -pattern_variables=re.compile (r"^\s*(?PVARIABLES FOR GRAPHIC PRINTOUTS|VARIABLES POUR LES SORTIES GRAPHIQUES)\s*[:=]\s*(?P[A-Za-z]+(\d*|\*)(,[A-Za-z]+(\d*|\*))*)\s*(?P.*)$") +pattern_variables=re.compile(r"^\s*(?PC_VSM_PRINTOUT_SELECTION|COUPLAGE AVEC|COUPLING WITH|VARIABLES FOR GRAPHIC PRINTOUTS|VARIABLES POUR LES SORTIES GRAPHIQUES|VARIABLES TO BE PRINTED|VARIABLES A IMPRIMER|VARIABLES FOR 3D GRAPHIC PRINTOUTS|VARIABLES POUR LES SORTIES GRAPHIQUES 3D|VARIABLES POUR LES SORTIES GRAPHIQUES 2D|VARIABLES FOR 2D GRAPHIC PRINTOUTS)\s*[:=]\s*(?P[']?)(?P[A-Za-z]+(\d*|\*)([,;][A-Za-z]+(\d*|\*))*)\s*(?P=quote)(?P.*)$") # Attention aux listes de flottants pattern_liste=re.compile(r'^\s*(?P[+-.\w]+(\s*;\s*[+-.\w]+)+)\s*(?P.*)$') pattern_liste_texte=re.compile(r"^\s*(?P('.*(';\s*))+('.*'\s*)?)(?P.*)$") pattern_flottant=re.compile(r'^\s*(?P[+-]?((\d+(\.\d*)?)|(\.\d+))([dDeE][+-]?\d+)?)\s*(?P.*)$') -pattern_texteQuote = re.compile (r"^\s*(?P'[^']+(''[^']+)*')\s*(?P.*)$") -pattern_texteSimple = re.compile (r"(?P(^|\s)\s*[\w\.-]+)\s*(?P.*)$") -pattern_texteVide = re.compile (r"^\s*(?P'')\s*(?P.*)$") +pattern_texteQuote = re.compile(r"^\s*(?P'[^']+(''[^']+)*')\s*(?P.*)$") +pattern_texteSimple = re.compile(r"(?P(^|\s)\s*[\w\.-]+)\s*(?P.*)$") +pattern_texteVide = re.compile(r"^\s*(?P'')\s*(?P.*)$") -pattern_ContientDouble=re.compile (r"^.*''.*$") +pattern_ContientDouble=re.compile(r"^.*''.*$") # le pattern texte reconnait #nom1 nom 2 : ou = chaine entre ' @@ -108,7 +108,7 @@ class TELEMACparser(Pythonparser): self.TelemacdicoEn = appliEficas.readercata.TelemacdicoEn except : self.TelemacdicoEn = {} - print ('pas de TelemacdicoEn') + print('pas de TelemacdicoEn') try : self.DicoEnumCasFrToEnumCasEn = appliEficas.readercata.DicoEnumCasFrToEnumCasEn except : @@ -494,59 +494,3 @@ class TELEMACparser(Pythonparser): #listeOut.insert(i,kF) listeOut.insert(i,k) return listeOut - -# 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,) -# longueur=len(self.dictSimp["PRESCRIBED_ELEVATIONS"]) -# else : valeursPE=None -# if 'PRESCRIBED_FLOWRATES' in self.dictSimp: -# valeursPF=self.dictSimp["PRESCRIBED_FLOWRATES"] -# if not type(valeursPF)==list : valeursPF = (valeursPF,) -# longueur=len(self.dictSimp["PRESCRIBED_FLOWRATES"]) -# else : valeursPF=None -# if 'PRESCRIBED_VELOCITIES' in self.dictSimp: -# valeursPV=self.dictSimp["PRESCRIBED_VELOCITIES"] -# if not type(valeursPV)==list : valeursPV = (valeursPV,) -# longueur=len(self.dictSimp["PRESCRIBED_VELOCITIES"]) -# else : valeursPV=None -# -# if valeursPE == None and valeursPF == None and valeursPV == None : -# texte_Boundaries +="),\n" -# return -# -# if valeursPE == None or valeursPF == None or valeursPV == None : -# listNulle=[] -# for i in range(longueur) : listNulle.append('0') -# -# -# if valeursPE == None : valeursPE = listNulle -# if valeursPF == None : valeursPF = listNulle -# if valeursPV == None : valeursPV = listNulle -# -# -# 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 -# -# if valeursPV[e] != "" or valeursPV[e] != "\n" : -# if eval(valeursPV[e],{})!=0 : -# texte_Boundaries += "_F( BOUNDARY_TYPE= 'Prescribed Velocity',\n" -# texte_Boundaries += "PRESCRIBED_VELOCITIES = " + str(valeursPV[e]) + "),\n" -# continue -# print ("pb texte_Boundaries avec la valeur numero ", e) -# -# texte_Boundaries +="),)," -# self.textePy += texte_Boundaries -# -- 2.39.2