]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
*** empty log message ***
authorPascale Noyret <pascale.noyret@edf.fr>
Mon, 8 Dec 2008 13:32:23 +0000 (13:32 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Mon, 8 Dec 2008 13:32:23 +0000 (13:32 +0000)
Traducteur/dictErreurs.py
Traducteur/regles.py
Traducteur/traduitV8V9.py

index f6d1d0c7a98ba147144fe6390da0f4e811da38ed..a66aa137b8e6c16a29bfa138c23b065389552a51 100644 (file)
@@ -65,6 +65,7 @@ dict_erreurs={
               "IMPR_FICO_HOMARD":"IMPR_FICO_HOMARD a ete integre dans MACR_ADPA_MAIL",
 # STA9.2
               "POST_RCCM_SITUATION_NUME_PASSAGE":"Utilisation de NUME_PASSAGE pour le type TUYAUTERIE impossible en 9.2. On ne traite pour le moment que les chemins de passage simples.",
+              "POST_RCCM_SITUATION_NB_CYCL_SEISME":"POST_RCCM : maintenant les SITUATIONS sismiques ont leur propre mot clef facteur SEISME, attention, traduction incomplete",
               "DEFI_MATERIAU_BAZANT_FD" : "le materiau BAZANT_FD a ete supprime",
               "DEFI_MATERIAU_APPUI_ELAS" : "le materiau APPUI_ELAS a ete supprime",
               "DEFI_MATERIAU_PORO_JOINT" : "le materiau PORO_JOINT a ete supprime",
@@ -75,6 +76,9 @@ dict_erreurs={
               "CALC_G_OPTION=G_LAGR" : "l'OPTION G_LAGR de CALC_G a ete supprimee",
               "CALC_G_OPTION=G_LAGR_GLOB" : "l'OPTION G_LAGR_GLOB de CALC_G a ete supprimee",
               "CALC_MATR_ELEM_THETA" : "l'OPTION RIGI_MECA_LAGR de CALC_MATR_ELEM a ete supprimee",
+              "TEST_FICHIER_NB_CHIFFRE" : "le fonctionnement de TEST_FICHIER a change entre la V8 et la V9, consultez la doc, en particulier pour entrer la bonne valeur de NB_VALE",
+              "DYNA_NON_LINE_PILOTAGE" : "le PILOTAGE n'est pas actif dans DYNA_NON_LINE ",
+              "DYNA_NON_LINE_RECH_LINEAIRE" : "la RECH_LINEAIRE n'est pas active dans DYNA_NON_LINE ",
              }
 
 def EcritErreur(listeGena,ligne=None) :
index 9cddcfda3f8a636beed8073255f41374b1dd1d2b..d07c7b9c076fe2739b6ddbc7a1376adf2af46137 100644 (file)
@@ -113,6 +113,27 @@ class existe :
       if bool == None : bool = 0
       return bool
 
+#-------------
+class nexistepas :
+#--------------
+   def __init__(self,list_arg):
+      self.genea=list_arg
+
+   def cherche_mot(self,niveau,commande):
+      if commande == None            : return 0
+      if niveau   == len(self.genea) : return 1
+      texte=self.genea[niveau]
+      for c in commande.childNodes :
+          if c.name == texte : 
+             niveau = niveau+1
+             return self.cherche_mot(niveau,c)
+      return None
+
+   def verif(self,commande):
+      bool=self.cherche_mot(0,commande)
+      if bool : return 0
+      return 1
+
 #-------------------------------
 class MCsousMCFaPourValeur :
 #------------------------------
@@ -156,5 +177,5 @@ class MCaPourValeur :
          bool=1
       return bool
 
-dictionnaire_regle={"existe":existe,"existeMCFParmi":existeMCFParmi,"existeMCsousMCF":existeMCsousMCF,"nexistepasMCsousMCF":nexistepasMCsousMCF,"MCsousMCFaPourValeur":MCsousMCFaPourValeur,"MCaPourValeur":MCaPourValeur}
+dictionnaire_regle={"existe":existe,"nexistepas":nexistepas,"existeMCFParmi":existeMCFParmi,"existeMCsousMCF":existeMCsousMCF,"nexistepasMCsousMCF":nexistepasMCsousMCF,"MCsousMCFaPourValeur":MCsousMCFaPourValeur,"MCaPourValeur":MCaPourValeur}
 SansRegle=pasDeRegle()
index 80d2ede45068a15f24c7ce0e79a90ae64943a255..13647f1e0aeeb3cc9aa514596f581ae1691b17ee 100644 (file)
@@ -23,7 +23,7 @@ from dictErreurs  import GenereErreurPourCommande
 import calcG
 
 
-atraiter=( "DEFI_MAILLAGE","CALC_VECT_ELEM","DYNA_NON_LINE","STAT_NON_LINE","FACT_LDLT","FACT_GRAD","RESO_LDLT","RESO_GRAD","DYNA_TRAN_MODAL","NORM_MODE","MACRO_MODE_MECA","POST_RCCM","THER_NON_LINE","THER_LINEAIRE","THER_NON_LINE_MO","DEFI_CABLE_BP","GENE_VARI_ALEA","DEFI_MATERIAU","IMPR_MATRICE","CALC_G","CALC_MATR_ELEM")
+atraiter=( "DEFI_MAILLAGE","CALC_VECT_ELEM","DYNA_TRAN_EXPLI","DYNA_NON_LINE","STAT_NON_LINE","FACT_LDLT","FACT_GRAD","RESO_LDLT","RESO_GRAD","DYNA_TRAN_MODAL","NORM_MODE","MACRO_MODE_MECA","POST_RCCM","THER_NON_LINE","THER_LINEAIRE","THER_NON_LINE_MO","DEFI_CABLE_BP","GENE_VARI_ALEA","DEFI_MATERIAU","IMPR_MATRICE","CALC_G","CALC_MATR_ELEM","MACR_ADAP_MAIL","MACR_INFO_MAIL","REST_BASE_PHYS","COMB_SISM_MODAL","TEST_FICHIER","MACR_ELEM_DYNA","CREA_CHAMP","AFFE_CHAR_MECA","AFE_CHAR_MECA_F")
 
 def traduc(infile,outfile,flog=None):
 
@@ -35,7 +35,7 @@ def traduc(infile,outfile,flog=None):
     parseKeywords(root)
     
     ####################### traitement erreurs ########################
-    GenereErreurPourCommande(jdc,("POST_RCCM"))
+    GenereErreurPourCommande(jdc,("POST_RCCM","DEFI_MATERIAU","TEST_FICHIER","DYNA_NON_LINE"))
 
     ####################### traitement Sous-Structuration  #######################
     renameMotCleInFact(jdc,"DEFI_MAILLAGE","DEFI_SUPER_MAILLE","MACR_ELEM_STAT","MACR_ELEM")
@@ -44,6 +44,10 @@ def traduc(infile,outfile,flog=None):
     renameMotCleInFact(jdc,"CALC_VECT_ELEM","SOUS_STRUC","MAILLE","SUPER_MAILLE")
     #########################################################################
 
+    ####################### traitement MACR_ELEM_DYNA #######################
+    removeMotCle(jdc,"MACR_ELEM_DYNA","OPTION")
+    #########################################################################
+
     ####################### traitement Resolution lineaire ######################
     renameMotCle(jdc,"RESO_LDLT","MATR_FACT","MATR")
     renameMotCle(jdc,"RESO_GRAD","MATR_ASSE","MATR")
@@ -58,13 +62,21 @@ def traduc(infile,outfile,flog=None):
     removeMotCle(jdc,"DYNA_TRAN_MODAL","NB_MODE_DIAG")
     #########################################################################
 
-    ####################### traitement MASS_INER dans NORM_MODE ##########
-    removeMotCle(jdc,"NORM_MODE","MASSE_INER")
-    removeMotCleInFact(jdc,"MACRO_MODE_MECA","NORM_MODE","MASSE_INER")
+    ############# traitement MASS_INER dans NORM_MODE/MACRO_MODE_MECA ##########
+    removeMotCle(jdc,"NORM_MODE","MASS_INER")
+    removeMotCleInFact(jdc,"MACRO_MODE_MECA","NORM_MODE","MASS_INER")
     #########################################################################
 
     ####################### traitement POST_RCCM ############################
     removeMotCleInFactSiRegleAvecErreur(jdc,"POST_RCCM","SITUATION","NUME_PASSAGE",((("TYPE_RESU_MECA","TUYAUTERIE",jdc),"MCaPourValeur"),))
+    chercheOperInsereFacteurSiRegle(jdc,"POST_RCCM","SEISME", ((("SITUATION","NB_CYCL_SEISME"),"existeMCsousMCF"),))
+    moveMotCleFromFactToFact(jdc,"POST_RCCM","SITUATION","NB_CYCL_SEISME","SEISME")
+#    AjouteMotClefDansFacteurSiRegle(jdc,"POST_RCCM","SITUATION", "transferez_au_bloc_SEISME_CHAR_ETAT_NB_OCCUR,NUME_SITU,NUME_GROUP_et_eventuellement_NOM_SITU_et_NUME_RESU_THER",((("SITUATION","NB_CYCL_SEISME"),"existeMCsousMCF"),))
+    AjouteMotClefDansFacteurSiRegle(jdc,"POST_RCCM","SITUATION","supprimez_a_la_main_ce_bloc",((("SITUATION","NB_CYCL_SEISME"),"existeMCsousMCF"),))
+#    removeMotCleInFactSiRegleAvecErreur(jdc,"POST_RCCM","SITUATION","NB_CYCL_SEISME",((("SITUATION","NB_CYCL_SEISME"),"existeMCsousMCF"),))
+    removeMotCleInFactSiRegle(jdc,"POST_RCCM","SITUATION","NB_CYCL_SEISME",((("SITUATION","NB_CYCL_SEISME"),"existeMCsousMCF"),))
+    removeMotCleInFact(jdc,"POST_RCCM","CHAR_MECA","TYPE_CHAR",)
+    removeMotCleInFact(jdc,"POST_RCCM","RESU_MECA","TYPE_CHAR",)
     #########################################################################
 
     ####################### traitement THER_NON_LINE ############################
@@ -100,6 +112,33 @@ def traduc(infile,outfile,flog=None):
     removeMotCleAvecErreur(jdc,"DEFI_MATERIAU","APPUI_ELAS")
     removeMotCleAvecErreur(jdc,"DEFI_MATERIAU","ZIRC_EPRI")
     removeMotCleAvecErreur(jdc,"DEFI_MATERIAU","ZIRC_CYRA2")
+    # BARCELONE
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","MU","BARCELONE")
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","PORO","BARCELONE")
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","LAMBDA","BARCELONE")
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","KAPPA","BARCELONE")
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","M","BARCELONE")
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","PRES_CRIT","BARCELONE")
+    moveMotCleFromFactToFact(jdc,"DEFI_MATERIAU","CAM_CLAY","PA","BARCELONE")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","CAM_CLAY","PA","KCAM")
+    # CAM_CLAY
+    AjouteMotClefDansFacteur(jdc,"DEFI_MATERIAU","CAM_CLAY","MU=xxx",)
+    AjouteMotClefDansFacteurSiRegle(jdc,"DEFI_MATERIAU","CAM_CLAY","PTRAC=XXX",((("CAM_CLAY","KCAM"),"existeMCsousMCF"),))
+    # VENDOCHAB
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB","S_VP","S")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB","N_VP","N")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB","M_VP","UN_SUR_M", erreur=1)
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB","K_VP","UN_SUR_K")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB","SEDVP1","ALPHA_D")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB","SEDVP2","BETA_D")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB_FO","S_VP","S")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB_FO","N_VP","N")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB_FO","M_VP","UN_SUR_M", erreur=1)
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB_FO","K_VP","UN_SUR_K")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB_FO","SEDVP1","ALPHA_D")
+    renameMotCleInFact(jdc,"DEFI_MATERIAU","VENDOCHAB_FO","SEDVP2","BETA_D")
+    # GLRC 
+    renameCommandeSiRegle(jdc,"DEFI_MATERIAU","DEFI_GLRC", ((("GLRC_DAMAGE","GLRC_ACIER",),"existeMCFParmi"),))
     #########################################################################
 
     ####################### traitement IMPR_MATRICE ######################
@@ -107,6 +146,17 @@ def traduc(infile,outfile,flog=None):
     removeCommandeSiRegleAvecErreur(jdc,"IMPR_MATRICE",((("MATR_ASSE","FORMAT","RESULTAT",jdc),"MCsousMCFaPourValeur"),))
     #########################################################################
 
+    ####################### traitement MACR_ADAP/INFO_MAIL ######################
+    dadap_mail={"V8_11":"V9_5", "V8_N":"V9_N", "V8_N_PERSO":"V9_N_PERSO"}
+    ChangementValeur(jdc,"MACR_ADAP_MAIL","VERSION_HOMARD",dadap_mail)
+    ChangementValeur(jdc,"MACR_INFO_MAIL","VERSION_HOMARD",dadap_mail)
+    #########################################################################
+
+    ####################### traitement REST_BASE_PHYS ######################
+    renameCommandeSiRegle(jdc,"REST_BASE_PHYS","REST_SOUS_STRUC", ((("RESULTAT","SQUELETTE","SOUS_STRUC","BASE_MODALE","CYCLIQUE","SECTEUR"),"existeMCFParmi"),))
+    renameCommandeSiRegle(jdc,"REST_BASE_PHYS","REST_COND_TRAN", ((("MACR_ELEM_DYNA","RESU_PHYS"),"existeMCFParmi"),))
+    renameCommande(jdc,"REST_BASE_PHYS","REST_GENE_PHYS", )
+    #########################################################################
 
     ####################### traitement CALC_G ######################
     removeMotCleSiRegleAvecErreur(jdc,"CALC_G","OPTION",((("OPTION","G_LAGR",jdc),"MCaPourValeur"),))
@@ -116,12 +166,58 @@ def traduc(infile,outfile,flog=None):
     removeMotCle(jdc,"CALC_G","DIRE_THETA_LAGR")
     #########################################################################
 
+    ####################### traitement COMB_SISM_MODAL ######################
+    AjouteMotClefDansFacteurSiRegle(jdc,"COMB_SISM_MODAL","EXCIT","MULTI_APPUI='DECORRELE'", ((("EXCIT","MONO_APPUI"),"nexistepasMCsousMCF"),))
+    #########################################################################
+
+    ####################### traitement TEST_FICHIER ######################
+    renameMotCleAvecErreur(jdc,"TEST_FICHIER","NB_CHIFFRE","NB_VALE")
+    removeMotCle(jdc,"TEST_FICHIER","EPSILON")
+    #########################################################################
+
     ####################### traitement CALC_MATR_ELEM ######################
     removeMotCleSiRegle(jdc,"CALC_MATR_ELEM","OPTION",((("OPTION","RIGI_MECA_LAGR",jdc),"MCaPourValeur"),))
     removeMotCleAvecErreur(jdc,"CALC_MATR_ELEM","PROPAGATION")
     removeMotCle(jdc,"CALC_MATR_ELEM","THETA")
     #########################################################################
 
+    ####################### traitement ITER_INTE_PAS ######################
+    removeMotCleInFactSiRegle(jdc,"STAT_NON_LINE","COMP_INCR","ITER_INTE_PAS",((("COMP_INCR","DEFORMATION","SIMO_MIEHE",jdc),"MCsousMCFaPourValeur"),))
+    removeMotCleInFactSiRegle(jdc,"DYNA_NON_LINE","COMP_INCR","ITER_INTE_PAS",((("COMP_INCR","DEFORMATION","SIMO_MIEHE",jdc),"MCsousMCFaPourValeur"),))
+    #########################################################################
+
+    ################## traitement RECH_LINEAIRE et PILOTAGE dans DYNA_NON_LINE #################
+    removeMotCleAvecErreur(jdc,"DYNA_NON_LINE","RECH_LINEAIRE")
+    removeMotCleAvecErreur(jdc,"DYNA_NON_LINE","PILOTAGE")
+    #########################################################################
+
+    ####################### traitement DYNA_TRAN_EXPLI ######################
+    renameOper(jdc,"DYNA_TRAN_EXPLI","DYNA_NON_LINE")
+    AjouteMotClefDansFacteur(jdc,"DYNA_NON_LINE","TCHAMWA","FORMULATION='ACCELERATION'")
+    AjouteMotClefDansFacteur(jdc,"DYNA_NON_LINE","DIFF_CENT","FORMULATION='ACCELERATION'")
+    #########################################################################
+
+    ####################### traitement SCHEMA_TEMPS dans DYNA_NON_LINE ######################
+    AjouteMotClefDansFacteur(jdc,"DYNA_NON_LINE","NEWMARK","FORMULATION='DEPLACEMENT'")
+    AjouteMotClefDansFacteur(jdc,"DYNA_NON_LINE","HHT","FORMULATION='DEPLACEMENT'")
+    AjouteMotClefDansFacteur(jdc,"DYNA_NON_LINE","TETA_METHODE","FORMULATION='DEPLACEMENT'")
+    renameMotCleInFact(jdc,"DYNA_NON_LINE","NEWMARK","ALPHA","BETA",)
+    renameMotCleInFact(jdc,"DYNA_NON_LINE","NEWMARK","DELTA","GAMMA",)
+    renameMotCleInFact(jdc,"DYNA_NON_LINE","TETA_METHODE","TETA","THETA",)
+    AjouteMotClefDansFacteurSiRegle(jdc,"DYNA_NON_LINE","NEWMARK","SCHEMA='NEWMARK'",((("NEWMARK",),"existeMCFParmi"),))
+    AjouteMotClefDansFacteurSiRegle(jdc,"DYNA_NON_LINE","TETA_METHODE","SCHEMA='THETA_METHODE'",((("TETA_METHODE",),"existeMCFParmi"),))
+    AjouteMotClefDansFacteurSiRegle(jdc,"DYNA_NON_LINE","HHT","SCHEMA='HHT'",((("HHT",),"existeMCFParmi"),))
+    AjouteMotClefDansFacteurSiRegle(jdc,"DYNA_NON_LINE","TCHAMWA","SCHEMA='TCHAMWA'",((("TCHAMWA",),"existeMCFParmi"),))
+    AjouteMotClefDansFacteurSiRegle(jdc,"DYNA_NON_LINE","DIFF_CENT","SCHEMA='DIFF_CENT'",((("DIFF_CENT",),"existeMCFParmi"),))
+    renameMotCle(jdc,"DYNA_NON_LINE","NEWMARK","SCHEMA_TEMPS")
+    renameMotCle(jdc,"DYNA_NON_LINE","TETA_METHODE","SCHEMA_TEMPS")
+    renameMotCle(jdc,"DYNA_NON_LINE","HHT","SCHEMA_TEMPS")
+    renameMotCle(jdc,"DYNA_NON_LINE","DIFF_CENT","SCHEMA_TEMPS")
+    renameMotCle(jdc,"DYNA_NON_LINE","TCHAMWA","SCHEMA_TEMPS")
+    removeMotCleInFact(jdc,"DYNA_NON_LINE","INCREMENT","EVOLUTION")
+    moveMotClefInOperToFact(jdc,"DYNA_NON_LINE","STOP_CFL","SCHEMA_TEMPS")
+    #########################################################################
+
     ####################### traitement CONTACT ######################
     removeMotCleInFact(jdc,"DEFI_MATERIAU","DIS_CONTACT","KT_ULTM")
     removeMotCleInFact(jdc,"DEFI_MATERIAU","DIS_CONTACT","EFFO_N_INIT")
@@ -146,19 +242,19 @@ def traduc(infile,outfile,flog=None):
     ChangementValeurDsMCF(jdc,"STAT_NON_LINE","COMP_INCR","RELATION",dGrilles)
     ChangementValeurDsMCF(jdc,"DYNA_NON_LINE","COMP_INCR","RELATION",dGrilles)
 
+    renameCommandeSiRegle(jdc,"AFFE_CHAR_MECA_F","AFFE_CHAR_MECA",((("CONTACT",),"existeMCFParmi"),))
     removeMotCleInFact(jdc,"AFFE_CHAR_MECA","CONTACT","RECHERCHE")
+    removeMotCleInFact(jdc,"AFFE_CHAR_MECA","CONTACT","PROJECTION")
     removeMotCleInFact(jdc,"AFFE_CHAR_MECA","CONTACT","VECT_Y")
     removeMotCleInFact(jdc,"AFFE_CHAR_MECA","CONTACT","VECT_ORIE_POU")
+    removeMotCleInFact(jdc,"AFFE_CHAR_MECA","CONTACT","MODL_AXIS")
+    dAppariement={"MAIT_ESCL_SYME":"MAIT_ESCL"}
+    ChangementValeurDsMCF(jdc,"AFFE_CHAR_MECA","CONTACT","APPARIEMENT",dAppariement)
 
-    renameCommandeSiRegle(jdc,"AFFE_CHAR_MECA_F","AFFE_CHAR_MECA",((("CONTACT",),"existeMCFParmi"),))
-    #########################################################################
-
-    ####################### traitement CAM_CLAY ######################
-    AjouteMotClefDansFacteur(jdc,"DEFI_MATERIAU","CAM_CLAY","MU=xxx",)
     #########################################################################
 
-    ####################### traitement GLRC ######################
-    renameCommandeSiRegle(jdc,"DEFI_MATERIAU","DEFI_GLRC", ((("GLRC_DAMAGE","GLRC_ACIER",),"existeMCFParmi"),))
+    ####################### traitement CREA_CHAMP ######################
+    chercheOperInsereFacteurSiRegle(jdc,"CREA_CHAMP","PRECISION=1.E-3,", ((("PRECISION",),"nexistepas"),(("CRITERE",),"existe"),),0)
     #########################################################################
 
     f=open(outfile,'w')