]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
volume_fraction_ouput for pygmvee_v2
authorCharles Toulemonde <charles.toulemonde@edf.fr>
Tue, 23 Nov 2010 10:48:54 +0000 (10:48 +0000)
committerCharles Toulemonde <charles.toulemonde@edf.fr>
Tue, 23 Nov 2010 10:48:54 +0000 (10:48 +0000)
MAP/Templates/s_polymers_st_1/cata_s_polymers_st_1.xml
MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py
generator/generator_s_polymers_st_1.py

index 3df248922cf740329a8c13fd9c09405885d14e49..f02b40722738e85d66a507c8352baf970fd1fd4b 100644 (file)
@@ -27,7 +27,7 @@ sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'),'../EficasV1/MAP/Templat
 print sys.path
 from s_polymers_st_1_YACS_nodes import *
 
-component_pygmee_v2(rve_size, phase_number, sieve_curve_in, sieve_curve_out, repulsion_distance, study_name, study_path, file_result_inclusions, file_result_rve)
+volume_fraction=component_pygmee_v2(rve_size, phase_number, sieve_curve_in, sieve_curve_out, repulsion_distance, study_name, study_path, file_result_inclusions, file_result_rve)
 
 result_inclusions = file_result_inclusions
 result_rve = file_result_rve
@@ -106,18 +106,18 @@ print "benhur for YACS - END"
       <inport name="study_path" type="string"/>
       <inport name="benhur_template" type="string"/>
    </inline>
-   <control> <fromnode>pygmee_v2</fromnode> <tonode>benhur</tonode> </control>
    <control> <fromnode>pygmee_v2</fromnode> <tonode>fdvgrid</tonode> </control>
-   <control> <fromnode>init</fromnode> <tonode>benhur</tonode> </control>
-   <control> <fromnode>init</fromnode> <tonode>fdvgrid</tonode> </control>
+   <control> <fromnode>pygmee_v2</fromnode> <tonode>benhur</tonode> </control>
    <control> <fromnode>init</fromnode> <tonode>pygmee_v2</tonode> </control>
+   <control> <fromnode>init</fromnode> <tonode>fdvgrid</tonode> </control>
+   <control> <fromnode>init</fromnode> <tonode>benhur</tonode> </control>
    <datalink control="false">
       <fromnode>pygmee_v2</fromnode> <fromport>result_inclusions</fromport>
-      <tonode>benhur</tonode> <toport>file_inclusions</toport>
+      <tonode>fdvgrid</tonode> <toport>file_inclusions</toport>
    </datalink>
    <datalink control="false">
       <fromnode>pygmee_v2</fromnode> <fromport>result_inclusions</fromport>
-      <tonode>fdvgrid</tonode> <toport>file_inclusions</toport>
+      <tonode>benhur</tonode> <toport>file_inclusions</toport>
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>phase_number</fromport>
@@ -173,11 +173,11 @@ print "benhur for YACS - END"
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>study_name</fromport>
-      <tonode>fdvgrid</tonode> <toport>study_name</toport>
+      <tonode>pygmee_v2</tonode> <toport>study_name</toport>
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>study_name</fromport>
-      <tonode>pygmee_v2</tonode> <toport>study_name</toport>
+      <tonode>fdvgrid</tonode> <toport>study_name</toport>
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>study_name</fromport>
@@ -185,7 +185,7 @@ print "benhur for YACS - END"
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>study_path</fromport>
-      <tonode>fdvgrid</tonode> <toport>study_path</toport>
+      <tonode>benhur</tonode> <toport>study_path</toport>
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>study_path</fromport>
@@ -193,7 +193,7 @@ print "benhur for YACS - END"
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>study_path</fromport>
-      <tonode>benhur</tonode> <toport>study_path</toport>
+      <tonode>fdvgrid</tonode> <toport>study_path</toport>
    </datalink>
    <datalink control="false">
       <fromnode>init</fromnode> <fromport>benhur_template</fromport>
@@ -203,9 +203,9 @@ print "benhur for YACS - END"
       <tonode>benhur</tonode><toport>file_inclusions</toport>
       <value><string></string></value>
    </parameter>
+   <presentation name="pygmee_v2" x="415.186" y="179.5" width="249.5" height="342"/>
+   <presentation name="fdvgrid" x="888.902" y="551.141" width="227.5" height="284"/>
    <presentation name="init" x="9" y="328" width="273.5" height="458"/>
    <presentation name="benhur" x="848.961" y="95.838" width="223" height="255"/>
-   <presentation name="fdvgrid" x="888.902" y="551.141" width="227.5" height="284"/>
-   <presentation name="pygmee_v2" x="415.186" y="179.5" width="249.5" height="342"/>
    <presentation name="__ROOT__" x="0" y="0" width="1125.9" height="844.141"/>
 </proc>
index e84092770ad82428e67523e9a74151b7fa7c97a5..0158c55b54e7d0e1ed2630e8320e8b60a1f00f7b 100644 (file)
@@ -30,8 +30,15 @@ def component_pygmee_v2(rve_size, phase_number, sieve_curve_in, sieve_curve_out,
     commande+= "python pygmee_v2.py -i "+pygmee_v2_input+";\n"
     os.system(commande)
 
+    fd = open(file_result_rve, 'r')
+    line=fd.readline()
+    line=fd.readline()
+    volume_fraction=float(line)
+    print "volume_fraction =", volume_fraction
+    fd.close()    
+
     print "pygmee_v2 for YACS - END"
-    return
+    return volume_fraction
 
 def component_fdvgrid(lambda_I, lambda_M, rve_size, file_inclusions, finesse):
     print "fdvgrid for YACS - BEGIN"
index a6eb0fb4727fd7d21b70d07df27592a948655d02..39de0bf120fdb9d450383ec1e5cdded366704750 100644 (file)
@@ -166,7 +166,7 @@ class s_poly_st_1Generator(MapGenerator):
       commande_python="import os,sys;\n"
       commande_python+="sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'), '../EficasV1/MAP/Templates/s_polymers_st_1'));\n"
       commande_python+="from s_polymers_st_1_YACS_nodes import *;\n"
-      commande_python+="component_pygmee_v2("+str(self.rve_size)+",1,"+str(self.sieve_curve_in)+","+str(self.sieve_curve_out)+","+str(self.repulsion_distance)+","+str(self.study_name)+","+str(self.study_path)+","+str(self.inclusion_name)+","+str(self.rve_name)+");\n"
+      commande_python+="volume_fraction=component_pygmee_v2("+str(self.rve_size)+",1,"+str(self.sieve_curve_in)+","+str(self.sieve_curve_out)+","+str(self.repulsion_distance)+","+str(self.study_name)+","+str(self.study_path)+","+str(self.inclusion_name)+","+str(self.rve_name)+");\n"
       return 'python -c "'+commande_python+'"\n'
 
    def FDVGRID(self):