if self.definition.validators:
valid=self.definition.validators.verif_item(item)
except ValError,e:
- #traceback.print_exc()
+ traceback.print_exc()
valid=0
return valid
"s_scc_st_2" : "Analyse statistique de données locales et expérimentales \nou numériques",
"s_scc_st_3" : "taux de couverture des joints de grains par des précipités",
"s_polymers_st_1" : "Estimation numérique 3D de la diffusion effective des gaz dans les polymères chargés",
-
+"s_rpv2" : "Essai Pascale",
+"s_DIC" : "Essai Felix",
}
dico={"oxides" : {"irradiation" : "s_oxides_st_1",
"analyse statistique" : "s_scc_st_2",
"taux de couverture" : "s_scc_st_3"},
"concrete" : {},
- "polycristals" : {},
+ "polycristals" : {"essai Pascale" : "s_rpv2",},
"polymers" : {"numerique 3D" : "s_polymers_st_1"},
"micro" : {},
"seal" : {},
"mox" : {},
"nano" : {},
- "insulator" : {}}
+ "insulator" : {},
+ "images" : {"Felix" : "s_DIC"}
+}
# Import des panels
self.groupModules.addButton(self.RBM8)
self.groupModules.addButton(self.RBM9)
self.groupModules.addButton(self.RBM10)
+ self.groupModules.addButton(self.RBM11)
self.groupScheme=QButtonGroup(self.groupBoxScheme)
self.connect(self.groupModules,SIGNAL("buttonClicked (QAbstractButton*)"),self.modifieModule)
self.connect(self.groupScheme,SIGNAL("buttonClicked (QAbstractButton*)"),self.choisitSchema)
# TODO: Remove this filter. Normally, CONFIGURATION should only define the catalogs for this code anyway.
# Non pas pour Map qui a une notion de sscode
for catalogue in all_cata_list:
+ print catalogue.code
+ print catalogue.file_format
if catalogue.code == self.code :
if (self.ssCode == None) or (self.ssCode == catalogue.file_format):
liste_cata_possibles.append(catalogue)
+ print "___________"
+ print self.ssCode
+ print self.code
if len(liste_cata_possibles)==0:
QMessageBox.critical( self.QWParent, "Import du catalogue","Pas de catalogue defini pour le code %s" % self.code)
self.appliEficas.close()
--- /dev/null
+import os
+import sys
+
+try :
+ sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'),'classes/python/'))
+ from class_MAP_parameters import *
+except :
+ pass
+
+
+#-------------------------
+class component_RBM:
+#-------------------------
+
+ def __init__(self,CS,CSJ,GS,GSJ,VMAX,VMAXJ,study_path):
+ print "RBM - BEGIN"
+ composant="RBM"
+ RBM_input = study_path+"/RBM.input"
+ parameter=MAP_parameters()
+ parameter.add_component(composant)
+ parameter.add_parameter(composant, 'CS', CS)
+ parameter.add_parameter(composant, 'CSJ', CSJ)
+ parameter.add_parameter(composant, 'GS', GS)
+ parameter.add_parameter(composant, 'GSJ', GSJ)
+ parameter.add_parameter(composant, 'VMAX', VMAX)
+ parameter.add_parameter(composant, 'VMAXJ', VMAXJ)
+ parameter.write(RBM_input)
+
+ #commande= "cd "+ commponent_dir +";"
+ #commande+= "python rbm.py -i "+RBM_input+";\n"
+ #os.system(commande)
+
+ print "RBM - END"
+
+
+#-------------------------
+class component_DISPL:
+#-------------------------
+
+ def __init__(self,CS,CSJ,GS,GSJ,VMAXJ,VMAX,study_path):
+ print "DISPL - BEGIN"
+ composant="DISPL"
+ DISPL_input = study_path+"/DISPL.input"
+ parameter=MAP_parameters()
+ parameter.add_component(composant)
+ parameter.add_parameter(composant, 'CS', CS)
+ parameter.add_parameter(composant, 'CSJ', CSJ)
+ parameter.add_parameter(composant, 'GS', GS)
+ parameter.add_parameter(composant, 'GSJ', GSJ)
+ parameter.add_parameter(composant, 'VMAX', VMAX)
+ parameter.add_parameter(composant, 'VMAXJ', VMAXJ)
+ parameter.write(DISPL_input)
+
+ #commande= "cd "+ commponent_dir +";"
+ #commande+= "python rbm.py -i "+DISPL_input+";\n"
+ #os.system(commande)
+
+ print "DISPL - END"
+
+
# (code, ssCode, catalogue, formatOut, formatIN)
('MAP','s_polymers_st_1_V1',os.path.join(rep_cata,'s_polymers_st_1_V1.py'),'s_polymers_st_1','MAP'),
('MAP','s_scc_st_2_V1',os.path.join(rep_cata,'s_scc_st_2_V1.py'),'s_scc_st_2','MAP'),
+ ('MAP','s_rpv2_V0',os.path.join(rep_cata,'s_rpv2_V0.py'),'s_rpv2','MAP'),
+ ('MAP','s_DIC_V1',os.path.join(rep_cata,'s_DIC_V1.py'),'s_DIC','MAP'),
)
<x>390</x>
<y>20</y>
<width>261</width>
- <height>311</height>
+ <height>331</height>
</rect>
</property>
<property name="title" >
<x>110</x>
<y>20</y>
<width>261</width>
- <height>311</height>
+ <height>331</height>
</rect>
</property>
<property name="title" >
</property>
</widget>
</item>
+ <item>
+ <widget class="QRadioButton" name="RBM11" >
+ <property name="text" >
+ <string>images</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QLabel" name="labelScheme" >
self.ssCode=self.config.appli.ssCode
self.INSTALLDIR=self.config.appli.INSTALLDIR
self.ssCodeDir=os.path.join(self.INSTALLDIR,'MAP/Templates',self.ssCode)
- self.fichierYacs=self.ssCode+"YACS_nodes"
+ self.fichierYacs=self.ssCode+"_YACS_nodes"
self.texteExecution="import os,sys\n"
self.texteExecution+="sys.path.append('"+self.ssCodeDir+"')\n"
self.texteExecution+="from " + self.fichierYacs +" import *\n"
text=PythonGenerator.gener(self,obj,format)
for elt in self.listeCODE:
code=elt.keys()[0]
+ self.dico=elt[code]
if code in self.__class__.__dict__.keys():
texteCode=apply(self.__class__.__dict__[code],(self,))
self.texteExecution += texteCode
Convertit un objet MCSIMP en texte python
"""
s=PythonGenerator.generMCSIMP(self,obj)
- clef=""
- for i in obj.get_genealogie() :
- clef=clef+"_"+i
- self.DictTemp[clef]=obj.valeur
+ #clef=""
+ #for i in obj.get_genealogie() :
+ # clef=clef+"_"+i
+ self.DictTemp[obj.nom]=obj.valeur
if hasattr(obj.definition,'equiv') and obj.definition.equiv!= None:
setattr(self,obj.definition.equiv,obj.valeur)
else :
--- /dev/null
+# -* coding: utf-8 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+"""
+ Ce module contient le plugin generateur de fichier au format
+ SEP pour EFICAS.
+
+"""
+import traceback
+import types,string,re,os
+
+from generator_map import MapGenerator
+
+import sys
+try :
+ sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'),'classes/python/'))
+ from class_MAP_parameters import *
+except :
+ pass
+
+
+def entryPoint():
+ """
+ Retourne les informations necessaires pour le chargeur de plugins
+
+ Ces informations sont retournees dans un dictionnaire
+ """
+ return {
+ # Le nom du plugin
+ 'name' : 's_DIC',
+ # La factory pour creer une instance du plugin
+ 'factory' : s_DICGenerator,
+ }
+
+
+class s_DICGenerator(MapGenerator):
+ """
+ Ce generateur parcourt un objet de type JDC et produit
+ un texte au format eficas et
+ un texte au format py
+
+ """
+
+ def LIST_IMAGES(self):
+ print "je ne sais pas ce qu il faut faire"
+ commande="print 'je ne sais pas ce qu il faut faire avec le fichier :"
+ commande += str(self.FILE) +" '\n"
+ return commande
+
+ def RBM(self):
+ print self.dico
+ if not self.dico.has_key('CSJ') : self.dico['CSJ']=self.dico['CS']
+ if not self.dico.has_key('GSJ') : self.dico['GSJ']=self.dico['GS']
+ if not self.dico.has_key('VMAXJ') : self.dico['VMAXJ']=self.dico['VMAX']
+ commande="execRBM=component_RBM("+str(self.dico['CS'])+","+str(self.dico['CSJ'])+","
+ commande+=str(self.dico['GS'])+","+str(self.dico['GSJ'])+","
+ commande+=str(self.dico['VMAX'])+","+str(self.dico['VMAXJ'])+",'"+str(self.study_path)+"')\n"
+ return commande
+
+ def DISPL(self):
+ print self.dico
+ if not self.dico.has_key('CSJ') : self.dico['CSJ']=self.dico['CS']
+ if not self.dico.has_key('GSJ') : self.dico['GSJ']=self.dico['GS']
+ if not self.dico.has_key('VMAXJ') : self.dico['VMAXJ']=self.dico['VMAX']
+ commande="execDISPL=component_DISPL("+str(self.dico['CS'])+","+str(self.dico['CSJ'])+","
+ commande+=str(self.dico['GS'])+","+str(self.dico['GSJ'])+","
+ commande+=str(self.dico['VMAX'])+","+str(self.dico['VMAXJ'])+",'"+str(self.study_path)+"')\n"
+ return commande