From: Pascale Noyret Date: Wed, 21 Jul 2010 13:28:10 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V2_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2fc061e60e678e6ac114c6544d2a6fde9a37a2f0;p=modules%2Feficas.git *** empty log message *** --- diff --git a/MAP/Templates/s_poly_st_1_V1/benhur_pygmee_template.txt b/MAP/Templates/s_poly_st_1_V1/benhur_pygmee_template.txt index 207927dc..10c81952 100644 --- a/MAP/Templates/s_poly_st_1_V1/benhur_pygmee_template.txt +++ b/MAP/Templates/s_poly_st_1_V1/benhur_pygmee_template.txt @@ -8,7 +8,7 @@ I - Morphologie (MESSALA) 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) diff --git a/MAP/catalogues_MAP.ini b/MAP/catalogues_MAP.ini index 07c5cf9d..8f2b7b6a 100644 --- a/MAP/catalogues_MAP.ini +++ b/MAP/catalogues_MAP.ini @@ -4,13 +4,9 @@ import os 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'), ) diff --git a/MAP/configuration_MAP.py b/MAP/configuration_MAP.py index cad59a9d..7277809f 100644 --- a/MAP/configuration_MAP.py +++ b/MAP/configuration_MAP.py @@ -67,8 +67,8 @@ class CONFIG: self.savedir = self.rep_user self.exec_acrobat = self.rep_user - self.labels_user=('exec_acrobat', 'catalogues','savedir','path_doc','map_path','PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME') - 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') + 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') + 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') #Lecture des fichiers utilisateurs self.lecture_fichier_ini_standard() diff --git a/MAP/prefs_MAP.py b/MAP/prefs_MAP.py index f1e5eaec..e4dec391 100644 --- a/MAP/prefs_MAP.py +++ b/MAP/prefs_MAP.py @@ -33,6 +33,7 @@ initialdir=REPINI INSTALLDIR=os.path.join(REPINI,'..') PATH_PYGMEE="/local/noyret/MAP/components/pygmee_v1" PATH_BENHUR="/local/noyret/MAP/components/benhur" +PATH_FDVGRID="/local/noyret/MAP/components/fdvgrid/ther2d/bin" PATH_ASTER="/local/noyret/bin/Aster10/bin" PATH_MODULE="/local/noyret/MAP/modules/polymers" PATH_STUDY="/local/noyret/MAP/studies/demonstrateur_poly_st1" diff --git a/generator/generator_map.py b/generator/generator_map.py index ddc7c2ba..3853ead3 100644 --- a/generator/generator_map.py +++ b/generator/generator_map.py @@ -63,6 +63,7 @@ class MapGenerator(PythonGenerator): self.text="" self.textCode="" self.texteExecution="" + self.ssCode=self.config.appli.ssCode def verifie(self): print 'verification generique' @@ -84,22 +85,25 @@ class MapGenerator(PythonGenerator): 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) : ''' @@ -154,17 +158,3 @@ class MapGenerator(PythonGenerator): 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 - diff --git a/generator/generator_s_poly_st_1.py b/generator/generator_s_poly_st_1.py index 93ce30bf..6c632685 100644 --- a/generator/generator_s_poly_st_1.py +++ b/generator/generator_s_poly_st_1.py @@ -31,7 +31,7 @@ from generator_map import MapGenerator #____________________________________________________________________________________ # 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 : @@ -153,14 +153,6 @@ class s_poly_st_1Generator(MapGenerator): 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 @@ -210,6 +202,21 @@ class s_poly_st_1Generator(MapGenerator): 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':