]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
*** empty log message ***
authorPascale Noyret <pascale.noyret@edf.fr>
Wed, 21 Jul 2010 13:28:10 +0000 (13:28 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Wed, 21 Jul 2010 13:28:10 +0000 (13:28 +0000)
MAP/Templates/s_poly_st_1_V1/benhur_pygmee_template.txt
MAP/catalogues_MAP.ini
MAP/configuration_MAP.py
MAP/prefs_MAP.py
generator/generator_map.py
generator/generator_s_poly_st_1.py

index 207927dceddffd2937c150003a662363fdcc0cf6..10c819526894fa3815b3a2f1428c5e40baeb558f 100644 (file)
@@ -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)
index 07c5cf9d5abfb313093ad58aa063a1863b7dfbac..8f2b7b6aaba539f62afdc54ff69c859f4530cdf1 100644 (file)
@@ -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'),
 )
 
index cad59a9ddfc1bf85b2ed0c84b991f549a518db5f..7277809fce4b37652e451bce5842ef5f8d4daec1 100644 (file)
@@ -67,8 +67,8 @@ class CONFIG:
       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
index f1e5eaec5fe41b63a125877878092354ebfa25ed..e4dec3917205541c04d786e0aedf61a67d2d9010 100644 (file)
@@ -33,6 +33,7 @@ initialdir=REPINI
 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
index ddc7c2ba0d44b4f33277c6259b1f062412942c3e..3853ead31fcb7a68a558feee758f91b816a0d086 100644 (file)
@@ -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
-
index 93ce30bf1d22b486f7d7b77ac47623c89ed2c1b1..6c632685830027a03e8e3db04844f20471d40fee 100644 (file)
@@ -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':