jdcSet=sets.Set()
-
-
dict_erreurs={
"DIST_LIGN_3D": "la commande DIST_LIGN_3D a ete supprimee",
"DEFI_THER_JOULE": "la commande DIST_LIGN_3D a ete supprimee",
"AFFE_CHAR_MECA_SECH_CALCULEE": "le sechage est maintenant une variable de commande",
"AFFE_CHAR_MECA_HYDR_CALCULEE": "l'hydratation est maintenant une variable de commande",
"AFFE_CHAR_MECA_EPSA_CALCULEE":"EPSA est maintenant une variable de commande",
+ "AFFE_CHAR_MECA_PRESSION_CALCULEE":"PRESSION_CALCULEE est remplace par EVOL_CHAR",
"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",
"DEFI_MATERIAU_POLY_CFC" : "le materiau POLY_CFC est remplace par le comportement POLYCRISTAL",
"DEFI_MATERIAU_ECOU_PLAS1" : "le materiau ECOU_PLAS1 est supprime",
- "DEFI_MATERIAU_COMP_THM" : "les materiaux ELAS_THM, SURF_ETAT_SATU, SURF_ETAT_NSAT, CAM_CLAY_THM, LIQU_SATU_GAT, LIQU_NSAT_GAT ont ete supprimes",
+ "DEFI_MATERIAU_COMP_THM_ELAS_THM" : "le materiau ELAS_THM a ete supprime",
+ "DEFI_MATERIAU_COMP_THM_SURF_ETAT_SATU" : "le materiau SURF_ETAT_SATU a ete supprime",
+ "DEFI_MATERIAU_COMP_THM_SURF_ETAT_NSAT" : "le materiau SURF_ETAT_NSAT a ete supprime",
+ "DEFI_MATERIAU_COMP_THM_CAM_CLAY_THM" : "le materiau CAM_CLAY_THM a ete supprime",
+ "DEFI_MATERIAU_COMP_THM_LIQU_SATU_GAT" : "le materiau LIQU_SATU_GAT a ete supprime",
+ "DEFI_MATERIAU_COMP_THM_LIQU_NSAT_GAT" : "le materiau LIQU_NSAT_GAT a ete supprime",
"DEFI_MATERIAU_GLRC" : "le materiau GLRC a ete remplace par GLRC_DAMAGE",
"CALC_CHAM_ELEM":"reecrire la partie SOUR_ELGA_ELEC",
"CALC_G_THETA_T_OPTION_VALEUR":"verifier la valeur d OPTION",
"DEFI_INTERF_DYNA_INTERFACE_DDL_ACTIF":"DDL_ACTIF supprime de DEFI_INTERF_DYNA; utiliser MASQUE",
"DEFI_TEXTURE":"le materiau POLY_CFC est remplace par le comportement POLYCRISTAL",
"CREA_RESU_NOM_CHAM_VALEUR":"HYDR_ELGA est remplace par HYDR_ELNO_ELGA et HYDR_NOEU_ELGA",
+ "COMB_CHAM_NO":"COMB_CHAM_NO est remplace par CREA_CHAMP",
+ "COMB_CHAM_ELEM":"COMB_CHAM_ELEM est remplace par CREA_CHAMP",
+ "IMPR_OAR":"IMPR_OAR doit etre traduit manuellement",
}
def EcritErreur(listeGena,ligne=None) :
logging.warning("%s ligne %d ",dict_erreurs[maClef], ligne)
else :
logging.warning("%s",dict_erreurs[maClef])
+ else :
+ maCle=""
+ for Mot in listeGena[:-1] :
+ maCle=maCle+"_"+Mot
+ maClef=maCle[1:]
+ maClef=maCle+"_"+"VALEUR"
+ if maClef in dict_erreurs.keys() :
+ if ligne != None :
+ logging.warning("%s ligne %d ",dict_erreurs[maClef], ligne)
+ else :
+ logging.warning("%s",dict_erreurs[maClef])
#except :
# pass
"CREA_RESU","CREA_CHAMP","DIST_LIGN_3D","MODI_MAILLAGE","LIRE_TABLE",
"POST_SIMPLIFIE","AFFE_MATERIAU","DEFI_MAILLAGE","DEPL_INTERNE",
"POST_DYNA_ALEA","RECU_FONCTION","DYNA_TRAN_MODAL","DEFI_INTERF_DYNA",
- "CALC_PRECONT","DEFI_TEXTURE","TEST_RESU","COMB_CHAM_NO",
- "CALC_FATIGUE",
+ "CALC_PRECONT","DEFI_TEXTURE","TEST_RESU","COMB_CHAM_NO","COMB_CHAM_ELEM",
+ "CALC_FATIGUE","IMPR_OAR","MACR_ASCOUF_CALC","MACR_ASPIC_CALC","MACR_CABRI_CALC",
+ "MACR_ADAPT_MAILLE",
)
#atraiter=( "IMPR_GENE",)
parseKeywords(root)
####################### traitement erreurs ########################
- GenereErreurPourCommande(jdc,("POST_RCCM","DIST_LIGN_3D","IMPR_OAR"))
+ GenereErreurPourCommande(jdc,("POST_RCCM","DIST_LIGN_3D","IMPR_OAR","COMB_CHAM_NO","COMB_CHAM_ELEM"))
####################### traitement CALC_META #######################
renameMotCleInFact(jdc,"CALC_META","ETAT_INIT","META_INIT","META_INIT_ELNO")
removeMotCleAvecErreur(jdc,"DEFI_MATERIAU","POLY_CFC")
removeMotCleAvecErreur(jdc,"DEFI_MATERIAU","ECOU_PLAS1")
- lavertit=("DEFI_MATERIAU","COMP_THM")
+ lavertit=("ELAS_THM","SURF_ETAT_SATU","SURF_ETAT_NSAT","CAM_CLAY_THM","LIQU_SATU_GAT","LIQU_NSAT_GAT")
dTHM={"ELAS_THM":"xxx", "SURF_ETAT_SATU":"xxx", "SURF_ETAT_NSAT":"xxx","CAM_CLAY_THM":"xxx","LIQU_SATU_GAT":"xxx","LIQU_NSAT_GAT":"xxx"}
ChangementValeurAvecAvertissement(jdc,"DEFI_MATERIAU","COMP_THM",dTHM,lavertit)
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_MECA","PRESSION_CALCULEE")
removeMotCleAvecErreur(jdc,"AFFE_CHAR_MECA","EPSA_CALCULEE")
removeMotCle(jdc,"AFFE_CHAR_THER_F","VERI_DDL")
removeMotCle(jdc,"AFFE_CHAR_THER","VERI_DDL")
removeMotCleInFactSiRegleAvecErreur(jdc,"AFFE_CHAR_MECA","CONTACT","FROTTEMENT",((("CONTACT","METHODE","CONTRAINTE",jdc),"MCsousMCFaPourValeur"),))
####################### traitement CALC_ELEM / CALC_NO #######################
- dcalcelemno={"ERRE_ELGA_NORE":"ERRE_ELEM_SIGM","ERRE_ELEM_NOZ1":"ERZ1_ELEM_SIGM","ERRE_ELEM_NOZ2":"ERZ2_ELEM_SIGM","ERRE_ELNO_ELGA":"ERRE_ELNO_ELEM","ERRE_NOEU_ELGA":"ERRE_NOEU_ELEM","ERTH_ELEM_TEMP":"ERRE_ELEM_TEMP","ERTH_ELNO_ELEM":"ERRE_ELNO_ELEM","EPGR_ELNO":"EPFP_ELNO","EPGR_ELGA":"EPFP_ELGA"}
+ dcalcelemno={"ERRE_ELGA_NORE":"ERRE_ELEM_SIGM","ERRE_ELEM_NOZ1":"ERZ1_ELEM_SIGM","ERRE_ELEM_NOZ2":"ERZ2_ELEM_SIGM","ERRE_ELNO_ELGA":"ERRE_ELNO_ELEM","ERRE_NOEU_ELGA":"ERRE_NOEU_ELEM","ERTH_ELEM_TEMP":"ERRE_ELEM_TEMP","ERTH_ELNO_ELEM":"ERRE_ELNO_ELEM","EPGR_ELNO":"EPFP_ELNO","EPGR_ELGA":"EPFP_ELGA","DURT_ELGA_TEMP":"DURT_ELNO_TEMP"}
ChangementValeur(jdc,"CALC_ELEM","OPTION",dcalcelemno)
ChangementValeur(jdc,"CALC_NO","OPTION",dcalcelemno)
ChangementValeurDsMCF(jdc,"IMPR_RESU","RESU","NOM_CHAM",dcalcelemno)
####################### traitement MACR_LIGNE_COUPE #######################
AppelleMacroSelonValeurConcept(jdc,"MACR_LIGN_COUPE",("LIGN_COUPE","TABLE"))
+ removeMotCleInFact(jdc,"MACR_LIGN_COUPE","LIGN_COUPE","TABLE")
####################### traitement MODI_MAILLAGE #######################
removeMotCle(jdc,"MODI_MAILLAGE","MODELE")
removeMotCleAvecErreur(jdc,"POST_DYNA_ALEA","VANMARCKE")
####################### traitement RECU_FONCTION #######################
- removeMotCle(jdc,"RECU_FONCTION","TYPE_RESU")
# il faut aussi ajouter la regle suivante :
# s'il existe TYPE_RESU='FONCTION_C', renommer NOM_PARA_TABL='FONCTION_C'
+ removeMotCleSiRegle(jdc,"RECU_FONCTION","NOM_PARA_TABL",((("TYPE_RESU","FONCTION_C",jdc),"MCaPourValeur"),))
+ chercheOperInsereFacteurSiRegle(jdc,"RECU_FONCTION","NOM_PARA_TABL='FONCTION_C',",((("TYPE_RESU","FONCTION_C",jdc),"MCaPourValeur"),),estunFacteur=0)
+ removeMotCle(jdc,"RECU_FONCTION","TYPE_RESU")
chercheOperInsereFacteurSiRegle(jdc,"RECU_FONCTION","FILTRE",((("OBSTACLE",),"existe"),))
AjouteMotClefDansFacteurSiRegle(jdc,"RECU_FONCTION","FILTRE","NOM_PARA='LIEU',",((("OBSTACLE",),"existe"),))
AjouteMotClefDansFacteurSiRegle(jdc,"RECU_FONCTION","FILTRE","VALE_K='DEFIOBST',",((("OBSTACLE",),"existe"),))
####################### traitement CALC_PRECONT #######################
AjouteMotClefDansFacteurSiRegle(jdc,"CALC_PRECONT","INCREMENT","SUBD_METHODE='UNIFORME',",((("INCREMENT","SUBD_PAS"),"existeMCsousMCF"),))
+ moveMotCleFromFactToFactMulti(jdc,"CALC_PRECONT","CONVERGENCE","RESI_INTE_RELA",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"CALC_PRECONT","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"CALC_PRECONT","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"CALC_PRECONT","CONVERGENCE","RESO_INTE",("COMP_INCR","COMP_ELAS"))
renameMotCleInFact(jdc,"CALC_PRECONT","INCREMENT","COEF_SUBD_PAS_1","SUBD_COEF_PAS_1")
renameOper(jdc,"COMB_CHAM_NO","CREA_CHAMP")
+ ####################### traitement MACR_ASCOUF_CALC #######################
+ AjouteMotClefDansFacteurSiRegle(jdc,"MACR_ASCOUF_CALC","INCREMENT","SUBD_METHODE='UNIFORME',",((("INCREMENT","SUBD_PAS"),"existeMCsousMCF"),))
+ renameMotCleInFact(jdc,"MACR_ASCOUF_CALC","INCREMENT","COEF_SUBD_PAS_1","SUBD_COEF_PAS_1")
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASCOUF_CALC","CONVERGENCE","RESI_INTE_RELA",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASCOUF_CALC","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASCOUF_CALC","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASCOUF_CALC","CONVERGENCE","RESO_INTE",("COMP_INCR","COMP_ELAS"))
+
+
+ ####################### traitement MACR_ASPIC_CALC #######################
+ AjouteMotClefDansFacteurSiRegle(jdc,"MACR_ASPIC_CALC","INCREMENT","SUBD_METHODE='UNIFORME',",((("INCREMENT","SUBD_PAS"),"existeMCsousMCF"),))
+ renameMotCleInFact(jdc,"MACR_ASPIC_CALC","INCREMENT","COEF_SUBD_PAS_1","SUBD_COEF_PAS_1")
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASPIC_CALC","CONVERGENCE","RESI_INTE_RELA",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASPIC_CALC","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_ASPIC_CALC","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
+
+
+ ####################### traitement MACR_CABRI_CALC #######################
+ AjouteMotClefDansFacteurSiRegle(jdc,"MACR_CABRI_CALC","INCREMENT","SUBD_METHODE='UNIFORME',",((("INCREMENT","SUBD_PAS"),"existeMCsousMCF"),))
+ renameMotCleInFact(jdc,"MACR_CABRI_CALC","INCREMENT","COEF_SUBD_PAS_1","SUBD_COEF_PAS_1")
+ moveMotCleFromFactToFactMulti(jdc,"MACR_CABRI_CALC","CONVERGENCE","RESI_INTE_RELA",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_CABRI_CALC","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
+ moveMotCleFromFactToFactMulti(jdc,"MACR_CABRI_CALC","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
+
####################### traitement CALC_FATIGUE #######################
dfatigue={"MATAKE":"MATAKE_MODI_AC", "DOMM_MAXI":"MATAKE_MODI_AV", "FATEMI_SOCIE":"FATESOCI_MODI_AV"}
#########################################################################
-
f=open(outfile,'w')
f.write(jdc.getSource())
f.close()