]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
PN : merge version CC + modifs nouvelles régles
authorPascale Noyret <pascale.noyret@edf.fr>
Mon, 11 Sep 2006 10:05:26 +0000 (10:05 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Mon, 11 Sep 2006 10:05:26 +0000 (10:05 +0000)
Traducteur/jdcparser.py

index 20d2d1a439cd0362a2aa2b780bbce39f5a733dff..d150315cb4c6fdf56544356db70faef829ef8956 100644 (file)
@@ -18,7 +18,8 @@ import movemocle
 import inseremocle
 
 atraiter=("IMPR_GENE","CALC_FONCTION", "DEFI_MATERIAU","STAT_NON_LINE",
-          "CALC_G_LOCAL_T","CALC_G_THETA_T","CALC_G",
+          "CALC_G_LOCAL_T","CALC_G_THETA_T","CALC_G","AFFE_CHAR_MECA",
+          "AFFE_CHAR_THER_F","IMPR_CO","DEFI_SQUELETTE",
         )
 
 #atraiter=("CALC_FONCTION","IMPR_GENE","STAT_NON_LINE","DEFI_MATERIAU",
@@ -49,32 +50,37 @@ def traduc(infile,outfile):
     
     #  A decommenter a partir d ici
     #          les arguments sont jdc,ancien-nom-de-commande,nouveau-nom-de-commande
-    renamemocle.renameCommande(jdc,"CALC_FONCTION","INFO_FONCTION")
+
+
+    renamemocle.renameCommandeSiRegle(jdc,"CALC_FONCTION","INFO_FONCTION", ((("RMS","MAX","NOCI_SEISME","NORME","ECART-TYPE"),"existeMCFParmi"),))
 
     #          Les arguments sont  - jdc,
-    #                         - nom de la procedure (pas teste avec autre chose)
-    #                         - nom du mot clef facteur contenant, 
-    #                         - nom du mot cle simple
+    #                              - nom de la procedure (pas teste avec autre chose)
+    #                              - nom du mot clef facteur contenant,
+    #                              - nom du mot cle simple
     #          Attention ne fonctionne pas pour l instant avec +sieurs occurences du mot cle à déplacer
     movemocle.moveMotCleFromFactToFather(jdc,"IMPR_GENE","GENE","UNITE")
     movemocle.moveMotCleFromFactToFather(jdc,"IMPR_GENE","GENE","FORMAT")
 
     #          Les arguments sont  - jdc
-    #                         - nom de l operateur (pas teste avec autre chose)
-    #                         - nom du mot clef facteur source, 
-    #                         - nom du mot cle simple
-    #                         - liste de  mots clef facteur arrivée possible
+    #                              - nom de l operateur (pas teste avec autre chose)
+    #                              - nom du mot clef facteur source,
+    #                              - nom du mot cle simple
+    #                              - liste de  mots clef facteur arrivée possible
     #          Attention ne fonctionne pas pour l instant avec +sieurs occurences du mot cle à déplacer
     movemocle.moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","RESI_INTE_RELA",("COMP_INCR","COMP_ELAS"))
-
-
+    movemocle.moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","ITER_INTE_MAXI",("COMP_INCR","COMP_ELAS"))
+    movemocle.moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","ITER_INTE_PAS",("COMP_INCR","COMP_ELAS"))
+    movemocle.moveMotCleFromFactToFactMulti(jdc,"STAT_NON_LINE","CONVERGENCE","RESO_INTE",("COMP_INCR","COMP_ELAS"))
+    
+    
     renamemocle.renameMotCle(jdc,"DEFI_MATERIAU","LEMAITRE","LEMAITRE_IRRA")
     movemocle.moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","FLU_IRRA","QSR_K",("LEMAITRE_IRRA",))
     movemocle.moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","FLU_IRRA","BETA",("LEMAITRE_IRRA",))
     movemocle.moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","FLU_IRRA","PHI_ZERO",("LEMAITRE_IRRA",))
     movemocle.moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","FLU_IRRA","L",("LEMAITRE_IRRA",))
     removemocle.removeMotCle(jdc,"DEFI_MATERIAU","FLU_IRRA")
-
+    
     renamemocle.renameMotCleInFact(jdc,"DEFI_MATERIAU","GRAN_IRRA","A","GRAN_A")
     renamemocle.renameMotCleInFact(jdc,"DEFI_MATERIAU","GRAN_IRRA","B","GRAN_B")
     renamemocle.renameMotCleInFact(jdc,"DEFI_MATERIAU","GRAN_IRRA","S","GRAN_S")
@@ -82,19 +88,30 @@ def traduc(infile,outfile):
     movemocle.moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","GRAN_IRRA","GRAN_B",("LEMAITRE_IRRA",))
     movemocle.moveMotCleFromFactToFactMulti(jdc,"DEFI_MATERIAU","GRAN_IRRA","GRAN_S",("LEMAITRE_IRRA",))
     removemocle.removeMotCle(jdc,"DEFI_MATERIAU","GRAN_IRRA")
-
-    #renamemocle.renameOper(jdc,"CALC_G_LOCAL_T","CALC_G")
+    
+    renamemocle.renameOper(jdc,"CALC_G_LOCAL_T","CALC_G")
     renamemocle.renameOper(jdc,"CALC_G_THETA_T","CALC_G")
+    
     renamemocle.renameMotCle(jdc,"CALC_G","THETA","THETA_OLD")
     inseremocle.chercheOperInsereFacteur(jdc,"CALC_G","THETA")
-
     movemocle.moveMotClefInOperToFact(jdc,"CALC_G","THETA_OLD","THETA")
     renamemocle.renameMotCleInFact(jdc,"CALC_G","THETA","THETA_OLD","THETA")
+    
     movemocle.moveMotClefInOperToFact(jdc,"CALC_G","FOND_FISS","THETA")
     movemocle.moveMotClefInOperToFact(jdc,"CALC_G","R_INF_FO","THETA")
     movemocle.moveMotClefInOperToFact(jdc,"CALC_G","R_SUP_FO","THETA")
     inseremocle.chercheOperInsereFacteurSiRegle(jdc,"CALC_G","LISSAGE",((("DEGRE",),"existe"),))
     movemocle.moveMotClefInOperToFact(jdc,"CALC_G","DEGRE","LISSAGE")
+    
+    inseremocle.chercheOperInsereFacteur(jdc,"IMPR_CO","CONCEPT")
+    movemocle.moveMotClefInOperToFact(jdc,"IMPR_CO","CO","CONCEPT")
+    renamemocle.renameMotCleInFact(jdc,"IMPR_CO","CONCEPT","CO","NOM")
+    
+    inseremocle.chercheOperInsereFacteur(jdc,"DEFI_SQUELETTE","CYCLIQUE")
+    movemocle.moveMotClefInOperToFact(jdc,"DEFI_SQUELETTE","MODE_CYCL","CYCLIQUE")
+
+    removemocle.removeMotCle(jdc,"AFFE_CHAR_MECA","VERI_DDL")
+    removemocle.removeMotCle(jdc,"AFFE_CHAR_THER_F","VERI_DDL")
 
     f=open(outfile,'w')
     f.write(jdc.getSource())