From: Pascale Noyret Date: Mon, 11 Sep 2006 10:05:26 +0000 (+0000) Subject: PN : merge version CC + modifs nouvelles régles X-Git-Tag: CC_param_poursuite~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=abec590b555050fb8654355de3454c4c331881db;p=tools%2Feficas.git PN : merge version CC + modifs nouvelles régles --- diff --git a/Traducteur/jdcparser.py b/Traducteur/jdcparser.py index 20d2d1a4..d150315c 100644 --- a/Traducteur/jdcparser.py +++ b/Traducteur/jdcparser.py @@ -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())