Salome HOME
VirtualPolymer
authorpascale.noyret <pascale.noyret@edf.fr>
Thu, 20 Apr 2017 08:09:11 +0000 (10:09 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Thu, 20 Apr 2017 08:09:11 +0000 (10:09 +0200)
VirtualPolymer/Readme.tx [deleted file]
VirtualPolymer/VP_Cata_V1.py.equation [deleted file]
VirtualPolymer/VP_Cata_V1.py.ok [deleted file]
VirtualPolymer/toto_VP.py [deleted file]

diff --git a/VirtualPolymer/Readme.tx b/VirtualPolymer/Readme.tx
deleted file mode 100644 (file)
index b3d7bd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-source opt/MAP/map-2016.1/share/map/scripts/envMAP.sh
diff --git a/VirtualPolymer/VP_Cata_V1.py.equation b/VirtualPolymer/VP_Cata_V1.py.equation
deleted file mode 100644 (file)
index 5296cdb..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-# coding: utf-8\r
-import types\r
-from Accas import *\r
-import sys,os\r
-sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/mapy/components/c_pre_polymer_data_management')\r
-sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/mapy/virtual_polymer_common')\r
-sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/')\r
-import pckdb, class_data, instruction, equation_part, utils\r
-\r
-\r
-class Tuple:\r
-  def __init__(self,ntuple):\r
-    self.ntuple=ntuple\r
-\r
-  def __convert__(self,valeur):\r
-    if type(valeur) == types.StringType: return None\r
-    if len(valeur) != self.ntuple: return None\r
-    return valeur\r
-\r
-  def info(self):\r
-    return "Tuple de %s elements" % self.ntuple\r
-\r
-  __repr__=info\r
-  __str__=info\r
-\r
-#class ObjetUtilisateur(ASSD): pass\r
-\r
-class classeVisuEquation :\r
-   def __init__(self,dicoListeAffiche):\r
-      self.dicoListeAffiche=dicoListeAffiche\r
-   \r
-\r
-def maFunc():\r
-    return ('a1','a2','a3')\r
-     \r
-def maFuncWithArg(monMC):\r
-    if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
-    monMC.dsMaFunct = True\r
-\r
-    editor=monMC.jdc.editor\r
-    if monMC.valeur == 'POOH->P' : monInto=('a1','a2','a3')\r
-    else : monInto=('b1','b2','b3')\r
-\r
-    change=editor.changeIntoDefMC('AGING', ('Equation', 'b_approved','b_type_creation','Equation_Modification','Type2'), monInto )\r
-    if change :\r
-       print ('j ai change le into')\r
-       editor.reCalculeValiditeMCApresChgtInto('AGING', 'Type2', ('Equation', 'b_approved','b_type_creation','Equation_Modification')) \r
-       if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
-\r
-    monMC.dsMaFunct = False\r
-\r
-def recupereDicoGenerique(monMC):\r
-    if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
-    print ('je passe dans la recuperation')\r
-    editor=monMC.jdc.editor\r
-    valeurDB=editor.getValeur('Equation','Equation_DB',())\r
-    print ('valeurDB',valeurDB)\r
-    correspond=pckdb.DBRENAME\r
-    if valeurDB != None :\r
-       listEquation, listModele,listePostTraitement=pckdb.read_pckdb(correspond[valeurDB])\r
-       print (listEquation, listModele,listePostTraitement)\r
-    monMC.dsMaFunct = False\r
-    return listEquation, listModele,listePostTraitement\r
-\r
-def recupereDicoEquation(monMC):\r
-    if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
-    listEquation, listModele,listePostTraitement=recupereDicoGenerique(monMC)\r
-    editor=monMC.jdc.editor\r
-\r
-    valeurEquationListe=editor.getValeur('Equation','Equation_Liste',('b_type_show',))\r
-    valeurAgingType=editor.getValeur('Equation','Equation_reaction',('b_type_show','b_reaction_type',))\r
-    if valeurAgingType == None :\r
-       print ('dans reaction-type')\r
-       valeurAgingType=editor.getValeur('Equation','Equation_reaction',('b_type_show','b_aging_type',))\r
-    if valeurAgingType == None : monMC.dsMaFunct = False; return\r
-\r
-    print ('valeurType',valeurAgingType)\r
-    listeEquationPourIhm = []\r
-    listeReprEquationPourIhm = []\r
-    dicoListeAffiche={}\r
-    for equation in listEquation :\r
-        if valeurEquationListe == 'aging_type' :\r
-           if equation.type_vieil == valeurAgingType : \r
-              listeEquationPourIhm.append(equation)\r
-              listeReprEquationPourIhm.append(equation.representation)\r
-              dicoListeAffiche[equation.representation]=equation\r
-        else:\r
-           if equation.type_react == valeurAgingType : \r
-              listeEquationPourIhm.append(equation)\r
-              listeReprEquationPourIhm.append(equation.representation)\r
-              dicoListeAffiche[equation.representation]=equation\r
-    change=editor.changeIntoDefMC('Equation', ('b_type_show','ListeEquation'), listeReprEquationPourIhm )\r
-    if change :\r
-       editor.reCalculeValiditeMCApresChgtInto('Equation', 'listeEquation', ('b_type_show',)) \r
-       if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
-    editor.maClasseVisuEquation = classeVisuEquation(dicoListeAffiche)\r
-    monMC.dsMaFunct = False\r
-\r
-def afficheValeurEquation(monMC):\r
-    if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
-    editor=monMC.jdc.editor\r
-    valeur=monMC.valeur\r
-    if valeur == None : \r
-       monMC.dsMaFunct = False\r
-       return\r
-    print (editor.maClasseVisuEquation.dicoListeAffiche[valeur])\r
-    print(str (editor.maClasseVisuEquation.dicoListeAffiche[valeur]))\r
-    editor.maClasseVisuEquation.valeurEquationChoisie=valeur\r
-    monMC.dsMaFunct = False\r
-              \r
-\r
-def instancieChemicalFormulation(monMC):\r
-    if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
-    if monMC.valeur == False : return\r
-\r
-    editor=monMC.jdc.editor\r
-    if hasattr(editor,'dsMaFunct') and editor.dsMaFunct== True : return\r
-    editor.dsMaFunct = True\r
-\r
-    print ('ds instancie')\r
-    v=editor.maClasseVisuEquation.valeurEquationChoisie\r
-    monEquation=editor.maClasseVisuEquation.dicoListeAffiche[v]\r
-    type_react=monEquation.type_react\r
-    type_vieil=monEquation.type_vieil\r
-    print (v, type_react, type_vieil)\r
-    #editor.changeIntoMCandSet('Equation', ('b_type_show','b_modification','b_modif','ChemicalFormulation'),( v,),v )\r
-    change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Reaction_Type'),type_react )\r
-    change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Aging_Type'), type_vieil )\r
-\r
-    for index,valeurConstituant in enumerate(monEquation.constituants):\r
-        valeurEquation=monEquation.equation[index] \r
-        editor.ajoutMC(monMC.etape,'OptionnelConstituant',None,('b_type_show','b_modification','b_modif',))\r
-        print (index,valeurConstituant,valeurEquation)\r
-\r
-            #OptionnelConstituant =  FACT ( statut = 'f',max = '**',\r
-            #    Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
-            #    Differential_Equation =  SIMP(statut= 'o',typ= 'TXM'),\r
-    for index,valeurConstituant in enumerate(monEquation.const_cine_nom):\r
-         valeurArrhe=monEquation.arrhenius[index] \r
-         if valeurArrhe : valeurConstanteType='Arrhenius type'\r
-         else           : valeurConstanteType='non Arrhenius type'\r
-\r
-         print (index,valeurConstituant,valeurConstanteType)\r
-            #OptionnelleConstante  = FACT (statut = 'f', max = '**',\r
-            #     ConstanteName= SIMP (statut = 'o', typ = 'TXM',),\r
-            #    ConstanteType =  SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
-    change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Commentaire'),monEquation.comment )\r
-    print (monEquation.comment )\r
-    #if change :\r
-    if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
-    monMC.dsMaFunct = False\r
-    editor.dsMaFunct = False\r
\r
-\r
-\r
-monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization')}\r
-\r
-JdC = JDC_CATA(code='VP',\r
-               execmodul=None,\r
-                )\r
-\r
-\r
-  \r
-#---------------------------------\r
-Equation = PROC (nom="Equation",\r
-      op=None,\r
-#---------------------------------\r
-      Equation_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base") ),\r
-      Equation_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show equation database", "Equation creation"),),\r
-\r
-      \r
-#     ---------------------------------------------------------------------------\r
-       b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",\r
-#      ---------------------------------------------------------------------------\r
-        Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),\r
-\r
-         b_reaction_type =  BLOC(condition = " Equation_Liste  == 'reaction_type'",\r
-           Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],siValide=recupereDicoEquation),\r
-         ), # Fin b_reaction_type\r
-\r
-         b_aging_type =  BLOC(condition = " Equation_Liste  == 'aging_type'",\r
-              Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),siValide=recupereDicoEquation),\r
-         ), # Fin b_reaction_type\r
-\r
-         ListeEquation = SIMP(statut='o', typ='TXM',  homo='SansOrdreNiDoublon',siValide=afficheValeurEquation),\r
-         b_modification = BLOC(condition = " ListeEquation != None ",\r
-           modification = SIMP(typ = bool, statut = 'o',defaut = False, fr='toto', ang='toto en anglais', siValide=instancieChemicalFormulation),\r
-           \r
-           b_modif = BLOC(condition = "modification == True",\r
-            Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),\r
-            Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
-\r
-            OptionnelConstituant =  FACT ( statut = 'f',max = '**',\r
-                Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
-                Differential_Equation =  SIMP(statut= 'o',typ= 'TXM'),\r
-               ), # fin Const_Equa\r
-            OptionnelleConstante  = FACT (statut = 'f', max = '**',\r
-                  ConstanteName= SIMP (statut = 'o', typ = 'TXM',),\r
-                  ConstanteType =  SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
-                  ),# fin ConstanteOptionnelle\r
-            Commentaire =  SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
-\r
-           ),# fin b_modif\r
-         \r
-         ), # fin b_modification\r
-       ), # Fin b_type_show\r
-\r
-\r
-#     ---------------------------------------------------------------------------\r
-      b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",\r
-#         ---------------------------------------------------------------------------\r
-         Equation_Modification = FACT ( statut = 'o',\r
\r
-            ChemicalFormulation = SIMP(statut='o', typ='TXM', defaut = 'POOH -> 2P'),\r
-\r
-            Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),\r
-            Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
-\r
-            Constituants = FACT ( statut = 'o',\r
-               ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',), defaut= 'POOH'),\r
-               b_pooh =  BLOC(condition = " ConstituantPOOH == 'POOH'" ,\r
-                  Differential_Equation =  SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),\r
-               ), # Fin b_pooh\r
-               ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',),defaut='P'),\r
-               b_p =  BLOC(condition = " ConstituantP == 'P'" ,\r
-                 Differential_Equation =  SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),\r
-               ), # Fin b_p\r
-            OptionnelConstituant =  FACT ( statut = 'f',max = '**',\r
-                Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
-                Differential_Equation =  SIMP(statut= 'o',typ= 'TXM'),\r
-               ), # fin Const_Equa\r
-            ),# Fin Constituants\r
-\r
-            Constante = FACT ( statut = 'o',\r
-               Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),\r
-               b_cku1 =  BLOC(condition = "Constanteku1 == 'ku1'" ,\r
-                  ConstanteType =  SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
-                  ),\r
-               OptionnelleConstante  = FACT (statut = 'f', max = '**',\r
-                  ConstanteName= SIMP (statut = 'o', typ = 'TXM',),\r
-                  ConstanteType =  SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
-                  ),# fin ConstanteOptionnelle\r
-            ), # fin constante\r
-            Commentaire =  SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
-                  \r
-         ), # Fin Equation_Modification\r
-\r
-                 #Chemical_Formulation =  SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),\r
-                 #Type1 = SIMP(statut='o', typ = 'TXM', into=maFunc),\r
-                 #Type2 = SIMP(statut='o', typ = 'TXM'),\r
-\r
-        ),  # fin b_type_creation\r
-                 \r
-      \r
-) # Fin Equation\r
-\r
-Modele = PROC (nom="Modele",\r
-      op=None,\r
-      Commentaire =  SIMP (statut = 'f', typ = 'TXM'),\r
-) # Fin Modele\r
diff --git a/VirtualPolymer/VP_Cata_V1.py.ok b/VirtualPolymer/VP_Cata_V1.py.ok
deleted file mode 100644 (file)
index 1e72067..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-# coding: utf-8\r
-import types\r
-from Accas import *\r
-\r
-\r
-class Tuple:\r
-  def __init__(self,ntuple):\r
-    self.ntuple=ntuple\r
-\r
-  def __convert__(self,valeur):\r
-    if type(valeur) == types.StringType: return None\r
-    if len(valeur) != self.ntuple: return None\r
-    return valeur\r
-\r
-  def info(self):\r
-    return "Tuple de %s elements" % self.ntuple\r
-\r
-  __repr__=info\r
-  __str__=info\r
-\r
-#class ObjetUtilisateur(ASSD): pass\r
-\r
-def maFunc():\r
-    return ('a1','a2','a3')\r
-     \r
-def maFuncWithArg(monMC):\r
-    if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
-    monMC.dsMaFunct = True\r
-\r
-    editor=monMC.jdc.editor\r
-    if monMC.valeur == 'POOH->P' : monInto=('a1','a2','a3')\r
-    else : monInto=('b1','b2','b3')\r
-\r
-    change=editor.changeIntoDefMC('AGING', ('Equation', 'b_approved','b_type_creation','Equation_Modification','Type2'), monInto )\r
-    if change :\r
-       print ('j ai change le into')\r
-       editor.reCalculeValiditeMCApresChgtInto('AGING', 'Type2', ('Equation', 'b_approved','b_type_creation','Equation_Modification')) \r
-       if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
-\r
-    monMC.dsMaFunct = False\r
-\r
-\r
-\r
-monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization')}\r
-\r
-JdC = JDC_CATA(code='VP',\r
-               execmodul=None,\r
-                )\r
-\r
-\r
-AGING = PROC (nom="AGING",\r
-    op=None,\r
-  \r
-#---------------------------------\r
-    Equation  = FACT(statut= 'o',\r
-#---------------------------------\r
-      Equation_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base") ),\r
-      Equation_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show equation database", "Equation creation"),),\r
-\r
-#     ---------------------------------------------------------------------------\r
-       b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",\r
-#      ---------------------------------------------------------------------------\r
-        Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),\r
-\r
-         b_reaction_type =  BLOC(condition = " Equation_Liste  == 'reaction_type'",\r
-           Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],),\r
-         ), # Fin b_reaction_type\r
-\r
-         b_aging_type =  BLOC(condition = " Equation_Liste  == 'aging_type'",\r
-              Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),),\r
-         ), # Fin b_reaction_type\r
-\r
-         ), # Fin b_type_show\r
-\r
-#     ---------------------------------------------------------------------------\r
-      b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",\r
-#         ---------------------------------------------------------------------------\r
-         Equation_Modification = FACT ( statut = 'o',\r
-            Chemical_Formulation =  SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P'),\r
-            Equation_reaction1=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),\r
-            Equation_reaction2=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
-\r
-            Constituants = FACT ( statut = 'o',\r
-               ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',), defaut= 'POOH'),\r
-               b_pooh =  BLOC(condition = " ConstituantPOOH == 'POOH'" ,\r
-                  Differential_Equation =  SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),\r
-               ), # Fin b_pooh\r
-               ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',),defaut='P'),\r
-               b_p =  BLOC(condition = " ConstituantP == 'P'" ,\r
-                 Differential_Equation =  SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),\r
-               ), # Fin b_p\r
-            OptionnelConstituant =  FACT ( statut = 'f',max = '**',\r
-                Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
-                Differential_Equation =  SIMP(statut= 'o',typ= 'TXM'),\r
-               ), # fin Const_Equa\r
-            ),# Fin Constituants\r
-\r
-            Constante = FACT ( statut = 'o',\r
-               Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),\r
-               b_cku1 =  BLOC(condition = "Constanteku1 == 'ku1'" ,\r
-                  ConstanteType =  SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
-                  ),\r
-               ConstanteOptionnelle  = FACT (statut = 'f', max = '**',\r
-                  ConstanteName= SIMP (statut = 'o', typ = 'TXM',),\r
-                  ConstanteType =  SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
-                  ),# fin ConstanteOptionnelle\r
-            ), # fin constante\r
-            Commentaire =  SIMP (statut = 'f', typ = 'TXM'),\r
-                  \r
-         ), # Fin Equation_Modification\r
-\r
-\r
-                 #Chemical_Formulation =  SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),\r
-                 #Type1 = SIMP(statut='o', typ = 'TXM', into=maFunc),\r
-                 #Type2 = SIMP(statut='o', typ = 'TXM'),\r
-\r
-        ),  # fin b_type_creation\r
-                 \r
-      \r
-    ), # Fin Equation\r
-)\r
-\r
-TEXTE_NEW_JDC="AGING()"\r
diff --git a/VirtualPolymer/toto_VP.py b/VirtualPolymer/toto_VP.py
deleted file mode 100644 (file)
index 006f2a8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-def model_saved(listeparam) :
-    editor=listeparam[0]
-    print (editor)
-    print (editor.process_VP())
-
-# le dictionnaire des commandes a la structure suivante :
-# la clef est la commande qui va proposer l action
-# puis un tuple qui contient
-#      - la fonction a appeler
-#       - le label dans le menu du clic droit
-#      - un tuple contenant les parametres attendus par la fonction
-#      - appelable depuis Salome uniquement -)
-#      - appelable depuis un item valide uniquement 
-#      - toolTip
-dict_commandes={
-       'Equation':((model_saved,"model_saved",('editor','self'),False,True,""),),
-               }