jdcSet=sets.Set()
+
+
dict_erreurs={
"DIST_LIGN_3D": "Suppression de la commande DIST_LIGN_3D",
"AFFE_MODELE_AFFE": "Suppression d un mot clef avec APPUI_REP pour valeur",
"AFFE_CHAR_MECA_CONTACT_FROTTEMENT": "Suppression d un mot clef FROTTEMENT",
+ "AFFE_CHAR_MECA_SECH_CALCULEE": "Suppression de la variable de commande",
+ "AFFE_CHAR_MECA_HYDR_CALCULEE": "Suppression de la variable de commande",
"MACR_LIGN_COUPE" : "MACR_LIGN_COUPE demande un traitement manuel",
"POST_RCCM" : "POST_RCCM demande un traitement manuel",
"DEFI_MATERIAU_CHABOCHE" : "remplacer la valeur CINx_CHAB",
"AFFE_MODELE_AFFE_MODELISATION_VALEUR":"verifier la valeur de MODELISATION",
"STAT_NON_LINE_COMP_INCR_RELATION_VALEUR":"verifier la valeur de RELATION",
"STAT_NON_LINE_COMP_INCR_RELATION_KIT_VALEUR":"verifier la valeur de RELATION_KIT",
+ "STAT_NON_LINE_VARI_COMM":"suppression des variables de commande",
+ "DYNA_NON_LINE_COMP_INCR_RELATION_VALEUR":"verifier la valeur de RELATION",
+ "DYNA_NON_LINE_COMP_INCR_RELATION_KIT_VALEUR":"verifier la valeur de RELATION_KIT",
+ "DYNA_NON_LINE_VARI_COMM":"suppression des variables de commande",
"TEST_RESU_UNITE":"suppression du mot clef UNITE dans TEST_RESU",
"AFFE_MODELE_AFFE":"suppression de AFFE (ancien mot clef APPUI_REP)",
+ "POST_SIMPLIFIE":"commande POST_SIMPLIFIE supprimee",
}
def EcritErreur(listeGena,ligne=None) :
if ( 1 == 1) :
maClef=maCle[1:]
if maClef in dict_erreurs.keys() :
- logging.error("%s",dict_erreurs[maClef])
if ligne != None :
- logging.error("a la ligne : %d",ligne)
+ logging.error("%s ligne %d ",dict_erreurs[maClef], ligne)
+ else :
+ logging.error("%s",dict_erreurs[maClef])
#except :
# pass
numcol=chercheDebut1Mot(jdc,command)
if numcol > 0 :
jdc.splitLine(command.lineno,numcol)
+ texteinfo=texte
texte=texte+'\n'
jdc.addLine(texte,command.lineno)
- logging.info("insertion de %s ligne %d", texte,command.lineno)
+ logging.info("Insertion de : %s ligne %d", texteinfo,command.lineno)
if numcol > 0 : # Les mots clefs etaient sur la même ligne
jdc.joinLineandNext(command.lineno)
while texte[indice] == " " :
indice = indice -1
if texte[indice] != "," : texte=texte+","
+ texteinfo=texte
texte=texte+"\n"
ligneaCouper=facteur.lineno
jdc.addLine(texte,ligneaCouper)
jdc.joinLineandNext(ligneaCouper)
- logging.info("insertion de %s ligne %d", texte,ligneaCouper)
+ logging.info("Insertion de %s ligne %d", texteinfo,ligneaCouper)
# Gestion du cas particulier du mot clef facteur vide
if facteur.childNodes == []:
jdc.joinLineandNext(facteur.lineno)
"CALC_NO","EXTR_MODE","CALC_META","IMPR_RESU","TEST_RESU",
"DEFI_THER_JOULE","DYNA_TRAN_EXPLI","DEBUT","CALC_CHAM_ELEM",
"AFFE_CHAR_THER", "MACR_LIGN_COUPE","POST_RCCM","PROJ_MESU_MODAL",
- "CREA_RESU","DIST_LIGN_3D",
+ "CREA_RESU","DIST_LIGN_3D","MODI_MAILLAGE","LIRE_TABLE",
+ "POST_SIMPLIFIE","AFFE_MATERIAU"
)
#atraiter=( "IMPR_GENE",)
moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","RESO_INTE",("COMP_INCR","COMP_ELAS"))
+ removeMotCleAvecErreur(jdc,"STAT_NON_LINE","VARI_COMM")
moveMotCleFromFactToFactMulti(jdc,"DYNA_NON_LINE","CONVERGENCE","RESI_INTE_RELA",("COMP_INCR","COMP_ELAS"))
moveMotCleFromFactToFactMulti(jdc,"DYNA_NON_LINE","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
moveMotCleFromFactToFactMulti(jdc,"DYNA_NON_LINE","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
moveMotCleFromFactToFactMulti(jdc,"DYNA_NON_LINE","CONVERGENCE","RESO_INTE",("COMP_INCR","COMP_ELAS"))
+ removeMotCleAvecErreur(jdc,"DYNA_NON_LINE","VARI_COMM")
dStatNonLine={"ELAS":"ELAS_THER"}
lavertit=("ELAS")
moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","CABLE","E", ("ELAS",))
moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","CABLE","NU", ("ELAS",))
moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","CABLE","RHO",("ELAS",))
+ moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","CABLE","ALPHA",("ELAS",))
AjouteMotClefDansFacteurSiRegle(jdc,"DEFI_MATERIAU","ELAS","NU=0.,",((("ELAS","NU"),"nexistepasMCsousMCF"),))
####################### traitement IMPR_CO #######################
####################### traitement AFFE_CHAR_* #######################
removeMotCle(jdc,"AFFE_CHAR_MECA","VERI_DDL")
+ removeMotCle(jdc,"AFFE_CHAR_MECA","SECH_CALCULEE")
+ removeMotCle(jdc,"AFFE_CHAR_MECA","HYDR_CALCULEE")
removeMotCle(jdc,"AFFE_CHAR_THER_F","VERI_DDL")
removeMotCle(jdc,"AFFE_CHAR_THER","VERI_DDL")
moveMotClefInOperToFact(jdc,"CALC_G","FISSURE","THETA")
####################### traitement AFFE_MODELE #######################
- daffeModele={"PLAN_FISSURE":"PLAN_JOINT", "AXIS_FISSURE":"AXIS_JOINT","OHNO":"VISC_TAHERI"}
- lavertit=("OHNO")
+ daffeModele={"PLAN_FISSURE":"PLAN_JOINT", "AXIS_FISSURE":"AXIS_JOINT","OHNO_FO":"VISC_TAHERI_FO","OHNO":"VISC_TAHERI"}
+ lavertit=("OHNO","OHNO_FO")
ChangementValeurDsMCFAvecAvertissement(jdc,"AFFE_MODELE","AFFE","MODELISATION",daffeModele,lavertit)
removeMotCleSiRegleAvecErreur(jdc,"AFFE_MODELE","AFFE",((("AFFE","MODELISATION","APPUI_REP",jdc),"MCsousMCFaPourValeur"),))
####################### traitement MACR_LIGNE_COUPE #######################
AppelleMacroSelonValeurConcept(jdc,"MACR_LIGN_COUPE",("LIGN_COUPE","TABLE","CO"))
+ ####################### traitement MODI_MAILLAGE #######################
+ removeMotCle(jdc,"MODI_MAILLAGE","MODELE")
+ ####################### traitement LIRE_TABLE #######################
+ removeMotCle(jdc,"LIRE_TABLE","TYPE_TABLE")
+
+ ####################### traitement POST_SIMPLIFIE #######################
+ removeCommande(jdc,"POST_SIMPLIFIE")
+
+ ####################### traitement AFFE_MATERIAU #######################
+ removeMotCleInFact(jdc,"AFFE_MATERIAU","AFFE","SECH_REF")
f=open(outfile,'w')
MonTexte=n.getText(jdc);
boolChange=1
inseremocle.insereMotCle(jdc,c,MonTexte)
- logging.info("Changement de place : %s,%s, %s ",n.name, n.lineno, n.colno)
+ logging.info("Changement de place %s ligne %s ",n.name, n.lineno)
if boolChange : jdc.reset(jdc.getSource())
removemocle.removeMotCleInFact(jdc,command,fact,mocle)
MonTexte=n.getText(jdc);
inseremocle.insereMotCleDansFacteur(jdc,cible,MonTexte)
boolChange=1
- logging.info("Changement de place : %s,%s, %s ",n.name, n.lineno, n.colno)
- logging.info("vers : %s", cible.name)
+ logging.info("Changement de place %s ligne %s vers %s",n.name, n.lineno, cible.name)
if boolChange : jdc.reset(jdc.getSource())
boolChange=1
if erreur : EcritErreur((command,),c.lineno)
jdc.supLignes(c.lineno,c.endline)
- logging.error("Suppression de: %s, %s, %s",c.name,c.lineno,c.endline)
+ logging.error("Suppression de: %s ligne %s",c.name,c.lineno)
if boolChange : jdc.reset(jdc.getSource())
#-------------------------------------------------------------
def removeMC(jdc,c,mc):
#---------------------------------
if debug:print "Suppression de:",c.name,mc.name,mc.lineno,mc.colno,mc.endline,mc.endcol
- logging.info("Suppression de: %s, %s, %s, %s, %d, %d",c.name,mc.name,mc.lineno,mc.colno,mc.endline,mc.endcol)
+ logging.info("Suppression de: %s, %s, ligne %d",c.name,mc.name,mc.lineno)
if mc.endline > mc.lineno:
if debug:print "mocle sur plusieurs lignes--%s--" % jdc.getLines()[mc.lineno-1][mc.colno:]
if erreur :
EcritErreur((command,mocle),c.lineno)
else :
- logging.info("Renommage de: %s, %s, %s, %s en %s",c.name,mc.name,mc.lineno,mc.colno,new_name)
+ logging.info("Renommage de: %s %s ligne %d en %s",c.name,mc.name,mc.lineno,new_name)
s=jdc.getLines()[mc.lineno-1]
jdc.getLines()[mc.lineno-1]=s[:mc.colno]+new_name+s[mc.colno+len(mocle):]
diff=len(new_name) - len(mocle)
for c in jdc.root.childNodes:
if c.name != command:continue
if debug:print "Renommage de:",c.name,c.lineno,c.colno
- logging.info("Renommage de: %s, %s, %s, en %s",c.name,c.lineno,c.colno,new_name)
+ logging.info("Renommage de: %s ligne %d en %s",c.name,c.lineno,new_name)
boolChange=1
s=jdc.getLines()[c.lineno-1]
jdc.getLines()[c.lineno-1]=s[:c.colno]+new_name+s[c.colno+len(command):]