3) fichier decrivant le fuseau granulaire descendant (entree)
-
4) fichier decrivant la position et la taille des boules (sortie)
-%_PATH_PYGMEE%/pygmee_output.txt
+%__PATH_STUDY%//%_NAME_SCHEME%/pygmee_output.txt
5) fichier CAO de la morphologie (sortie)
-
6) facteur de correction de fraction volumique (entree)
rep_cata=os.getcwd()
catalogues = (
-# (ssCode,version,catalogue,formatIn)
-# ('Map','V0',os.path.join(rep_cata,'Map2_Cata_V0.py'),'map'),
- ('MAP','V1',os.path.join(rep_cata,'Map1_Cata_V0.py'),'map_OT'),
- ('MAP','V2',os.path.join(rep_cata,'Map_Openturns.py'),'map_OT'),
- ('MAP','s_poly_st_1_V1',os.path.join(rep_cata,'s_poly_st_1_V1.py'),'s_poly_st_1'),
- ('MAP','s_polymers_st_1_V1',os.path.join(rep_cata,'s_polymers_st_1_V1.py'),'s_polymers_st_1'),
- ('MAP','s_scc_st_2_V1',os.path.join(rep_cata,'s_scc_st_2_V1.py'),'s_scc_st_2'),
-# ('Map','s_poly_st_1_V2',os.path.join(rep_cata,'s_poly_st_1_V2.py'),'s_poly_st_1'),
+# (code, ssCode, catalogue, formatOut, formatIN)
+ ('MAP','s_poly_st_1_V1',os.path.join(rep_cata,'s_poly_st_1_V1.py'),'s_poly_st_1','MAP'),
+ ('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'),
)
self.savedir = self.rep_user\r
self.exec_acrobat = self.rep_user\r
\r
- self.labels_user=('exec_acrobat', 'catalogues','savedir','path_doc','map_path','PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME')\r
- self.labels_eficas=("map_path","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata","initialdir","savedir","catalogues",'PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME')\r
+ self.labels_user=('exec_acrobat', 'catalogues','savedir','path_doc','map_path','PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME','PATH_FDVGRID')\r
+ self.labels_eficas=("map_path","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata","initialdir","savedir","catalogues",'PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME','PATH_FDVGRID')\r
\r
#Lecture des fichiers utilisateurs\r
self.lecture_fichier_ini_standard()\r
INSTALLDIR=os.path.join(REPINI,'..')\r
PATH_PYGMEE="/local/noyret/MAP/components/pygmee_v1"\r
PATH_BENHUR="/local/noyret/MAP/components/benhur"\r
+PATH_FDVGRID="/local/noyret/MAP/components/fdvgrid/ther2d/bin"\r
PATH_ASTER="/local/noyret/bin/Aster10/bin"\r
PATH_MODULE="/local/noyret/MAP/modules/polymers"\r
PATH_STUDY="/local/noyret/MAP/studies/demonstrateur_poly_st1"\r
self.text=""
self.textCode=""
self.texteExecution=""
+ self.ssCode=self.config.appli.ssCode
def verifie(self):
print 'verification generique'
return self.texteExecution
- def generRUNYACS(self,obj,format='brut',config=None,):
- print 'generRUNYACS dans generator_map'
+ def generRUNYACS(self,obj,format='brut',config=None):
self.initialise(config)
text=PythonGenerator.gener(self,obj,format)
+ import sys
+ sys.path.append('/local/noyret/Salome_5.1.3/Install/YACS/lib/python2.5/site-packages/salome/')
self.verifie()
- self.loadSchema()
+ import monCreateYacs
+ self.monSchema=monCreateYacs.getSchema(config)
+ self.proc=self.monSchema.createProc()
for elt in self.listeCODE:
code=elt.keys()[0]
dico=elt[code]
- self.dictMCVal={}
- self.dictMCVal[code]=dico
if code in self.__class__.__dict__.keys():
codeYACS=str(code)+"YACS"
- texteCode=apply(self.__class__.__dict__[codeYACS],(self,))
- self.texteExecution=self.texteExecution+texteCode
- return self.texteExecution
+ if hasattr(self.monSchema, codeYACS):
+ fct=getattr(self.monSchema, codeYACS)
+ fct(self.proc,dico)
+ self.monSchema.write_yacs_proc(self.proc,"/tmp/toto.xml")
+ return "/tmp/toto.xml"
def generePythonMap(self,execution) :
'''
chaine=result
return chaine
- def loadSchema(self):
- print "je passe par la"
- #PNPNPN
- import sys
- sys.path.append('/local/noyret/Salome_5.1.3/Install/YACS/lib/python2.5/site-packages/salome/')
- try:
- import libYACS_Swig
- yacs_swig = libYACS_Swig.YACS_Swig()
- yacs_swig.loadSchema(self.__yacs_filename)
- except:
- msg = "Please install YACS module, error was: \n"
- msg += traceback.format_exc()
- return msg
-
#____________________________________________________________________________________
# Liste des mots cles de config remplaces dans les fichiers à trous
#
-CONFIGliste=('NAME_SCHEME', 'PATH_ASTER', 'PATH_BENHUR', 'PATH_MODULE', 'PATH_PYGMEE', 'PATH_STUDY', 'repIni')
+CONFIGliste=('NAME_SCHEME', 'PATH_ASTER', 'PATH_BENHUR', 'PATH_MODULE', 'PATH_PYGMEE', 'PATH_STUDY', 'repIni', 'PATH_FDVGRID')
#_____________________________________________________________________
# Attention les variables suivantes sont nécessaires entre les codes :
return ""
- def BENHURYACS(self) :
- print "dans BENHURYACS"
- return ""
-
- def PYGMEEYACS(self) :
- print "dans PYGMEEYACS"
- return ""
-
def ASTER(self,execution) :
#--------------------------------------------------------------------
# utilisation de deux fichiers a trous pour generer les .comm et .export
else:
return ""
+ def FDVGRID(self,execution) :
+ #--------------------------------------------------------------------
+ #
+ dicoFdvgrid=self.dictMCVal["FDVGRID"]
+ if execution=="non" : return ""
+ fichierInput=self.config.PATH_FDVGRID+'../user/boules_15_B11_2024.txt'
+ chaine="%_PATH_FDVGRID%/fdvgrid %_FDVGRID_DIMENSION% %_FDVGRID_DIFFUSION_COMPOX% %_FDVGRID_DIFFUSION_COMPOY% "
+ chaine=chaine +"%_FDVGRID_DIFFUSION_COMPOZ% %_FDVGRID_FORMULATION% %_FDVGRID_CL% "
+ chaine=chaine +"%_FDVGRID_DISCRET% %_FDVGRID_SOLVER% %_FDVGRID_RESIDU%"
+ chaine2=self.remplaceCONFIG(chaine,CONFIGliste)
+ chaine=self.remplaceDICO(chaine2,dicoFdvgrid)
+ return chaine
+ # ./fdvgrid 3D 1.0 0.0 0.0 v t 100 cross 1.e-4
+
+
def GMSH(self,execution) :
dicoGmsh=self.dictMCVal["GMSH"]
if ('_GMSH_LANCEMENT' in dicoGmsh.keys()) and dicoGmsh['_GMSH_LANCEMENT'] == 'oui':