Salome HOME
Copyrights update 2015.
[modules/yacs.git] / src / yacsloader / samples / foreach7.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <!--
3   Copyright (C) 2006-2015  CEA/DEN, EDF R&D
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
19   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21 -->
22 <proc name="newSchema_1">
23    <property name="DefaultStudyID" value="1"/>
24    <type name="string" kind="string"/>
25    <struct name="Engines/dataref">
26       <member name="ref" type="string"/>
27    </struct>
28    <objref name="GEOM_Object" id="IDL:GEOM/GEOM_Object:1.0"/>
29    <type name="bool" kind="bool"/>
30    <sequence name="boolvec" content="bool"/>
31    <type name="double" kind="double"/>
32    <sequence name="dblevec" content="double"/>
33    <objref name="file" id="file"/>
34    <type name="int" kind="int"/>
35    <sequence name="intvec" content="int"/>
36    <objref name="pyobj" id="python:obj:1.0"/>
37    <sequence name="seqpyobj" content="pyobj"/>
38    <sequence name="stringvec" content="string"/>
39    <container name="DefaultContainer">
40       <property name="container_name" value="FactoryServer"/>
41       <property name="name" value="localhost"/>
42    </container>
43    <container name="container0">
44    </container>
45    <container name="container8">
46    </container>
47    <foreach name="ForEachLoop_pyobj0" type="pyobj">
48       <bloc name="Bloc1">
49          <remote name="PyFunction4">
50             <function name="fromPyObj2String">
51                <code><![CDATA[def fromPyObj2String(aRun,):
52     aMedFile = aRun[0]
53     aMeshName = aRun[1]
54     return aMedFile,aMeshName
55 ]]></code>
56             </function>
57             <load container="container8"/>
58             <inport name="aRun" type="pyobj"/>
59             <outport name="aMedFile" type="string"/>
60             <outport name="aMeshName" type="string"/>
61          </remote>
62          <service name="MakeBoxDXDYDZ1">
63             <component>GEOM_Superv</component>
64             <load container="container8"/>
65             <method>MakeBoxDXDYDZ</method>
66             <inport name="theDX" type="double"/>
67             <inport name="theDY" type="double"/>
68             <inport name="theDZ" type="double"/>
69             <outport name="return" type="GEOM_Object"/>
70          </service>
71          <control> <fromnode>PyFunction4</fromnode> <tonode>MakeBoxDXDYDZ1</tonode> </control>
72       </bloc>
73    </foreach>
74    <inline name="PyScript1">
75       <script><code><![CDATA[import os
76 numberOfRun = 5
77 runs = []
78 dir1 = "/home/crouzet/SUPPORT/NADIR"
79 dir2 = "/TestFAKECOMPO/"
80 medFile = dir1+dir2+"AlcyoneFields.med"
81 meshName="LE DOMAINE"
82 for run in range(numberOfRun):
83     runs.append([])
84     runs[run].append(medFile)
85     runs[run].append(meshName)
86     pass
87 print "There is(are) ",numberOfRun," runs of Fake Compo on process ",os.getpid()
88 ]]></code></script>
89       <outport name="numberOfRun" type="int"/>
90       <outport name="runs" type="seqpyobj"/>
91    </inline>
92    <control> <fromnode>PyScript1</fromnode> <tonode>ForEachLoop_pyobj0</tonode> </control>
93    <datalink control="false">
94       <fromnode>ForEachLoop_pyobj0</fromnode> <fromport>evalSamples</fromport>
95       <tonode>ForEachLoop_pyobj0.Bloc1.PyFunction4</tonode> <toport>aRun</toport>
96    </datalink>
97    <datalink control="false">
98       <fromnode>PyScript1</fromnode> <fromport>numberOfRun</fromport>
99       <tonode>ForEachLoop_pyobj0</tonode> <toport>nbBranches</toport>
100    </datalink>
101    <datalink control="false">
102       <fromnode>PyScript1</fromnode> <fromport>runs</fromport>
103       <tonode>ForEachLoop_pyobj0</tonode> <toport>SmplsCollection</toport>
104    </datalink>
105    <parameter>
106       <tonode>ForEachLoop_pyobj0.Bloc1.MakeBoxDXDYDZ1</tonode><toport>theDX</toport>
107       <value><double>10</double></value>
108    </parameter>
109    <parameter>
110       <tonode>ForEachLoop_pyobj0.Bloc1.MakeBoxDXDYDZ1</tonode><toport>theDY</toport>
111       <value><double>10</double></value>
112    </parameter>
113    <parameter>
114       <tonode>ForEachLoop_pyobj0.Bloc1.MakeBoxDXDYDZ1</tonode><toport>theDZ</toport>
115       <value><double>10</double></value>
116    </parameter>
117    <presentation name="ForEachLoop_pyobj0" x="283.5" y="74.5" width="457.5" height="281.5" expanded="1" expx="283.5" expy="74.5" expWidth="457.5" expHeight="281.5" shownState="0"/>
118    <presentation name="ForEachLoop_pyobj0.Bloc1" x="41.5" y="124.5" width="412" height="153" expanded="1" expx="41.5" expy="124.5" expWidth="412" expHeight="153" shownState="0"/>
119    <presentation name="PyScript1" x="40" y="75" width="158" height="90" expanded="1" expx="40" expy="75" expWidth="158" expHeight="90" shownState="0"/>
120    <presentation name="ForEachLoop_pyobj0.Bloc1.PyFunction4" x="10" y="35" width="158" height="90" expanded="1" expx="10" expy="35" expWidth="158" expHeight="90" shownState="0"/>
121    <presentation name="ForEachLoop_pyobj0.Bloc1.MakeBoxDXDYDZ1" x="250" y="32" width="158" height="117" expanded="1" expx="250" expy="32" expWidth="158" expHeight="117" shownState="0"/>
122    <presentation name="__ROOT__" x="0" y="0" width="745" height="360" expanded="1" expx="0" expy="0" expWidth="745" expHeight="360" shownState="0"/>
123 </proc>