--- /dev/null
+<?xml version='1.0' encoding='iso-8859-1' ?>
+<proc name="newSchema_1">
+ <property name="DefaultStudyID" value="1"/>
+ <type name="string" kind="string"/>
+ <struct name="Engines/dataref">
+ <member name="ref" type="string"/>
+ </struct>
+ <type name="bool" kind="bool"/>
+ <sequence name="boolvec" content="bool"/>
+ <type name="double" kind="double"/>
+ <sequence name="dblevec" content="double"/>
+ <objref name="file" id="file"/>
+ <type name="int" kind="int"/>
+ <sequence name="intvec" content="int"/>
+ <objref name="pyobj" id="python:obj:1.0"/>
+ <sequence name="stringvec" content="string"/>
+ <container name="DefaultContainer">
+ <property name="container_name" value="FactoryServer"/>
+ <property name="hostname" value="localhost"/>
+ </container>
+ <inline name="pygmee_v2">
+ <script><code><![CDATA[import sys
+import os
+
+sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'),'classes/python/'))
+from class_MAP_parameters import *
+
+print "pygmee_v2 for YACS - BEGIN"
+composant="pygmee_v2"
+parameter=MAP_parameters()
+parameter.add_component(composant)
+parameter.add_parameter(composant, 'rve_size', rve_size)
+parameter.add_parameter(composant, 'phase_number', phase_number)
+parameter.add_parameter(composant, 'sieve_curve_in', sieve_curve_in)
+parameter.add_parameter(composant, 'sieve_curve_out', sieve_curve_out)
+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"
+
+commande=parameter.write_for_shell(pygmee_v2_input)
+os.system(commande)
+
+commande= "cd /local00/bin/MAP/components/pygmee_v2/src;"
+commande+= "python pygmee_v2.py -i "+pygmee_v2_input+";\n"
+os.system(commande)
+
+print "pygmee_v2 for YACS - END"
+]]></code></script>
+ <inport name="phase_number" type="int"/>
+ <inport name="rve_size" type="double"/>
+ <inport name="sieve_curve_in" type="string"/>
+ <inport name="sieve_curve_out" type="string"/>
+ <inport name="repulsion_distance" type="double"/>
+ <inport name="study_name" type="string"/>
+ <inport name="file_result_inclusions" type="string"/>
+ <inport name="file_result_rve" type="string"/>
+ </inline>
+ <inline name="init">
+ <script><code><![CDATA[phase_number=1
+rve_size=50.0
+sieve_curve_in="pygmee_v2_test_1.sieve_in"
+sieve_curve_out="pygmee_v2_test_1.sieve_out"
+repulsion_distance=0.1
+study_name="test YACS"
+file_result_inclusions="inclusions.txt"
+file_result_rve="rve.txt"
+
+]]></code></script>
+ <outport name="phase_number" type="int"/>
+ <outport name="rve_size" type="double"/>
+ <outport name="sieve_curve_in" 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>
+ <control> <fromnode>init</fromnode> <tonode>pygmee_v2</tonode> </control>
+ <datalink control="false">
+ <fromnode>init</fromnode> <fromport>phase_number</fromport>
+ <tonode>pygmee_v2</tonode> <toport>phase_number</toport>
+ </datalink>
+ <datalink control="false">
+ <fromnode>init</fromnode> <fromport>rve_size</fromport>
+ <tonode>pygmee_v2</tonode> <toport>rve_size</toport>
+ </datalink>
+ <datalink control="false">
+ <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>repulsion_distance</fromport>
+ <tonode>pygmee_v2</tonode> <toport>repulsion_distance</toport>
+ </datalink>
+ <datalink control="false">
+ <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>
+ </datalink>
+ <datalink control="false">
+ <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"/>
+</proc>
def addCatalog(self):
try:
- monCataFile= os.environ["EFICAS_ROOT_DIR"]
- monCataFile=monCataFile+"/share/salome/resources/eficas/cata"
- monCataFile=monCataFile+self.ssCode+".xml"
+ # modifs CTL+PN 20101116 for today
+ #monCataFile= os.environ["EFICAS_ROOT_DIR"]
+ #monCataFile=monCataFile+"/share/salome/resources/eficas/cata"
+ #monCataFile=monCataFile+self.ssCode+".xml"
+ monCataFile="/local00/bin/EficasV1/MAP/cata_s_polymers_st_1.xml"
print monCataFile
self.monCata = self.runtime.loadCatalog("proc",monCataFile)
except:
traceback.print_exc()
sys.exit(1)
- def createProc(self):
+ def createProc(self, generator):
+ self.generator=generator
proc = self.runtime.createProc("proc")
proc.setTypeCode("pyobj", self.runtime.getTypeCode("pyobj"))
t_pyobj = proc.getTypeCode("pyobj")
def PYGMEEYACS(self,proc,dico):
monFichierInput=self.config.PATH_STUDY+"/"+self.config.NAME_SCHEME+"/pygmee_input.txt"
- factoryNode = self.monCata._nodeMap["pygmee"]
- self.pygmeeNode = factoryNode.cloneNode("pygmee")
- self.pygmeeNode.getInputPort("pathPygmee").edInitPy(self.config.PATH_PYGMEE)
- self. pygmeeNode.getInputPort("fileInput").edInitPy(monFichierInput)
+ factoryNode = self.monCata._nodeMap["pygmee_v2"]
+ self.pygmeeNode = factoryNode.cloneNode("pygmee_v2")
+ self.pygmeeNode.getInputPort("rve_size").edInitPy(self.generator.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("file_result_inclusions").edInitPy(self.generator.inclusion_name)
+ self.pygmeeNode.getInputPort("file_result_rve").edInitPy(self.generator.rve_name)
proc.edAddChild(self.pygmeeNode)
if self.nodeAvant != None :
proc.edAddCFLink(self.nodeAvant,self.pygmeeNode)
def FDVGRIDYACS(self,proc,dico):
print "iiiii"
- def METHODEYACS(self,proc,dico)
+ def METHODEYACS(self,proc,dico):
self.PYGMEEYACS(proc,dico)
- if (self.CHOIX=="FD+grid") : self.FDVGRIDYACS(proc,dico)
+ if (self.generator.CHOIX=="FD+grid") : self.FDVGRIDYACS(proc,dico)
-dictKlass={'s_poly_st_1':s_poly_st_1}
+dictKlass={'s_polymers_st_1':s_polymers_st_1}
def getSchema(config):
schema=config.appli.ssCode
return dictKlass[schema](config)
if __name__ == "__main__":
- monCreator=getSchema('s_poly_st_1')
+ monCreator=getSchema('s_polymers_st_1')
proc=monCreator.createProc()
monCreator.ajoutPygmee(proc)
monCreator.ajoutBenhur(proc)