]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
YACS scheme is now more explicit
authorCharles Toulemonde <charles.toulemonde@edf.fr>
Thu, 18 Nov 2010 16:50:44 +0000 (16:50 +0000)
committerCharles Toulemonde <charles.toulemonde@edf.fr>
Thu, 18 Nov 2010 16:50:44 +0000 (16:50 +0000)
beginning of output port for pygmee_v2 node

MAP/cata_s_polymers_st_1.xml
MAP/s_polymers_st_1_V1.py
generator/generator_map.py
generator/generator_s_polymers_st_1.py
generator/monCreateYacs.py

index 153c3f8d0338cdf73bce5ecdac034cf415c013ed..ec4ec1ff124208a9d787c0bf884f1845e538b9db 100644 (file)
@@ -37,7 +37,6 @@ parameter.add_parameter(composant, 'repulsion_distance', repulsion_distance)
 parameter.add_parameter(composant, 'study_name', study_name)
 parameter.add_parameter(composant, 'file_result_inclusions', file_result_inclusions)
 parameter.add_parameter(composant, 'file_result_rve', file_result_rve)
-#print parameter
 
 pygmee_v2_input = "/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/pygmee_v2_for_YACS_20101116.input"
 
@@ -48,6 +47,9 @@ commande= "cd /local00/bin/MAP/components/pygmee_v2/src;"
 commande+= "python pygmee_v2.py -i "+pygmee_v2_input+";\n"
 os.system(commande)
 
+result_inclusions = file_result_inclusions
+result_rve = file_result_rve
+
 print "pygmee_v2 for YACS - END"
 ]]></code></script>
       <inport name="phase_number" type="int"/>
@@ -58,6 +60,8 @@ print "pygmee_v2 for YACS - END"
       <inport name="study_name" type="string"/>
       <inport name="file_result_inclusions" type="string"/>
       <inport name="file_result_rve" type="string"/>
+      <outport name="result_inclusions" type="string"/>
+      <outport name="result_rve" type="string"/>
    </inline>
    <inline name="init">
       <script><code><![CDATA[phase_number=1
@@ -73,9 +77,9 @@ file_result_rve="rve.txt"
       <outport name="phase_number" type="int"/>
       <outport name="rve_size" type="double"/>
       <outport name="sieve_curve_in" type="string"/>
+      <outport name="sieve_curve_out" type="string"/>
       <outport name="repulsion_distance" type="double"/>
       <outport name="study_name" type="string"/>
-      <outport name="sieve_curve_out" type="string"/>
       <outport name="file_result_inclusions" type="string"/>
       <outport name="file_result_rve" type="string"/>
    </inline>
@@ -92,6 +96,10 @@ file_result_rve="rve.txt"
       <fromnode>init</fromnode> <fromport>sieve_curve_in</fromport>
       <tonode>pygmee_v2</tonode> <toport>sieve_curve_in</toport>
    </datalink>
+   <datalink control="false">
+      <fromnode>init</fromnode> <fromport>sieve_curve_out</fromport>
+      <tonode>pygmee_v2</tonode> <toport>sieve_curve_out</toport>
+   </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>repulsion_distance</fromport>
       <tonode>pygmee_v2</tonode> <toport>repulsion_distance</toport>
@@ -100,10 +108,6 @@ file_result_rve="rve.txt"
       <fromnode>init</fromnode> <fromport>study_name</fromport>
       <tonode>pygmee_v2</tonode> <toport>study_name</toport>
    </datalink>
-   <datalink control="false">
-      <fromnode>init</fromnode> <fromport>sieve_curve_out</fromport>
-      <tonode>pygmee_v2</tonode> <toport>sieve_curve_out</toport>
-   </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>file_result_inclusions</fromport>
       <tonode>pygmee_v2</tonode> <toport>file_result_inclusions</toport>
@@ -112,7 +116,7 @@ file_result_rve="rve.txt"
       <fromnode>init</fromnode> <fromport>file_result_rve</fromport>
       <tonode>pygmee_v2</tonode> <toport>file_result_rve</toport>
    </datalink>
-   <presentation name="init" x="89.4918" y="103" width="273.5" height="313"/>
-   <presentation name="pygmee_v2" x="558" y="219.5" width="223" height="313"/>
-   <presentation name="__ROOT__" x="0" y="0" width="790" height="541.5"/>
+   <presentation name="init" x="25.4918" y="100" width="273.5" height="313"/>
+   <presentation name="pygmee_v2" x="354" y="108.5" width="249" height="313"/>
+   <presentation name="__ROOT__" x="0" y="0" width="612" height="430.5"/>
 </proc>
index 8f9146abd8151f1636ebac5292c56167df023743..c5e8f33e8777786c5f98e1e4f47b87ee03f5afe2 100644 (file)
@@ -44,15 +44,15 @@ METHODE= PROC(nom="METHODE",op=None,
 
 MATERIAUX= PROC(nom="MATERIAUX",op=None,
               fr='definition des proprietes du materiau : fuseau, taille du VER, proprietes des phases',
-              TAILLE=SIMP(statut = "o",fr="taille du VER", typ='R', defaut=50.,equiv="size"),
-              FUSEAU = SIMP ( statut = "o", fr="Fichier représentant le fuseau granulaire",typ = "Fichier", defaut=PATH_STUDY+"/inclusion_size_distribution.txt"),
-              distance=SIMP(statut = "o",fr="distance de replusions", typ='R', defaut=0.1),
-              CONDUCTIVITE_M=SIMP(statut = "o",fr="conductivite de la matrice", typ='R', defaut=1.0 , val_min =0.),
-              CONDUCTIVITE_I=SIMP(statut = "o",fr="conductivite des inclusions", typ='R', defaut=10.0, val_min =0.),
+              rve_size=SIMP(statut = "o",fr="taille du VER", typ='R', defaut=50.),
+              sieve_curve_in = SIMP ( statut = "o", fr="Fichier représentant le fuseau granulaire",typ = "Fichier", defaut=PATH_STUDY+"/inclusion_size_distribution.txt"),
+              repulsion_distance=SIMP(statut = "o",fr="distance de replusions", typ='R', defaut=0.1),
+              lambda_M=SIMP(statut = "o",fr="conductivite de la matrice", typ='R', defaut=1.0 , val_min =0.),
+              lambda_I=SIMP(statut = "o",fr="conductivite des inclusions", typ='R', defaut=10.0, val_min =0.),
               inclusion_name=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"/pygmee_v2_test_1.inclusions",cache=1),
-              rve_name=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"/pygmee_v2_test_1.rvz",cache=1),
-              sieve_in=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_PYGMEE+"/tests/pygmee_v2_test_1.sieve_in",cache=1),
-              sieve_out=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"pygmee_v2.sieve_out",cache=1),
+              rve_name=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"/pygmee_v2_test_1.rve",cache=1),
+#              sieve_curve_in=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_PYGMEE+"/tests/pygmee_v2_test_1.sieve_in",cache=1),
+              sieve_curve_out=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"pygmee_v2.sieve_out",cache=1),
 )
 
 DISCRETISATION= PROC(nom="DISCRETISATION",op=None,
index b7989ed3f1f9081b42e117927b7df00ef3890dfd..103e14fea64582855ba2f583f1fe796c97a2f88b 100644 (file)
@@ -25,6 +25,8 @@
 """
 import traceback
 import types,string,re,os
+import time
+from datetime import date
 
 from generator_python import PythonGenerator
 try :
@@ -108,7 +110,12 @@ class MapGenerator(PythonGenerator):
              if hasattr(self.monSchema, codeYACS): 
                 fct=getattr(self.monSchema, codeYACS)
                 fct(self.proc,dico)
-      nomFichier="/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/test_20101116.xml"
+                
+      today = str(date.today())
+      today = today.replace('-', '')
+      today+="-"+time.strftime("%H%M%S", time.localtime())
+
+      nomFichier=self.config.PATH_STUDY+"/"+self.config.NAME_SCHEME+"_"+today+".xml"
       self.monSchema.write_yacs_proc(self.proc,str(nomFichier))
       print "le fichier xml est : ",nomFichier
 
index 4ad61836ddd7726e077a14fe4eda662ff1a9402f..4ca263bc38fc8a2b200aec63f5d58fa0746bdc92 100644 (file)
@@ -107,11 +107,11 @@ class s_poly_st_1Generator(MapGenerator):
       pygmee_v2_input=self.config.PATH_STUDY+"/pygmee_v2.input"
       parameter=MAP_parameters()
       parameter.add_component(composant)
-      parameter.add_parameter(composant, 'rve_size', self.size)
+      parameter.add_parameter(composant, 'rve_size', self.rve_size)
       parameter.add_parameter(composant, 'phase_number', 1)
-      parameter.add_parameter(composant, 'sieve_curve_in', self.sieve_in)
-      parameter.add_parameter(composant, 'sieve_curve_out',  self.sieve_out)
-      parameter.add_parameter(composant, 'repulsion_distance', self.distance)
+      parameter.add_parameter(composant, 'sieve_curve_in', self.sieve_curve_in)
+      parameter.add_parameter(composant, 'sieve_curve_out',  self.sieve_curve_out)
+      parameter.add_parameter(composant, 'repulsion_distance', self.repulsion_distance)
       parameter.add_parameter(composant, 'study_name', "study")
       parameter.add_parameter(composant, 'file_result_inclusions', self.inclusion_name)
       parameter.add_parameter(composant, 'file_result_rve', self.rve_name)
@@ -128,10 +128,10 @@ class s_poly_st_1Generator(MapGenerator):
 
    def FDVGRID(self):
       if ( self.FINESSE < 32): self.FINESSE=32
-      self.contrast=float(self.CONDUCTIVITE_I/self.CONDUCTIVITE_M)
+      self.contrast=float(self.lambda_I/self.lambda_M)
       commande= "echo 'execution de FDVGRID';\n"
       commande+= "cd "+self.config.PATH_FDVGRID+";\n"
-      commande+= "echo "+ str(self.size)+" > "+"rve.input"+";\n"
+      commande+= "echo "+ str(self.rve_size)+" > "+"rve.input"+";\n"
       commande+= "cp " +str(self.config.PATH_STUDY+"/pygmee_v2_test_1.inclusions")+" "+"inclusions.input"+";\n"
       commande+= "echo "+str(self.contrast)+" > "+"contrast.input"+";\n"         
       commande+= "./fdvgrid 3D 1.0 0.0 0.0 v t "+str(self.FINESSE)+" cross 1e-6 "+";\n"
index ba7b060cfe7bd0fcf29a9d00c7ad57715f7891cc..09fffcf8e415e5f1d7e0d75919b8afeb8266655c 100755 (executable)
@@ -64,12 +64,12 @@ class s_polymers_st_1(CreeSchemaYacs) :
          monFichierInput=self.config.PATH_STUDY+"/"+self.config.NAME_SCHEME+"/pygmee_input.txt"
          factoryNode = self.monCata._nodeMap["pygmee_v2"]
          self.pygmeeNode = factoryNode.cloneNode("pygmee_v2")
-         self.pygmeeNode.getInputPort("rve_size").edInitPy(self.generator.size)
+         self.pygmeeNode.getInputPort("rve_size").edInitPy(self.generator.rve_size)
          self.pygmeeNode.getInputPort("phase_number").edInitPy(1)
-         self.pygmeeNode.getInputPort("sieve_curve_in").edInitPy(self.generator.sieve_in)
-         self.pygmeeNode.getInputPort("sieve_curve_out").edInitPy(self.generator.sieve_out)
-         self.pygmeeNode.getInputPort("repulsion_distance").edInitPy(self.generator.distance)
-         self.pygmeeNode.getInputPort("study_name").edInitPy("s_polymers_st_1_20101116")
+         self.pygmeeNode.getInputPort("sieve_curve_in").edInitPy(self.generator.sieve_curve_in)
+         self.pygmeeNode.getInputPort("sieve_curve_out").edInitPy(self.generator.sieve_curve_out)
+         self.pygmeeNode.getInputPort("repulsion_distance").edInitPy(self.generator.repulsion_distance)
+         self.pygmeeNode.getInputPort("study_name").edInitPy("s_polymers_st_1_20101117")
          self.pygmeeNode.getInputPort("file_result_inclusions").edInitPy(self.generator.inclusion_name)
          self.pygmeeNode.getInputPort("file_result_rve").edInitPy(self.generator.rve_name)
          proc.edAddChild(self.pygmeeNode)