Salome HOME
Correction schema YCAS pour une frontière discrète.
authornicolas <nicolas>
Fri, 20 Sep 2013 14:53:58 +0000 (14:53 +0000)
committernicolas <nicolas>
Fri, 20 Sep 2013 14:53:58 +0000 (14:53 +0000)
Multilinguisme des schémas et de la documentation

26 files changed:
doc/en/yacs.rst
doc/files/yacs_01.en.xml [new file with mode: 0644]
doc/files/yacs_01.fr.xml [new file with mode: 0644]
doc/files/yacs_01.xml [deleted file]
doc/fr/yacs.rst
idl/HOMARD_Gen.idl
resources/Makefile.am
resources/yacs_01.xml
src/HOMARD/YACSDriver.cxx
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARDGUI.h
src/HOMARDGUI/HOMARDGUI_Utils.cxx
src/HOMARDGUI/HOMARDGUI_Utils.h
src/HOMARDGUI/MonCreateBoundaryAn.cxx
src/HOMARDGUI/MonCreateBoundaryDi.cxx
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateHypothesis.cxx
src/HOMARDGUI/MonCreateIteration.cxx
src/HOMARDGUI/MonCreateListGroup.cxx
src/HOMARDGUI/MonCreateYACS.cxx
src/HOMARDGUI/MonCreateZone.cxx
src/HOMARDGUI/MonIterInfo.cxx
src/HOMARDGUI/MonMeshInfo.cxx
src/HOMARDGUI/MonPursueIteration.cxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Gen_i.hxx

index 9146bc795227a9f817ff3fbf07f50de4c0ab6b0c..d08dcfa94e477a26ebeec3a1d64d7e0fbf57edbd 100644 (file)
@@ -40,7 +40,7 @@ DataInit
 
 This box is type PresetNode's elementary node. Its only function is to initialize the variable MeshFile that contains the name of the file of the initial mesh.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 38-42
 
 Etude_Initialisation
@@ -58,12 +58,12 @@ The box Etude_Initialisation launches the component HOMARD inside SALOME. It is
 
 The python node StudyCreation initialize the SALOME study that is given through the output:
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 44-62
 
 The service SetCurrentStudy connects this study to an instance of HOMARD.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 63-68
 
 
@@ -87,7 +87,7 @@ Bilan
 
 This box is a node python that takes in input a character string, MessInfo. If everything passed well, this message is empty. A window QT appears to confirm the convergence. If there was a problem, the message contains messages emitted during the calculations. The window QT shows this message.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 406-419
 
 
@@ -111,7 +111,7 @@ Calcul
 
 This box is a node python that is going to drive the calculation. In input, we find the number of the calculation (0 at first) and the name of the file which contains the mesh on which to calculate. In output, we find an integer which represents the error on this calculation (0 so everything goes well) and a dictionary python gathering the results of the calculation. The body of the node is established by the launch of a script python that activates the calculation.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 77-103
 
 In this example, we must define:
@@ -151,23 +151,23 @@ Iter_1
 
 This box begins by creating the case HOMARD by calling the CreateCase service.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 208-215
 
 The name of the case CaseName is imposed on "Calcul". The name of the case MeshName is imposed on "BOX". The parameters of input FileName arise from the output of the previous calculation. The parameter of output is an instance of case.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 443-446
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 483-486
 
-The options of this case must be now given. It is made by the node python CaseOptions. It is imperative to give the directory of calculation. We shall look at the description of the functions in:ref: ' tui_create_case '. In output, we get back the instance of the iteration corresponding to the initial state of the case.
+The options of this case must be now given. It is made by the node python CaseOptions. It is imperative to give the directory of calculation. We shall look at the description of the functions in :ref:`tui_create_case`. In output, we get back the instance of the iteration corresponding to the initial state of the case.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 216-228
 
-Finally, a hypothesis is created by calling the CreateHypothèse service. The parameter of output is an instance of hypothese.
+Finally, a hypothesis is created by calling the CreateHypothese service. The parameter of output is an instance of hypothese.
 
 Homard_Exec
 ^^^^^^^^^^^
@@ -181,32 +181,32 @@ Once initialized, the adaptation can be calculated. It is the goal of the Homard
 
 The directory of calculation is recovered. The name of the mesh is given.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 245-250
 
 ../..
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 325-333
 
 The hypothesis transmitted in input parameter characterized (look :ref:`tui_create_hypothese`) :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 254-278
 
 It is necessary to establish a name for the future iteration. To make sure that the name was never used, one installs a mechanism of incremental naming starting from the name of the initial iteration. As this initial name is the name of the initial mesh, one obtains a succession of names in the form: M_001, M_002, M_003, etc
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 280-290
 
 The iteration is supplemented : hypothesis, future mesh, field (look :ref:`tui_create_iteration`) :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 292-311
 
 The iteration is calculated. If it were correct, variable OK equals 1: one will be able to continue the execution of the scheme. If there were a problem, variable OK equals 0 to mean that calculation must stop; an error message then is given.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 313-324
 
 After this execution, the process leaves the Adaptation_HOMARD node, then Adaptation node. One arrives then at the node of analysis.
@@ -236,7 +236,7 @@ Arret_boucle
 
 The Arret_boucle block is present to only make forward variables because the input parameters of the nodes must always be filled. It is a very simple python:
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 173-184
 
 Analyse
@@ -249,39 +249,39 @@ Analyse
 
 The Analyse block is a script python which ensures the complete control of the process by examining the causes of possible error successively.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 104-116
 
 ../..
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 162-170
 
 One starts by analyzing the return of the computer code:
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 118-123
 
 Checking of the presence of the name of the result file in the dictionary of the results:
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 125-132
 
 Checking of convergence. That supposes that the value to be tested is present in the dictionary under the key 'V_TEST'. Here, one set up a test on the variation of the value of one calculation at the other. With the first passage, nothing is tested. In the following passing, one tests if the relative variation is lower than 1 thousandths. One could have set up an absolute test if one had recovered a total level of error for example.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 134-152
 
 Lastly, it is checked that a maximum nomber of adaptations is not exceeded:
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.en.xml
    :lines: 154-159
 
 
 Use this scheme
 ***************
 To reproduce this example, download:
-  * :download:`the scheme <../files/yacs_01.xml>`
+  * :download:`the scheme <../files/yacs_01.en.xml>`
   * :download:`an example of python script <../files/yacs_script.py>`
 
 It should be adapted to simulation considered. In particular, it is necessary:
diff --git a/doc/files/yacs_01.en.xml b/doc/files/yacs_01.en.xml
new file mode 100644 (file)
index 0000000..1110af3
--- /dev/null
@@ -0,0 +1,512 @@
+<?xml version='1.0' encoding='iso-8859-1' ?>
+<proc name="HOMARD">
+   <property name="DefaultStudyID" value="1"/>
+   <objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
+   <type name="string" kind="string"/>
+   <struct name="Engines/dataref">
+      <member name="ref" type="string"/>
+   </struct>
+   <objref name="HOMARD_Boundary" id="IDL:HOMARD/HOMARD_Boundary:1.0"/>
+   <objref name="HOMARD_Cas" id="IDL:HOMARD/HOMARD_Cas:1.0"/>
+   <objref name="HOMARD_Hypothesis" id="IDL:HOMARD/HOMARD_Hypothesis:1.0"/>
+   <objref name="HOMARD_Iteration" id="IDL:HOMARD/HOMARD_Iteration:1.0"/>
+   <objref name="HOMARD_Zone" id="IDL:HOMARD/HOMARD_Zone:1.0"/>
+   <objref name="Study" id="IDL:SALOMEDS/Study:1.0"/>
+   <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"/>
+   <struct name="stringpair">
+      <member name="name" type="string"/>
+      <member name="value" type="string"/>
+   </struct>
+   <sequence name="propvec" content="stringpair"/>
+   <objref name="pyobj" id="python:obj:1.0"/>
+   <sequence name="seqboolvec" content="boolvec"/>
+   <sequence name="seqdblevec" content="dblevec"/>
+   <sequence name="seqint" content="int"/>
+   <sequence name="seqintvec" content="intvec"/>
+   <sequence name="stringvec" content="string"/>
+   <sequence name="seqstringvec" content="stringvec"/>
+   <container name="DefaultContainer">
+      <property name="container_name" value="FactoryServer"/>
+      <property name="name" value="localhost"/>
+   </container>
+   <datanode name="DataInit">
+      <parameter name="MeshFile" type="string">
+         <value><string>/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med</string></value>
+      </parameter>
+   </datanode>
+   <bloc name="Etude_Initialisation">
+      <inline name="StudyCreation">
+         <script><code><![CDATA[
+import orbmodule
+import SALOMEDS_idl
+
+import HOMARD
+import HOMARD_Gen_idl
+import HOMARD_Cas_idl
+import HOMARD_Iteration_idl
+import HOMARD_Hypothesis_idl
+import HOMARD_Zone_idl
+import HOMARD_Boundary_idl
+
+clt = orbmodule.client()
+StudyManager = clt.Resolve("/myStudyManager")
+NewStudy = StudyManager.NewStudy("my_homard_study")
+]]></code></script>
+         <outport name="NewStudy" type="Study"/>
+      </inline>
+      <service name="SetCurrentStudy">
+         <component>HOMARD</component>
+         <load container="DefaultContainer"/>
+         <method>SetCurrentStudy</method>
+         <inport name="theStudy" type="Study"/>
+      </service>
+      <control> <fromnode>StudyCreation</fromnode> <tonode>SetCurrentStudy</tonode> </control>
+      <datalink control="false">
+         <fromnode>StudyCreation</fromnode> <fromport>NewStudy</fromport>
+         <tonode>SetCurrentStudy</tonode> <toport>theStudy</toport>
+      </datalink>
+   </bloc>
+   <while name="Boucle_de_convergence">
+      <bloc name="Alternance_Calcul_HOMARD">
+         <inline name="Calcul">
+            <script><code><![CDATA[
+import sys
+import os
+#
+rep_calc = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther"
+rep_script = os.path.dirname("/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py")
+sys.path.append(rep_script)
+from ScriptAster import Script
+#
+argu  = ["-v"]
+argu.append("--rep_calc=" + rep_calc)
+argu.append("--num=%d" % numCalc)
+argu.append("--mesh_file="  + MeshFile)
+#
+Script_A = Script(argu)
+#
+Error, message_erreur, dico_resu = Script_A.compute ()
+#
+dico_resu["rep_calc"] = rep_calc
+#
+]]></code></script>
+            <inport name="numCalc" type="int"/>
+            <inport name="MeshFile" type="string"/>
+            <outport name="Error" type="int"/>
+            <outport name="dico_resu" type="pyobj"/>
+         </inline>
+         <inline name="Analyse">
+            <script><code><![CDATA[
+global NumCalc
+global resu1
+# Default values
+NumCalcP1 = NumCalc + 1
+FileName = " "
+#
+NbCalcMax = 5
+#
+MessInfo = None
+Error = 0
+while not Error :
+#
+# If the computation failed, stop:
+#
+    if ErrCalc :
+        MessInfo = "Computation error # %d" % ErrCalc
+        Error = abs(ErrCalc)
+        break
+#
+# If the file is not defined, stop:
+#
+    if dico_resu.has_key("FileName") :
+        FileName = dico_resu["FileName"]
+    else :
+        MessInfo = "The file for the mesh is not defined."
+        Error = -2
+        break
+#
+# If the criterion is satisfied, stop:
+#
+    if dico_resu.has_key("V_TEST") :
+        valeur_v = dico_resu["V_TEST"]
+        if NumCalc == 0 :
+            resu1 = [valeur_v]
+        else :
+            resu1.append(valeur_v)
+        if NumCalc > 2 :
+            solu_m1 = resu1[-2]
+            rap = ( resu1[-1] - solu_m1 ) / solu_m1
+            if abs(rap) < 0.001 :
+                MessInfo = ""
+                Error = -9999
+                break
+    else :
+        MessInfo = "The value for the test is not available."
+        Error = -3
+        break
+#
+# If the maximum number of adaptations is reached, stop:
+#
+    if NumCalc > NbCalcMax :
+        MessInfo = "The maximum number of adaptations is reached: %d" % NbCalcMax
+        Error = -1
+        break
+#
+    break
+]]></code></script>
+            <inport name="NumCalc" type="int"/>
+            <inport name="ErrCalc" type="int"/>
+            <inport name="dico_resu" type="pyobj"/>
+            <outport name="Error" type="int"/>
+            <outport name="NumCalcP1" type="int"/>
+            <outport name="FileName" type="string"/>
+            <outport name="MessInfo" type="string"/>
+         </inline>
+         <switch name="Adaptation" select="0">
+            <default>
+               <bloc name="Arret_boucle">
+                  <inline name="Arret">
+                     <script><code><![CDATA[
+OK = 0
+MeshFile = " "
+]]></code></script>
+                     <inport name="MessInfo" type="string"/>
+                     <outport name="OK" type="bool"/>
+                     <outport name="MeshFile" type="string"/>
+                     <outport name="MessInfo" type="string"/>
+                  </inline>
+               </bloc>
+            </default>
+            <case id="0">
+               <bloc name="Adaptation_HOMARD">
+                  <switch name="HOMARD_Initialisation" select="0">
+                     <default>
+                        <bloc name="Iter_n">
+                           <service name="LastIteration">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>LastIteration</method>
+                              <inport name="CaseName" type="string"/>
+                              <outport name="return" type="HOMARD_Iteration"/>
+                           </service>
+                           <service name="GetHypothesis">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>GetHypothesis</method>
+                              <inport name="HypoName" type="string"/>
+                              <outport name="return" type="HOMARD_Hypothesis"/>
+                           </service>
+                           <control> <fromnode>LastIteration</fromnode> <tonode>GetHypothesis</tonode> </control>
+                        </bloc>
+                     </default>
+                     <case id="1">
+                        <bloc name="Iter_1">
+                           <service name="CreateCase">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>CreateCase</method>
+                              <inport name="CaseName" type="string"/>
+                              <inport name="MeshName" type="string"/>
+                              <inport name="FileName" type="string"/>
+                              <outport name="return" type="HOMARD_Cas"/>
+                           </service>
+                           <inline name="Case_Options">
+                              <script><code><![CDATA[
+import os
+# Directory for the adaptation
+DirName = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/HOMARD"
+Case.SetDirName(DirName)
+Case.SetConfType(1)
+# Associated iteration #0
+Iter0 = Case.GetIter0()
+]]></code></script>
+                              <inport name="Case" type="HOMARD_Cas"/>
+                              <outport name="Iter0" type="HOMARD_Iteration"/>
+                           </inline>
+                           <service name="CreateHypothesis">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>CreateHypothesis</method>
+                              <inport name="HypoName" type="string"/>
+                              <outport name="return" type="HOMARD_Hypothesis"/>
+                           </service>
+                           <control> <fromnode>CreateCase</fromnode> <tonode>Case_Options</tonode> </control>
+                           <control> <fromnode>Case_Options</fromnode> <tonode>CreateHypothesis</tonode> </control>
+
+                           <datalink control="false">
+                              <fromnode>CreateCase</fromnode> <fromport>return</fromport>
+                              <tonode>Case_Options</tonode> <toport>Case</toport>
+                           </datalink>
+                        </bloc>
+                     </case>
+                  </switch>
+                  <inline name="HOMARD_Exec">
+                     <script><code><![CDATA[
+import os
+# Directory for the computation
+DirName = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther"
+MeshName = "BOX"
+#
+# Hypothesis
+# ==========
+# . Name of the hypothesis
+# ------------------------
+HypoName = Hypo.GetName()
+#
+# . Options
+# ---------
+# . Type of adaptation: refinement and unrefinement driven by a field
+Hypo.SetAdapRefinUnRef(1, 1, 1)
+# . Name of the field
+Hypo.SetField("ERREUR")
+# . Values over meshes
+Hypo.SetUseField(0)
+# . Compoment
+Hypo.AddComp("ERTABS")
+# . Driving options
+Hypo.SetRefinThr(4, 3)
+Hypo.SetUnRefThr(4, 4)
+#
+# . Interpolation
+Hypo.SetTypeFieldInterp(2)
+Hypo.AddFieldInterp("TEMPERATURE")
+#
+# . Minimum limit size of the meshes
+aux = 0.0015
+Hypo.SetDiamMin(aux)
+#
+# Name of the next iteration
+# ==========================
+# . Name of the previous iteration
+LastIterName = LastIter.GetName()
+aux = '%03d' % NumAdapt
+# . At iteration #1, addition
+if  NumAdapt == 1 :
+  IterName = LastIterName + "_" + aux
+# . Then, substitution
+else :
+  IterName = LastIterName[:-3] + aux
+#
+# Creation of the iteration
+# =========================
+Iter = LastIter.NextIteration(IterName)
+#
+# Options of the iteration
+# ========================
+# . Association de l'hypothese
+Iter.AssociateHypo(HypoName)
+#
+# . The name of the next mesh
+Iter.SetMeshName(MeshName)
+#
+# . The file of the next mesh
+aux = '%02d' % NumAdapt
+MeshFile = os.path.join (DirName, "maill."+aux+".med")
+Iter.SetMeshFile(MeshFile)
+#
+# . The file for the fields
+FileName = dico_resu["FileName"]
+Iter.SetFieldFile(FileName)
+#
+# Calculation
+# ===========
+Error = Iter.Compute(1,1)
+#
+# The loops stops if problem
+# ==========================
+if Error :
+    OK = 0
+    MessInfo = "Error in HOMARD in the adaptation # %d" % NumAdapt
+else :
+    OK = 1
+    MessInfo = " "
+]]></code></script>
+                     <inport name="NumAdapt" type="int"/>
+                     <inport name="LastIter" type="HOMARD_Iteration"/>
+                     <inport name="Hypo" type="HOMARD_Hypothesis"/>
+                     <inport name="dico_resu" type="pyobj"/>
+                     <outport name="OK" type="bool"/>
+                     <outport name="MessInfo" type="string"/>
+                     <outport name="MeshFile" type="string"/>
+                  </inline>
+                  <control> <fromnode>HOMARD_Initialisation</fromnode> <tonode>HOMARD_Exec</tonode> </control>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.default_Iter_n.LastIteration</fromnode> <fromport>return</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>LastIter</toport>
+                  </datalink>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.p1_Iter_1.Case_Options</fromnode> <fromport>Iter0</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>LastIter</toport>
+                  </datalink>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.default_Iter_n.GetHypothesis</fromnode> <fromport>return</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>Hypo</toport>
+                  </datalink>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.p1_Iter_1.CreateHypothesis</fromnode> <fromport>return</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>Hypo</toport>
+                  </datalink>
+               </bloc>
+            </case>
+         </switch>
+         <control> <fromnode>Calcul</fromnode> <tonode>Analyse</tonode> </control>
+         <control> <fromnode>Analyse</fromnode> <tonode>Adaptation</tonode> </control>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>Error</fromport>
+            <tonode>Adaptation</tonode> <toport>select</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
+            <tonode>Calcul</tonode> <toport>numCalc</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation</tonode> <toport>select</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</tonode> <toport>NumAdapt</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>FileName</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode> <toport>FileName</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>MessInfo</fromport>
+            <tonode>Adaptation.default_Arret_boucle.Arret</tonode> <toport>MessInfo</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Calcul</fromnode> <fromport>Error</fromport>
+            <tonode>Analyse</tonode> <toport>ErrCalc</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Calcul</fromnode> <fromport>dico_resu</fromport>
+            <tonode>Analyse</tonode> <toport>dico_resu</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Calcul</fromnode> <fromport>dico_resu</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</tonode> <toport>dico_resu</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>MeshFile</fromport>
+            <tonode>Calcul</tonode> <toport>MeshFile</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>MeshFile</fromport>
+            <tonode>Calcul</tonode> <toport>MeshFile</toport>
+         </datalink>
+      </bloc>
+      <datalink control="false">
+         <fromnode>Alternance_Calcul_HOMARD.Analyse</fromnode> <fromport>NumCalcP1</fromport>
+         <tonode>Alternance_Calcul_HOMARD.Analyse</tonode> <toport>NumCalc</toport>
+      </datalink>
+   </while>
+   <inline name="Bilan">
+      <script><code><![CDATA[
+from PyQt4 import QtGui
+import sys
+app = QtGui.QApplication(sys.argv)
+MessageBoxTitle = "Bilan"
+if MessInfo == "" :
+    MessInfo = "The convergence is reached."
+    QtGui.QMessageBox.information(None, MessageBoxTitle, MessInfo)
+else :
+    QtGui.QMessageBox.critical(None, MessageBoxTitle, MessInfo)
+]]></code></script>
+      <inport name="MessInfo" type="string"/>
+   </inline>
+   <control> <fromnode>DataInit</fromnode> <tonode>Etude_Initialisation</tonode> </control>
+   <control> <fromnode>Etude_Initialisation</fromnode> <tonode>Boucle_de_convergence</tonode> </control>
+   <control> <fromnode>Boucle_de_convergence</fromnode> <tonode>Bilan</tonode> </control>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>MeshFile</fromport>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul</tonode> <toport>MeshFile</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>OK</fromport>
+      <tonode>Boucle_de_convergence</tonode> <toport>condition</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>OK</fromport>
+      <tonode>Boucle_de_convergence</tonode> <toport>condition</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>MessInfo</fromport>
+      <tonode>Bilan</tonode> <toport>MessInfo</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>MessInfo</fromport>
+      <tonode>Bilan</tonode> <toport>MessInfo</toport>
+   </datalink>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode><toport>CaseName</toport>
+      <value><string>Calcul</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul</tonode><toport>numCalc</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation</tonode><toport>select</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation</tonode><toport>select</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIteration</tonode><toport>CaseName</toport>
+      <value><string>Calcul</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesis</tonode><toport>HypoName</toport>
+      <value><string>Hypo</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesis</tonode><toport>HypoName</toport>
+      <value><string>Hypo</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence</tonode><toport>condition</toport>
+      <value><boolean>true</boolean></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse</tonode><toport>NumCalc</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse</tonode><toport>ErrCalc</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode><toport>MeshName</toport>
+      <value><string>BOX</string></value>
+   </parameter>
+
+   <presentation name="__ROOT__" x="0" y="0" width="704" height="977" expanded="1" expx="0" expy="0" expWidth="704" expHeight="977" shownState="0"/>
+   <presentation name="DataInit" x="4" y="32" width="158" height="63" expanded="1" expx="4" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation" x="175" y="32" width="158" height="38" expanded="0" expx="175" expy="32" expWidth="162.5" expHeight="40.5" shownState="1"/>
+   <presentation name="Etude_Initialisation.StudyCreation" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Etude_Initialisation.SetCurrentStudy" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence" x="4" y="103" width="569" height="514" expanded="1" expx="4" expy="103" expWidth="569" expHeight="514" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD" x="4" y="59" width="561" height="451" expanded="1" expx="10" expy="59" expWidth="561" expHeight="451" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul" x="4" y="32" width="158" height="90" expanded="1" expx="4" expy="32" expWidth="158" expHeight="90" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse" x="181" y="32" width="158" height="171" expanded="1" expx="181" expy="32" expWidth="158" expHeight="171" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation" x="4" y="204" width="553" height="243" expanded="1" expx="4" expy="204" expWidth="553" expHeight="243" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle" x="4" y="59" width="166" height="153" expanded="1" expx="4" expy="59" expWidth="166" expHeight="153" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret" x="4" y="32" width="158" height="117" expanded="1" expx="4" expy="32" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD"  x="202" y="59" width="347" height="180" expanded="1" expx="202" expy="59" expWidth="347" expHeight="180" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation" x="4" y="32" width="158" height="65" expanded="0" expx="4" expy="32" expWidth="167" expHeight="67.5" shownState="1"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1" x="0" y="0" width="162.5" height="40.5" expanded="1" expx="4" expy="59" expWidth="162.5" expHeight="40.5" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.Case_Options" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesis" x="0" y="0" width="158" height="36" expanded="1" expx="322" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n" x="0" y="0" width="162.5" height="40.5" expanded="1" expx="4" expy="1639.5" expWidth="162.5" expHeight="40.5" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIteration" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesis" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec" x="185" y="32" width="158" height="144" expanded="1" expx="185" expy="32" expWidth="158" expHeight="144" shownState="0"/>
+   <presentation name="Bilan" x="350" y="32" width="158" height="63" expanded="1" expx="350" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+</proc>
+
diff --git a/doc/files/yacs_01.fr.xml b/doc/files/yacs_01.fr.xml
new file mode 100644 (file)
index 0000000..d3eb6f0
--- /dev/null
@@ -0,0 +1,512 @@
+<?xml version='1.0' encoding='iso-8859-1' ?>
+<proc name="HOMARD">
+   <property name="DefaultStudyID" value="1"/>
+   <objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
+   <type name="string" kind="string"/>
+   <struct name="Engines/dataref">
+      <member name="ref" type="string"/>
+   </struct>
+   <objref name="HOMARD_Boundary" id="IDL:HOMARD/HOMARD_Boundary:1.0"/>
+   <objref name="HOMARD_Cas" id="IDL:HOMARD/HOMARD_Cas:1.0"/>
+   <objref name="HOMARD_Hypothesis" id="IDL:HOMARD/HOMARD_Hypothesis:1.0"/>
+   <objref name="HOMARD_Iteration" id="IDL:HOMARD/HOMARD_Iteration:1.0"/>
+   <objref name="HOMARD_Zone" id="IDL:HOMARD/HOMARD_Zone:1.0"/>
+   <objref name="Study" id="IDL:SALOMEDS/Study:1.0"/>
+   <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"/>
+   <struct name="stringpair">
+      <member name="name" type="string"/>
+      <member name="value" type="string"/>
+   </struct>
+   <sequence name="propvec" content="stringpair"/>
+   <objref name="pyobj" id="python:obj:1.0"/>
+   <sequence name="seqboolvec" content="boolvec"/>
+   <sequence name="seqdblevec" content="dblevec"/>
+   <sequence name="seqint" content="int"/>
+   <sequence name="seqintvec" content="intvec"/>
+   <sequence name="stringvec" content="string"/>
+   <sequence name="seqstringvec" content="stringvec"/>
+   <container name="DefaultContainer">
+      <property name="container_name" value="FactoryServer"/>
+      <property name="name" value="localhost"/>
+   </container>
+   <datanode name="DataInit">
+      <parameter name="MeshFile" type="string">
+         <value><string>/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med</string></value>
+      </parameter>
+   </datanode>
+   <bloc name="Etude_Initialisation">
+      <inline name="StudyCreation">
+         <script><code><![CDATA[
+import orbmodule
+import SALOMEDS_idl
+
+import HOMARD
+import HOMARD_Gen_idl
+import HOMARD_Cas_idl
+import HOMARD_Iteration_idl
+import HOMARD_Hypothesis_idl
+import HOMARD_Zone_idl
+import HOMARD_Boundary_idl
+
+clt = orbmodule.client()
+StudyManager = clt.Resolve("/myStudyManager")
+NewStudy = StudyManager.NewStudy("my_homard_study")
+]]></code></script>
+         <outport name="NewStudy" type="Study"/>
+      </inline>
+      <service name="SetCurrentStudy">
+         <component>HOMARD</component>
+         <load container="DefaultContainer"/>
+         <method>SetCurrentStudy</method>
+         <inport name="theStudy" type="Study"/>
+      </service>
+      <control> <fromnode>StudyCreation</fromnode> <tonode>SetCurrentStudy</tonode> </control>
+      <datalink control="false">
+         <fromnode>StudyCreation</fromnode> <fromport>NewStudy</fromport>
+         <tonode>SetCurrentStudy</tonode> <toport>theStudy</toport>
+      </datalink>
+   </bloc>
+   <while name="Boucle_de_convergence">
+      <bloc name="Alternance_Calcul_HOMARD">
+         <inline name="Calcul">
+            <script><code><![CDATA[
+import sys
+import os
+#
+rep_calc = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther"
+rep_script = os.path.dirname("/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py")
+sys.path.append(rep_script)
+from ScriptAster import Script
+#
+argu  = ["-v"]
+argu.append("--rep_calc=" + rep_calc)
+argu.append("--num=%d" % numCalc)
+argu.append("--mesh_file="  + MeshFile)
+#
+Script_A = Script(argu)
+#
+Error, message_erreur, dico_resu = Script_A.compute ()
+#
+dico_resu["rep_calc"] = rep_calc
+#
+]]></code></script>
+            <inport name="numCalc" type="int"/>
+            <inport name="MeshFile" type="string"/>
+            <outport name="Error" type="int"/>
+            <outport name="dico_resu" type="pyobj"/>
+         </inline>
+         <inline name="Analyse">
+            <script><code><![CDATA[
+global NumCalc
+global resu1
+# Valeurs par defaut
+NumCalcP1 = NumCalc + 1
+FileName = " "
+#
+NbCalcMax = 5
+#
+MessInfo = None
+Error = 0
+while not Error :
+#
+# Si le calcul a fini en erreur, on arrete :
+#
+    if ErrCalc :
+        MessInfo = "Erreur de calcul numero %d" % ErrCalc
+        Error = abs(ErrCalc)
+        break
+#
+# Si le fichier n'a pas ete defini, on arrete :
+#
+    if dico_resu.has_key("FileName") :
+        FileName = dico_resu["FileName"]
+    else :
+        MessInfo = "Le fichier du maillage n'a pas ete defini"
+        Error = -2
+        break
+#
+# Si le critere est respecte, on arrete :
+#
+    if dico_resu.has_key("V_TEST") :
+        valeur_v = dico_resu["V_TEST"]
+        if NumCalc == 0 :
+            resu1 = [valeur_v]
+        else :
+            resu1.append(valeur_v)
+        if NumCalc > 2 :
+            solu_m1 = resu1[-2]
+            rap = ( resu1[-1] - solu_m1 ) / solu_m1
+            if abs(rap) < 0.001 :
+                MessInfo = ""
+                Error = -9999
+                break
+    else :
+        MessInfo = "La valeur a tester n'a pas ete fournie"
+        Error = -3
+        break
+#
+# Si on depasse le maximum, on arrete :
+#
+    if NumCalc > NbCalcMax :
+        MessInfo = "La limite en nombre de calculs a ete atteinte : %d" % NbCalcMax
+        Error = -1
+        break
+#
+    break
+]]></code></script>
+            <inport name="NumCalc" type="int"/>
+            <inport name="ErrCalc" type="int"/>
+            <inport name="dico_resu" type="pyobj"/>
+            <outport name="Error" type="int"/>
+            <outport name="NumCalcP1" type="int"/>
+            <outport name="FileName" type="string"/>
+            <outport name="MessInfo" type="string"/>
+         </inline>
+         <switch name="Adaptation" select="0">
+            <default>
+               <bloc name="Arret_boucle">
+                  <inline name="Arret">
+                     <script><code><![CDATA[
+OK = 0
+MeshFile = " "
+]]></code></script>
+                     <inport name="MessInfo" type="string"/>
+                     <outport name="OK" type="bool"/>
+                     <outport name="MeshFile" type="string"/>
+                     <outport name="MessInfo" type="string"/>
+                  </inline>
+               </bloc>
+            </default>
+            <case id="0">
+               <bloc name="Adaptation_HOMARD">
+                  <switch name="HOMARD_Initialisation" select="0">
+                     <default>
+                        <bloc name="Iter_n">
+                           <service name="LastIteration">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>LastIteration</method>
+                              <inport name="CaseName" type="string"/>
+                              <outport name="return" type="HOMARD_Iteration"/>
+                           </service>
+                           <service name="GetHypothesis">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>GetHypothesis</method>
+                              <inport name="HypoName" type="string"/>
+                              <outport name="return" type="HOMARD_Hypothesis"/>
+                           </service>
+                           <control> <fromnode>LastIteration</fromnode> <tonode>GetHypothesis</tonode> </control>
+                        </bloc>
+                     </default>
+                     <case id="1">
+                        <bloc name="Iter_1">
+                           <service name="CreateCase">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>CreateCase</method>
+                              <inport name="CaseName" type="string"/>
+                              <inport name="MeshName" type="string"/>
+                              <inport name="FileName" type="string"/>
+                              <outport name="return" type="HOMARD_Cas"/>
+                           </service>
+                           <inline name="Case_Options">
+                              <script><code><![CDATA[
+import os
+# Repertoire d'adaptation
+DirName = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/HOMARD"
+Case.SetDirName(DirName)
+Case.SetConfType(1)
+# Iteration 0 associee
+Iter0 = Case.GetIter0()
+]]></code></script>
+                              <inport name="Case" type="HOMARD_Cas"/>
+                              <outport name="Iter0" type="HOMARD_Iteration"/>
+                           </inline>
+                           <service name="CreateHypothesis">
+                              <node>Etude_Initialisation.SetCurrentStudy</node>
+                              <method>CreateHypothesis</method>
+                              <inport name="HypoName" type="string"/>
+                              <outport name="return" type="HOMARD_Hypothesis"/>
+                           </service>
+                           <control> <fromnode>CreateCase</fromnode> <tonode>Case_Options</tonode> </control>
+                           <control> <fromnode>Case_Options</fromnode> <tonode>CreateHypothesis</tonode> </control>
+
+                           <datalink control="false">
+                              <fromnode>CreateCase</fromnode> <fromport>return</fromport>
+                              <tonode>Case_Options</tonode> <toport>Case</toport>
+                           </datalink>
+                        </bloc>
+                     </case>
+                  </switch>
+                  <inline name="HOMARD_Exec">
+                     <script><code><![CDATA[
+import os
+# Repertoire d'execution
+DirName = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther"
+MeshName = "BOX"
+#
+# Hypothese
+# =========
+# . Nom de l'hypothese
+# --------------------
+HypoName = Hypo.GetName()
+#
+# . Options
+# ---------
+# . Le mode d'adaptation : raffinement et deraffinement selon un champ
+Hypo.SetAdapRefinUnRef(1, 1, 1)
+# . Nom du champ
+Hypo.SetField("ERREUR")
+# . Valeurs prises par maille
+Hypo.SetUseField(0)
+# . Composante
+Hypo.AddComp("ERTABS")
+# . Mode de pilotage
+Hypo.SetRefinThr(4, 3)
+Hypo.SetUnRefThr(4, 4)
+#
+# . Interpolation
+Hypo.SetTypeFieldInterp(2)
+Hypo.AddFieldInterp("TEMPERATURE")
+#
+# . Taille de maille limite
+aux = 0.0015
+Hypo.SetDiamMin(aux)
+#
+# Nom de la future iteration
+# ==========================
+# . Nom de l'iteration precedente
+LastIterName = LastIter.GetName()
+aux = '%03d' % NumAdapt
+# . A l'iteration 1, on complete
+if  NumAdapt == 1 :
+  IterName = LastIterName + "_" + aux
+# . Ensuite, on substitue
+else :
+  IterName = LastIterName[:-3] + aux
+#
+# Creation de l'iteration
+# =======================
+Iter = LastIter.NextIteration(IterName)
+#
+# Options de l'iteration
+# ======================
+# . Association de l'hypothese
+Iter.AssociateHypo(HypoName)
+#
+# . Le nom du futur maillage
+Iter.SetMeshName(MeshName)
+#
+# . Le fichier du futur maillage
+aux = '%02d' % NumAdapt
+MeshFile = os.path.join (DirName, "maill."+aux+".med")
+Iter.SetMeshFile(MeshFile)
+#
+# . Le fichier contenant les champs
+FileName = dico_resu["FileName"]
+Iter.SetFieldFile(FileName)
+#
+# Calcul
+# ======
+Error = Iter.Compute(1,1)
+#
+# Arret de la boucle si erreur
+# ============================
+if Error :
+    OK = 0
+    MessInfo = "Erreur dans HOMARD pour l'adaptation numero %d" % NumAdapt
+else :
+    OK = 1
+    MessInfo = " "
+]]></code></script>
+                     <inport name="NumAdapt" type="int"/>
+                     <inport name="LastIter" type="HOMARD_Iteration"/>
+                     <inport name="Hypo" type="HOMARD_Hypothesis"/>
+                     <inport name="dico_resu" type="pyobj"/>
+                     <outport name="OK" type="bool"/>
+                     <outport name="MessInfo" type="string"/>
+                     <outport name="MeshFile" type="string"/>
+                  </inline>
+                  <control> <fromnode>HOMARD_Initialisation</fromnode> <tonode>HOMARD_Exec</tonode> </control>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.default_Iter_n.LastIteration</fromnode> <fromport>return</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>LastIter</toport>
+                  </datalink>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.p1_Iter_1.Case_Options</fromnode> <fromport>Iter0</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>LastIter</toport>
+                  </datalink>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.default_Iter_n.GetHypothesis</fromnode> <fromport>return</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>Hypo</toport>
+                  </datalink>
+                  <datalink control="false">
+                     <fromnode>HOMARD_Initialisation.p1_Iter_1.CreateHypothesis</fromnode> <fromport>return</fromport>
+                     <tonode>HOMARD_Exec</tonode> <toport>Hypo</toport>
+                  </datalink>
+               </bloc>
+            </case>
+         </switch>
+         <control> <fromnode>Calcul</fromnode> <tonode>Analyse</tonode> </control>
+         <control> <fromnode>Analyse</fromnode> <tonode>Adaptation</tonode> </control>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>Error</fromport>
+            <tonode>Adaptation</tonode> <toport>select</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
+            <tonode>Calcul</tonode> <toport>numCalc</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation</tonode> <toport>select</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</tonode> <toport>NumAdapt</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>FileName</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode> <toport>FileName</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Analyse</fromnode> <fromport>MessInfo</fromport>
+            <tonode>Adaptation.default_Arret_boucle.Arret</tonode> <toport>MessInfo</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Calcul</fromnode> <fromport>Error</fromport>
+            <tonode>Analyse</tonode> <toport>ErrCalc</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Calcul</fromnode> <fromport>dico_resu</fromport>
+            <tonode>Analyse</tonode> <toport>dico_resu</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Calcul</fromnode> <fromport>dico_resu</fromport>
+            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</tonode> <toport>dico_resu</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>MeshFile</fromport>
+            <tonode>Calcul</tonode> <toport>MeshFile</toport>
+         </datalink>
+         <datalink control="false">
+            <fromnode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>MeshFile</fromport>
+            <tonode>Calcul</tonode> <toport>MeshFile</toport>
+         </datalink>
+      </bloc>
+      <datalink control="false">
+         <fromnode>Alternance_Calcul_HOMARD.Analyse</fromnode> <fromport>NumCalcP1</fromport>
+         <tonode>Alternance_Calcul_HOMARD.Analyse</tonode> <toport>NumCalc</toport>
+      </datalink>
+   </while>
+   <inline name="Bilan">
+      <script><code><![CDATA[
+from PyQt4 import QtGui
+import sys
+app = QtGui.QApplication(sys.argv)
+MessageBoxTitle = "Bilan"
+if MessInfo == "" :
+    MessInfo = "Le calcul est converge."
+    QtGui.QMessageBox.information(None, MessageBoxTitle, MessInfo)
+else :
+    QtGui.QMessageBox.critical(None, MessageBoxTitle, MessInfo)
+]]></code></script>
+      <inport name="MessInfo" type="string"/>
+   </inline>
+   <control> <fromnode>DataInit</fromnode> <tonode>Etude_Initialisation</tonode> </control>
+   <control> <fromnode>Etude_Initialisation</fromnode> <tonode>Boucle_de_convergence</tonode> </control>
+   <control> <fromnode>Boucle_de_convergence</fromnode> <tonode>Bilan</tonode> </control>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>MeshFile</fromport>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul</tonode> <toport>MeshFile</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>OK</fromport>
+      <tonode>Boucle_de_convergence</tonode> <toport>condition</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>OK</fromport>
+      <tonode>Boucle_de_convergence</tonode> <toport>condition</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>MessInfo</fromport>
+      <tonode>Bilan</tonode> <toport>MessInfo</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>MessInfo</fromport>
+      <tonode>Bilan</tonode> <toport>MessInfo</toport>
+   </datalink>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode><toport>CaseName</toport>
+      <value><string>Calcul</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul</tonode><toport>numCalc</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation</tonode><toport>select</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation</tonode><toport>select</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIteration</tonode><toport>CaseName</toport>
+      <value><string>Calcul</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesis</tonode><toport>HypoName</toport>
+      <value><string>Hypo</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesis</tonode><toport>HypoName</toport>
+      <value><string>Hypo</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence</tonode><toport>condition</toport>
+      <value><boolean>true</boolean></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse</tonode><toport>NumCalc</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse</tonode><toport>ErrCalc</toport>
+      <value><int>0</int></value>
+   </parameter>
+   <parameter>
+      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode><toport>MeshName</toport>
+      <value><string>BOX</string></value>
+   </parameter>
+
+   <presentation name="__ROOT__" x="0" y="0" width="704" height="977" expanded="1" expx="0" expy="0" expWidth="704" expHeight="977" shownState="0"/>
+   <presentation name="DataInit" x="4" y="32" width="158" height="63" expanded="1" expx="4" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation" x="175" y="32" width="158" height="38" expanded="0" expx="175" expy="32" expWidth="162.5" expHeight="40.5" shownState="1"/>
+   <presentation name="Etude_Initialisation.StudyCreation" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Etude_Initialisation.SetCurrentStudy" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence" x="4" y="103" width="569" height="514" expanded="1" expx="4" expy="103" expWidth="569" expHeight="514" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD" x="4" y="59" width="561" height="451" expanded="1" expx="10" expy="59" expWidth="561" expHeight="451" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul" x="4" y="32" width="158" height="90" expanded="1" expx="4" expy="32" expWidth="158" expHeight="90" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse" x="181" y="32" width="158" height="171" expanded="1" expx="181" expy="32" expWidth="158" expHeight="171" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation" x="4" y="204" width="553" height="243" expanded="1" expx="4" expy="204" expWidth="553" expHeight="243" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle" x="4" y="59" width="166" height="153" expanded="1" expx="4" expy="59" expWidth="166" expHeight="153" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret" x="4" y="32" width="158" height="117" expanded="1" expx="4" expy="32" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD"  x="202" y="59" width="347" height="180" expanded="1" expx="202" expy="59" expWidth="347" expHeight="180" shownState="0"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation" x="4" y="32" width="158" height="65" expanded="0" expx="4" expy="32" expWidth="167" expHeight="67.5" shownState="1"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1" x="0" y="0" width="162.5" height="40.5" expanded="1" expx="4" expy="59" expWidth="162.5" expHeight="40.5" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.Case_Options" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesis" x="0" y="0" width="158" height="36" expanded="1" expx="322" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n" x="0" y="0" width="162.5" height="40.5" expanded="1" expx="4" expy="1639.5" expWidth="162.5" expHeight="40.5" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIteration" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesis" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
+   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec" x="185" y="32" width="158" height="144" expanded="1" expx="185" expy="32" expWidth="158" expHeight="144" shownState="0"/>
+   <presentation name="Bilan" x="350" y="32" width="158" height="63" expanded="1" expx="350" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+</proc>
+
diff --git a/doc/files/yacs_01.xml b/doc/files/yacs_01.xml
deleted file mode 100644 (file)
index c62572b..0000000
+++ /dev/null
@@ -1,512 +0,0 @@
-<?xml version='1.0' encoding='iso-8859-1' ?>
-<proc name="HOMARD">
-   <property name="DefaultStudyID" value="1"/>
-   <objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
-   <type name="string" kind="string"/>
-   <struct name="Engines/dataref">
-      <member name="ref" type="string"/>
-   </struct>
-   <objref name="HOMARD_Boundary" id="IDL:HOMARD/HOMARD_Boundary:1.0"/>
-   <objref name="HOMARD_Cas" id="IDL:HOMARD/HOMARD_Cas:1.0"/>
-   <objref name="HOMARD_Hypothesis" id="IDL:HOMARD/HOMARD_Hypothesis:1.0"/>
-   <objref name="HOMARD_Iteration" id="IDL:HOMARD/HOMARD_Iteration:1.0"/>
-   <objref name="HOMARD_Zone" id="IDL:HOMARD/HOMARD_Zone:1.0"/>
-   <objref name="Study" id="IDL:SALOMEDS/Study:1.0"/>
-   <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"/>
-   <struct name="stringpair">
-      <member name="name" type="string"/>
-      <member name="value" type="string"/>
-   </struct>
-   <sequence name="propvec" content="stringpair"/>
-   <objref name="pyobj" id="python:obj:1.0"/>
-   <sequence name="seqboolvec" content="boolvec"/>
-   <sequence name="seqdblevec" content="dblevec"/>
-   <sequence name="seqint" content="int"/>
-   <sequence name="seqintvec" content="intvec"/>
-   <sequence name="stringvec" content="string"/>
-   <sequence name="seqstringvec" content="stringvec"/>
-   <container name="DefaultContainer">
-      <property name="container_name" value="FactoryServer"/>
-      <property name="name" value="localhost"/>
-   </container>
-   <datanode name="DataInit">
-      <parameter name="MeshFile" type="string">
-         <value><string>/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med</string></value>
-      </parameter>
-   </datanode>
-   <bloc name="Etude_Initialisation">
-      <inline name="StudyCreation">
-         <script><code><![CDATA[
-import orbmodule
-import SALOMEDS_idl
-
-import HOMARD
-import HOMARD_Gen_idl
-import HOMARD_Cas_idl
-import HOMARD_Iteration_idl
-import HOMARD_Hypothesis_idl
-import HOMARD_Zone_idl
-import HOMARD_Boundary_idl
-
-clt = orbmodule.client()
-StudyManager = clt.Resolve("/myStudyManager")
-NewStudy = StudyManager.NewStudy("my_homard_study")
-]]></code></script>
-         <outport name="NewStudy" type="Study"/>
-      </inline>
-      <service name="SetCurrentStudy">
-         <component>HOMARD</component>
-         <load container="DefaultContainer"/>
-         <method>SetCurrentStudy</method>
-         <inport name="theStudy" type="Study"/>
-      </service>
-      <control> <fromnode>StudyCreation</fromnode> <tonode>SetCurrentStudy</tonode> </control>
-      <datalink control="false">
-         <fromnode>StudyCreation</fromnode> <fromport>NewStudy</fromport>
-         <tonode>SetCurrentStudy</tonode> <toport>theStudy</toport>
-      </datalink>
-   </bloc>
-   <while name="Boucle_de_convergence">
-      <bloc name="Alternance_Calcul_HOMARD">
-         <inline name="Calcul">
-            <script><code><![CDATA[
-import sys
-import os
-#
-rep_calc = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther"
-rep_script = os.path.dirname("/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py")
-sys.path.append(rep_script)
-from ScriptAster import Script
-#
-argu  = ["-v"]
-argu.append("--rep_calc=" + rep_calc)
-argu.append("--num=%d" % numCalc)
-argu.append("--mesh_file="  + MeshFile)
-#
-Script_A = Script(argu)
-#
-Error, message_erreur, dico_resu = Script_A.compute ()
-#
-dico_resu["rep_calc"] = rep_calc
-#
-]]></code></script>
-            <inport name="numCalc" type="int"/>
-            <inport name="MeshFile" type="string"/>
-            <outport name="Error" type="int"/>
-            <outport name="dico_resu" type="pyobj"/>
-         </inline>
-         <inline name="Analyse">
-            <script><code><![CDATA[
-global NumCalc
-global resu1
-# Valeurs par defaut
-NumCalcP1 = NumCalc + 1
-FileName = " "
-#
-NbCalcMax = 5
-#
-MessInfo = None
-Error = 0
-while not Error :
-#
-# Si le calcul a fini en erreur, on arrete :
-#
-    if ErrCalc :
-        MessInfo = "Erreur de calcul numero %d" % ErrCalc
-        Error = abs(ErrCalc)
-        break
-#
-# Si le fichier n'a pas ete defini, on arrete :
-#
-    if dico_resu.has_key("FileName") :
-        FileName = dico_resu["FileName"]
-    else :
-        MessInfo = "Le fichier du maillage n'a pas ete defini"
-        Error = -2
-        break
-#
-# Si le critere est respecte, on arrete :
-#
-    if dico_resu.has_key("V_TEST") :
-        valeur_v = dico_resu["V_TEST"]
-        if NumCalc == 0 :
-            resu1 = [valeur_v]
-        else :
-            resu1.append(valeur_v)
-        if NumCalc > 2 :
-            solu_m1 = resu1[-2]
-            rap = ( resu1[-1] - solu_m1 ) / solu_m1
-            if abs(rap) < 0.001 :
-                MessInfo = ""
-                Error = -9999
-                break
-    else :
-        MessInfo = "La valeur a tester n'a pas ete fournie"
-        Error = -3
-        break
-#
-# Si on depasse le maximum, on arrete :
-#
-    if NumCalc > NbCalcMax :
-        MessInfo = "La limite en nombre de calculs a ete atteinte : %d" % NbCalcMax
-        Error = -1
-        break
-#
-    break
-]]></code></script>
-            <inport name="NumCalc" type="int"/>
-            <inport name="ErrCalc" type="int"/>
-            <inport name="dico_resu" type="pyobj"/>
-            <outport name="Error" type="int"/>
-            <outport name="NumCalcP1" type="int"/>
-            <outport name="FileName" type="string"/>
-            <outport name="MessInfo" type="string"/>
-         </inline>
-         <switch name="Adaptation" select="0">
-            <default>
-               <bloc name="Arret_boucle">
-                  <inline name="Arret">
-                     <script><code><![CDATA[
-OK = 0
-MeshFile = " "
-]]></code></script>
-                     <inport name="MessInfo" type="string"/>
-                     <outport name="OK" type="bool"/>
-                     <outport name="MeshFile" type="string"/>
-                     <outport name="MessInfo" type="string"/>
-                  </inline>
-               </bloc>
-            </default>
-            <case id="0">
-               <bloc name="Adaptation_HOMARD">
-                  <switch name="HOMARD_Initialisation" select="0">
-                     <default>
-                        <bloc name="Iter_n">
-                           <service name="LastIteration">
-                              <node>Etude_Initialisation.SetCurrentStudy</node>
-                              <method>LastIteration</method>
-                              <inport name="CaseName" type="string"/>
-                              <outport name="return" type="HOMARD_Iteration"/>
-                           </service>
-                           <service name="GetHypothesis">
-                              <node>Etude_Initialisation.SetCurrentStudy</node>
-                              <method>GetHypothesis</method>
-                              <inport name="HypoName" type="string"/>
-                              <outport name="return" type="HOMARD_Hypothesis"/>
-                           </service>
-                           <control> <fromnode>LastIteration</fromnode> <tonode>GetHypothesis</tonode> </control>
-                        </bloc>
-                     </default>
-                     <case id="1">
-                        <bloc name="Iter_1">
-                           <service name="CreateCase">
-                              <node>Etude_Initialisation.SetCurrentStudy</node>
-                              <method>CreateCase</method>
-                              <inport name="CaseName" type="string"/>
-                              <inport name="MeshName" type="string"/>
-                              <inport name="FileName" type="string"/>
-                              <outport name="return" type="HOMARD_Cas"/>
-                           </service>
-                           <inline name="Case_Options">
-                              <script><code><![CDATA[
-import os
-# Repertoire d'execution
-DirName = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/HOMARD"
-Case.SetDirName(DirName)
-Case.SetConfType(1)
-# Iteration 0 associee
-Iter0 = Case.GetIter0()
-]]></code></script>
-                              <inport name="Case" type="HOMARD_Cas"/>
-                              <outport name="Iter0" type="HOMARD_Iteration"/>
-                           </inline>
-                           <service name="CreateHypothesis">
-                              <node>Etude_Initialisation.SetCurrentStudy</node>
-                              <method>CreateHypothesis</method>
-                              <inport name="HypoName" type="string"/>
-                              <outport name="return" type="HOMARD_Hypothesis"/>
-                           </service>
-                           <control> <fromnode>CreateCase</fromnode> <tonode>Case_Options</tonode> </control>
-                           <control> <fromnode>Case_Options</fromnode> <tonode>CreateHypothesis</tonode> </control>
-
-                           <datalink control="false">
-                              <fromnode>CreateCase</fromnode> <fromport>return</fromport>
-                              <tonode>Case_Options</tonode> <toport>Case</toport>
-                           </datalink>
-                        </bloc>
-                     </case>
-                  </switch>
-                  <inline name="HOMARD_Exec">
-                     <script><code><![CDATA[
-import os
-# Repertoire d'execution
-DirName = "/scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther"
-MeshName = "BOX"
-#
-# Hypothese
-# =========
-# . Nom de l'hypothese
-# --------------------
-HypoName = Hypo.GetName()
-#
-# . Options
-# ---------
-# . Le mode d'adaptation : raffinement selon un champ
-Hypo.SetAdapRefinUnRef(1, 1, 1)
-# . Nom du champ
-Hypo.SetField("ERREUR")
-# . Valeurs prises par maille
-Hypo.SetUseField(0)
-# . Composante
-Hypo.AddComp("ERTABS")
-# . Mode de pilotage
-Hypo.SetRefinThr(4, 3)
-Hypo.SetUnRefThr(4, 4)
-#
-# . Interpolation
-Hypo.SetTypeFieldInterp(2)
-Hypo.AddFieldInterp("TEMPERATURE")
-#
-# . Taille de maille limite
-aux = 0.0015
-Hypo.SetDiamMin(aux)
-#
-# Nom de la future iteration
-# ==========================
-# . Nom de l'iteration precedente
-LastIterName = LastIter.GetName()
-aux = '%03d' % NumAdapt
-# . A l'iteration 1, on complete
-if  NumAdapt == 1 :
-  IterName = LastIterName + "_" + aux
-# . Ensuite, on substitue
-else :
-  IterName = LastIterName[:-3] + aux
-#
-# Creation de l'iteration
-# =======================
-Iter = LastIter.NextIteration(IterName)
-#
-# Options de l'iteration
-# ======================
-# . Association de l'hypothese
-Iter.AssociateHypo(HypoName)
-#
-# . Le nom du futur maillage
-Iter.SetMeshName(MeshName)
-#
-# . Le fichier du futur maillage
-aux = '%02d' % NumAdapt
-MeshFile = os.path.join (DirName, "maill."+aux+".med")
-Iter.SetMeshFile(MeshFile)
-#
-# . Le fichier contenant les champs
-FileName = dico_resu["FileName"]
-Iter.SetFieldFile(FileName)
-#
-# Calcul
-# ======
-Error = Iter.Compute(1,1)
-#
-# Arret de la boucle si erreur
-# ============================
-if Error :
-    OK = 0
-    MessInfo = "Erreur dans HOMARD pour l'adaptation numero %d" % NumAdapt
-else :
-    OK = 1
-    MessInfo = " "
-]]></code></script>
-                     <inport name="NumAdapt" type="int"/>
-                     <inport name="LastIter" type="HOMARD_Iteration"/>
-                     <inport name="Hypo" type="HOMARD_Hypothesis"/>
-                     <inport name="dico_resu" type="pyobj"/>
-                     <outport name="OK" type="bool"/>
-                     <outport name="MessInfo" type="string"/>
-                     <outport name="MeshFile" type="string"/>
-                  </inline>
-                  <control> <fromnode>HOMARD_Initialisation</fromnode> <tonode>HOMARD_Exec</tonode> </control>
-                  <datalink control="false">
-                     <fromnode>HOMARD_Initialisation.default_Iter_n.LastIteration</fromnode> <fromport>return</fromport>
-                     <tonode>HOMARD_Exec</tonode> <toport>LastIter</toport>
-                  </datalink>
-                  <datalink control="false">
-                     <fromnode>HOMARD_Initialisation.p1_Iter_1.Case_Options</fromnode> <fromport>Iter0</fromport>
-                     <tonode>HOMARD_Exec</tonode> <toport>LastIter</toport>
-                  </datalink>
-                  <datalink control="false">
-                     <fromnode>HOMARD_Initialisation.default_Iter_n.GetHypothesis</fromnode> <fromport>return</fromport>
-                     <tonode>HOMARD_Exec</tonode> <toport>Hypo</toport>
-                  </datalink>
-                  <datalink control="false">
-                     <fromnode>HOMARD_Initialisation.p1_Iter_1.CreateHypothesis</fromnode> <fromport>return</fromport>
-                     <tonode>HOMARD_Exec</tonode> <toport>Hypo</toport>
-                  </datalink>
-               </bloc>
-            </case>
-         </switch>
-         <control> <fromnode>Calcul</fromnode> <tonode>Analyse</tonode> </control>
-         <control> <fromnode>Analyse</fromnode> <tonode>Adaptation</tonode> </control>
-         <datalink control="false">
-            <fromnode>Analyse</fromnode> <fromport>Error</fromport>
-            <tonode>Adaptation</tonode> <toport>select</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
-            <tonode>Calcul</tonode> <toport>numCalc</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
-            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation</tonode> <toport>select</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Analyse</fromnode> <fromport>NumCalcP1</fromport>
-            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</tonode> <toport>NumAdapt</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Analyse</fromnode> <fromport>FileName</fromport>
-            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode> <toport>FileName</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Analyse</fromnode> <fromport>MessInfo</fromport>
-            <tonode>Adaptation.default_Arret_boucle.Arret</tonode> <toport>MessInfo</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Calcul</fromnode> <fromport>Error</fromport>
-            <tonode>Analyse</tonode> <toport>ErrCalc</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Calcul</fromnode> <fromport>dico_resu</fromport>
-            <tonode>Analyse</tonode> <toport>dico_resu</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Calcul</fromnode> <fromport>dico_resu</fromport>
-            <tonode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</tonode> <toport>dico_resu</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>MeshFile</fromport>
-            <tonode>Calcul</tonode> <toport>MeshFile</toport>
-         </datalink>
-         <datalink control="false">
-            <fromnode>Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>MeshFile</fromport>
-            <tonode>Calcul</tonode> <toport>MeshFile</toport>
-         </datalink>
-      </bloc>
-      <datalink control="false">
-         <fromnode>Alternance_Calcul_HOMARD.Analyse</fromnode> <fromport>NumCalcP1</fromport>
-         <tonode>Alternance_Calcul_HOMARD.Analyse</tonode> <toport>NumCalc</toport>
-      </datalink>
-   </while>
-   <inline name="Bilan">
-      <script><code><![CDATA[
-from PyQt4 import QtGui
-import sys
-app = QtGui.QApplication(sys.argv)
-MessageBoxTitle = "Bilan"
-if MessInfo == "" :
-    MessInfo = "Le calcul est converge."
-    QtGui.QMessageBox.information(None, MessageBoxTitle, MessInfo)
-else :
-    QtGui.QMessageBox.critical(None, MessageBoxTitle, MessInfo)
-]]></code></script>
-      <inport name="MessInfo" type="string"/>
-   </inline>
-   <control> <fromnode>DataInit</fromnode> <tonode>Etude_Initialisation</tonode> </control>
-   <control> <fromnode>Etude_Initialisation</fromnode> <tonode>Boucle_de_convergence</tonode> </control>
-   <control> <fromnode>Boucle_de_convergence</fromnode> <tonode>Bilan</tonode> </control>
-   <datalink control="false">
-      <fromnode>DataInit</fromnode> <fromport>MeshFile</fromport>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul</tonode> <toport>MeshFile</toport>
-   </datalink>
-   <datalink control="false">
-      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>OK</fromport>
-      <tonode>Boucle_de_convergence</tonode> <toport>condition</toport>
-   </datalink>
-   <datalink control="false">
-      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>OK</fromport>
-      <tonode>Boucle_de_convergence</tonode> <toport>condition</toport>
-   </datalink>
-   <datalink control="false">
-      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret</fromnode> <fromport>MessInfo</fromport>
-      <tonode>Bilan</tonode> <toport>MessInfo</toport>
-   </datalink>
-   <datalink control="false">
-      <fromnode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec</fromnode> <fromport>MessInfo</fromport>
-      <tonode>Bilan</tonode> <toport>MessInfo</toport>
-   </datalink>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode><toport>CaseName</toport>
-      <value><string>Calcul</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul</tonode><toport>numCalc</toport>
-      <value><int>0</int></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation</tonode><toport>select</toport>
-      <value><int>0</int></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation</tonode><toport>select</toport>
-      <value><int>0</int></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIteration</tonode><toport>CaseName</toport>
-      <value><string>Calcul</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesis</tonode><toport>HypoName</toport>
-      <value><string>Hypo</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesis</tonode><toport>HypoName</toport>
-      <value><string>Hypo</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence</tonode><toport>condition</toport>
-      <value><boolean>true</boolean></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse</tonode><toport>NumCalc</toport>
-      <value><int>0</int></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse</tonode><toport>ErrCalc</toport>
-      <value><int>0</int></value>
-   </parameter>
-   <parameter>
-      <tonode>Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase</tonode><toport>MeshName</toport>
-      <value><string>BOX</string></value>
-   </parameter>
-
-   <presentation name="__ROOT__" x="0" y="0" width="704" height="977" expanded="1" expx="0" expy="0" expWidth="704" expHeight="977" shownState="0"/>
-   <presentation name="DataInit" x="4" y="32" width="158" height="63" expanded="1" expx="4" expy="32" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="Etude_Initialisation" x="175" y="32" width="158" height="38" expanded="0" expx="175" expy="32" expWidth="162.5" expHeight="40.5" shownState="1"/>
-   <presentation name="Etude_Initialisation.StudyCreation" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Etude_Initialisation.SetCurrentStudy" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Boucle_de_convergence" x="4" y="103" width="569" height="514" expanded="1" expx="4" expy="103" expWidth="569" expHeight="514" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD" x="4" y="59" width="561" height="451" expanded="1" expx="10" expy="59" expWidth="561" expHeight="451" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul" x="4" y="32" width="158" height="90" expanded="1" expx="4" expy="32" expWidth="158" expHeight="90" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Analyse" x="181" y="32" width="158" height="171" expanded="1" expx="181" expy="32" expWidth="158" expHeight="171" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation" x="4" y="204" width="553" height="243" expanded="1" expx="4" expy="204" expWidth="553" expHeight="243" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle" x="4" y="59" width="166" height="153" expanded="1" expx="4" expy="59" expWidth="166" expHeight="153" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret" x="4" y="32" width="158" height="117" expanded="1" expx="4" expy="32" expWidth="158" expHeight="117" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD"  x="202" y="59" width="347" height="180" expanded="1" expx="202" expy="59" expWidth="347" expHeight="180" shownState="0"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation" x="4" y="32" width="158" height="65" expanded="0" expx="4" expy="32" expWidth="167" expHeight="67.5" shownState="1"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1" x="0" y="0" width="162.5" height="40.5" expanded="1" expx="4" expy="59" expWidth="162.5" expHeight="40.5" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.Case_Options" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesis" x="0" y="0" width="158" height="36" expanded="1" expx="322" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n" x="0" y="0" width="162.5" height="40.5" expanded="1" expx="4" expy="1639.5" expWidth="162.5" expHeight="40.5" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIteration" x="0" y="0" width="158" height="36" expanded="1" expx="4" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesis" x="0" y="0" width="158" height="36" expanded="1" expx="163" expy="32" expWidth="158" expHeight="36" shownState="2"/>
-   <presentation name="Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec" x="185" y="32" width="158" height="144" expanded="1" expx="185" expy="32" expWidth="158" expHeight="144" shownState="0"/>
-   <presentation name="Bilan" x="350" y="32" width="158" height="63" expanded="1" expx="350" expy="32" expWidth="158" expHeight="63" shownState="0"/>
-</proc>
-
index a2fdeb48d7d06db4ba9c1ece5e14a1cb808bb013..18b0b03ca355a4c01967325fb59745fd72ec23e9 100644 (file)
@@ -40,7 +40,7 @@ DataInit
 
 Cette boîte est un noeud élémentaire de type PresetNode. Sa seule fonction est d'initialiser la variable MeshFile qui contient le nom du fichier du maillage initial.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 38-42
 
 Etude_Initialisation
@@ -58,12 +58,12 @@ La bo
 
 Le noeud python StudyCreation sert à initialiser l'étude SALOME qui est fournie en sortie :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 44-62
 
 Le service SetCurrentStudy affecte cette étude à une instance de HOMARD.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 63-68
 
 
@@ -87,7 +87,7 @@ Bilan
 
 Cette boîte est un noeud python qui prend en entrée une chaîne de caractères, MessInfo. Si tout s'est bien passé, ce message est vide. Une fenêtre QT apparaît pour confirmer la convergence. S'il y a eu un problème, le message contient les messages émis au cours des calculs. La fenêtre QT affiche ce message.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 406-419
 
 
@@ -111,7 +111,7 @@ Calcul
 
 Cette boîte est un noeud python qui va piloter le calcul. En entrée, on trouve le numéro du calcul (0 au départ) et le nom du fichier qui contient le maillage sur lequel calculer. En sortie, on trouve un entier qui représente l'erreur sur ce calcul (0 si tout va bien) et un dictionnaire python rassemblant les résultats du calcul. Le corps du noeud est constitué par le lancement d'un script python qui active le calcul.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 77-103
 
 Dans cet exemple, il faut définir :
@@ -151,23 +151,23 @@ Iter_1
 
 Cette boîte commence par créer le cas HOMARD en appelant le service CreateCase.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 208-215
 
 Le nom du cas CaseName est imposé à "Calcul". Le paramètre d'entrée MeshName est imposé à "BOX". Le paramètre d'entrée FileName est issu de la sortie du calcul précédent. Le paramètre de sortie est une instance de cas.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 443-446
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 483-486
 
 Les options de ce cas doivent maintenant être renseignées. C'est fait par le noeud python CaseOptions. Il est impératif de renseigner le répertoire de calcul. On regardera la description des fonctions dans :ref:`tui_create_case`. En sortie, on récupère l'instance de l'itération correspondant à l'état initial du cas.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 216-228
 
-Enfin, une hypothèse est créée en appelant le service CreateHypothèse. Le paramètre de sortie est une instance d'hypothèse.
+Enfin, une hypothèse est créée en appelant le service CreateHypothese. Le paramètre de sortie est une instance d'hypothèse.
 
 Homard_Exec
 ^^^^^^^^^^^
@@ -181,32 +181,32 @@ Une fois initialis
 
 Le répertoire de calcul est récupéré. Le nom du maillage est rappelé.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 245-250
 
 ../..
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 325-333
 
 L'hypothèse transmise en paramètre d'entrée est caractérisée (voir :ref:`tui_create_hypothese`) :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 254-278
 
 Il faut établir un nom pour la future itération. Pour s'assurer que le nom n'a jamais été utilisé, on met en place un mécanisme de nommage incrémental à partir du nom de l'itération initiale. Comme ce nom initial est le nom du maillage initial, on obtient une succession de noms sous la forme : M_001, M_002, M_003, etc.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 280-290
 
 L'itération est complétée : hypothèse, futur maillage, champ (voir :ref:`tui_create_iteration`) :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 292-311
 
 L'itération est calculée. Si tout s'est bien passé, la variable OK vaut 1 : on pourra continuer l'exécution du schéma. S'il y a eu un problème, la variable OK vaut 0 pour signifier que le calcul doit s'arrêter ; on donne alors un message d'erreur.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 313-324
 
 Après cette exécution, le processus sort du noeud Adaptation_HOMARD, puis du noeud Adaptation. On arrive alors au noeud d'analyse.
@@ -236,7 +236,7 @@ Arret_boucle
 
 Le bloc Arret_boucle n'est présent que pour faire transiter des variables car les paramètres d'entrée des noeuds doivent toujours être remplis. C'est un python très simple :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 173-184
 
 Analyse
@@ -249,39 +249,39 @@ Analyse
 
 Le bloc Analyse est un script python qui assure le contrôle complet du processus en examinant successivement les causes d'erreur possible.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 104-116
 
 ../..
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 162-170
 
 On commence par analyser le retour du code de calcul :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 118-123
 
 Vérification de la présence du nom du fichier de résultats dans le dictionnaire des résultats :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 125-132
 
 Vérification de la convergence. Cela suppose que la valeur à tester est présente dans le dictionnaire sous la clé 'V_TEST'. Ici, on a mis en place un test sur la variation de la valeur d'un calcul à l'autre. Au premier passage, on ne teste rien. Aux passages suivants, on teste si la variation relative est inférieure à 1 millième. On aurait pu mettre en place un test absolu si on avait récupéré un niveau global d'erreur par exemple.
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 134-152
 
 Enfin, on vérifie que l'on ne dépasse pas un nombre maximal d'adaptations :
 
-.. literalinclude:: ../files/yacs_01.xml
+.. literalinclude:: ../files/yacs_01.fr.xml
    :lines: 154-159
 
 
 Utiliser ce schéma
 ******************
 Pour reproduire cet exemple, on pourra télécharger :
-  * :download:`le schéma <../files/yacs_01.xml>`
+  * :download:`le schéma <../files/yacs_01.fr.xml>`
   * :download:`un exemple de script python <../files/yacs_script.py>`
 
 Il faut l'adapter à la simulation envisagée. En particulier, il faut :
index 724e7948907e0ce090db9e816c87f3bf0cf5d666..29eabb2472f8bdadacad8f198971c9caa89bf3e0 100644 (file)
@@ -52,67 +52,67 @@ module HOMARD
 // A.1. Les creations
 //
     HOMARD_Boundary   CreateBoundaryDi (in string BoundaryName, in string MeshName, in string FileName)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Boundary   CreateBoundaryCylinder (in string BoundaryName,
                                       in double Xcentre, in double Ycentre, in double Zcentre,
                                       in double Xaxis, in double Yaxis, in double Zaxis,
                                       in double Radius)
-                                                           raises (SALOME::SALOME_Exception);
+    raises (SALOME::SALOME_Exception);
     HOMARD_Boundary   CreateBoundarySphere (in string BoundaryName,
                                       in double Xcentre, in double Ycentre, in double Zcentre,
                                       in double Radius)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Boundary   CreateBoundaryConeR (in string BoundaryName,
                                       in double Xcentre1, in double Ycentre1, in double Zcentre1, in double Radius1,
                                       in double Xcentre2, in double Ycentre2, in double Zcentre2, in double Radius2)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Boundary   CreateBoundaryConeA (in string BoundaryName,
                                       in double Xaxis, in double Yaxis, in double Zaxis, in double Angle,
                                       in double Xcentre, in double Ycentre, in double Zcentre)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCase(in string CaseName, in string MeshName, in string FileName )
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCaseFromIteration(in string CaseName, in string DirNameStart )
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCaseFromCaseLastIteration(in string CaseName, in string DirNameStart )
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCaseFromCaseIteration(in string CaseName, in string DirNameStart, in long Number )
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Hypothesis CreateHypothesis(in string HypoName )
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneBox (in string ZoneName,
                                      in double Xmini, in double Xmaxi,
                                      in double Ymini, in double Ymaxi,
                                      in double Zmini, in double Zmaxi)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneBox2D (in string ZoneName,
                                        in double Umini, in double Umaxi,
                                        in double Vmini, in double Vmaxi,
                                        in long Orient)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneCylinder (in string ZoneName,
                                           in double Xcentre, in double Ycentre, in double Zcentre,
                                           in double Xaxis, in double Yaxis, in double Zaxis,
                                           in double Radius, in double Height)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneDisk (in string ZoneName,
                                       in double Ucentre, in double Vcentre,
                                       in double Radius, in long Orient)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneDiskWithHole (in string ZoneName,
                                               in double Ucentre, in double Vcentre,
                                               in double Radius, in double InternalRadius,
                                               in long Orient)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZonePipe (in string ZoneName,
                                       in double Xcentre, in double Ycentre, in double Zcentre,
                                       in double Xaxis, in double Yaxis, in double Zaxis,
                                       in double Radius, in double Height, in double InternalRadius)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneSphere (in string ZoneName,
                                         in double Xcentre, in double Ycentre, in double Zcentre,
                                         in double Radius)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
 //
 // A.2. Les informations
 //
@@ -130,73 +130,77 @@ module HOMARD
     listeYACSs      GetAllYACSsName()                      raises (SALOME::SALOME_Exception);
     listeZones      GetAllZonesName()                      raises (SALOME::SALOME_Exception);
 
-    void            MeshInfo(in string CaseName, in string MeshName, in string FileName,  in string DirName, in long Qual, in long Diam, in long Conn, in long Tail, in long Inte )
-                                                           raises (SALOME::SALOME_Exception);
+    void MeshInfo(in string CaseName, in string MeshName, in string FileName,  in string DirName, in long Qual, in long Diam, in long Conn, in long Tail, in long Inte )
+    raises(SALOME::SALOME_Exception);
 
     HOMARD_Iteration LastIteration(in string CaseName)     raises (SALOME::SALOME_Exception);
 //
 // A.3. L'etude
 //
-    void     SetCurrentStudy(in SALOMEDS::Study theStudy)  raises (SALOME::SALOME_Exception);
+    void SetCurrentStudy(in SALOMEDS::Study theStudy)      raises (SALOME::SALOME_Exception);
     SALOMEDS::Study GetCurrentStudy()                      raises (SALOME::SALOME_Exception);
-    long     GetCurrentStudyID()                           raises (SALOME::SALOME_Exception);
+    long GetCurrentStudyID()                               raises (SALOME::SALOME_Exception);
 //
 // B. Les methodes qui suivent n'apparaissent pas dans le composant HOMARD dans YACS
 //    L'utilisateur ne devrait pas les connaitre (ni s'en servir, a fortiori)
 //
-    HOMARD_Iteration  CreateIteration(in string IterName, in string PreviousIterName )
-                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Iteration CreateIteration(in string IterName, in string PreviousIterName )
+    raises(SALOME::SALOME_Exception);
 //
     void InvalideBoundary (in string BoundaryName)         raises (SALOME::SALOME_Exception);
     void InvalideHypo (in string HypoName)                 raises (SALOME::SALOME_Exception);
     void InvalideIter (in string IterName)                 raises (SALOME::SALOME_Exception);
     void InvalideIterOption (in string IterName, in long Option)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     void InvalideZone (in string ZoneName)                 raises (SALOME::SALOME_Exception);
 
     long DeleteBoundary (in string BoundaryName)           raises (SALOME::SALOME_Exception);
     long DeleteCase(in string CaseName, in long Option)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     long DeleteHypo(in string HypoName)                    raises (SALOME::SALOME_Exception);
     long DeleteIteration(in string IterName, in long Option)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     long DeleteIterationOption(in string IterName, in long Option1, in long Option2)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     long DeleteYACS(in string YacsName, in long Option)    raises (SALOME::SALOME_Exception);
     long DeleteZone (in string ZoneName)                   raises (SALOME::SALOME_Exception);
 //
     void AssociateIterHypo(in string IterName, in string HypoName)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
 
 //
     void AssociateHypoZone(in string HypoName, in string ZoneName, in long TypeUse)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     void DissociateHypoZone(in string HypoName, in string ZoneName)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
 
     long Compute (in string IterName, in long CleanOption, in long modeHOMARD, in long Option1, in long Option2)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
 
 //
     string CreateDirNameIter(in string NomDir, in long option )
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
 
     boolean VerifieDir (in string IterName)                raises (SALOME::SALOME_Exception);
 
 //
-    void  PublishFileUnderIteration(in string IterName, in string FileName, in string Comment)
-                                                           raises (SALOME::SALOME_Exception);
-    void  PublishBoundaryUnderCase(in string CaseName, in string BoundaryName);
-    void  PublishResultInSmesh(in string FileName, in long Option)
-                                                           raises (SALOME::SALOME_Exception);
+    void PublishFileUnderIteration(in string IterName, in string FileName, in string Comment)
+    raises(SALOME::SALOME_Exception);
+    void PublishBoundaryUnderCase(in string CaseName, in string BoundaryName)
+    raises(SALOME::SALOME_Exception);
+    void PublishResultInSmesh(in string FileName, in long Option)
+    raises(SALOME::SALOME_Exception);
 
 //
     HOMARD_YACS CreateYACSSchema(in string YACSName, in string CaseName, in string ScriptFile, in string DirName, in string MeshFile)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
     long YACSWrite (in string YACSName)                    raises (SALOME::SALOME_Exception);
     long YACSWriteOnFile (in string YACSName, in string YACSFile)
-                                                           raises (SALOME::SALOME_Exception);
+    raises(SALOME::SALOME_Exception);
 
+//
+    void SetLanguageShort (in string LanguageShort)        raises (SALOME::SALOME_Exception);
+    string GetLanguageShort ()                             raises (SALOME::SALOME_Exception);
   };
 };
 
index e7876f05bac323fa89c15978fd886b266a0e9c23..ec2f09e9c9a29cc33629c9f190c85c9bcb0d04ac 100644 (file)
@@ -69,7 +69,8 @@ dist_salomeres_DATA =   \
        whatis.png \
        write.png \
        yacs.png \
-       yacs_01.xml \
+       yacs_01.fr.xml \
+       yacs_01.en.xml \
        zone_boxdxyz.png \
        zone_boxdxyz_2.png \
        zone_icone.png \
index 62319b4ad0ec628d7e71c2b7c1c4b95213dacfca..d3e238ba9c168c41c64ff52564a276657ff22b25 100644 (file)
@@ -213,7 +213,7 @@ MeshFile = " "
                            <inline name="Case_Options">
                               <script><code><![CDATA[
 import os
-# Repertoire d'execution
+# Repertoire d'adaptation
 Iter_1_Case_Options
 # Iteration 0 associee
 Iter0 = Case.GetIter0()
index a598c5a8306e6461ac08b468674827a463bd7d1b..50a32dd91dad4a18b547885c2e03d2d30d4266db 100644 (file)
@@ -320,15 +320,15 @@ std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::stri
   }
 // La derniere valeur est toujours mise dans x7
   x7 = GetStringInTexte ( ligne, ")", 0 ) ;
-  MESSAGE("coor = "<< x0<<","<<x1<< ","<< x2<< ","<< x3<<","<<x4<<","<<x5<<","<<x6<<",x7"<<x7);
+  MESSAGE("Valeurs = "<< x0<<", "<<x1<< ", "<< x2<< ", "<< x3<<", "<<x4<<", "<<x5<<", "<<x6<<", x7"<<x7);
 //
 // 4.2. Cas d une frontiere discrete (0)
   if (BoundaryType == 0) // Cas d une frontiere discrete
   {
     _Texte += Texte_inport( "string", "MeshName" ) ;
-    TexteParametre( node, "MeshName", "string", BoundaryName ) ;
+    TexteParametre( node, "MeshName", "string", x0 ) ;
     _Texte += Texte_inport( "string", "FileName" ) ;
-    TexteParametre( node, "FileName", "string", BoundaryName ) ;
+    TexteParametre( node, "FileName", "string", x7 ) ;
   }
 // 4.2. Cas du cylindre (1)
   else if ( BoundaryType == 1 )
index 3f59dd163f3bf3634b3cb08510cebc95bb2e44d5..e5e3086d24da9b0f20734ac1de6d2bfce11d6525 100644 (file)
@@ -187,7 +187,6 @@ void HOMARDGUI::createPreferences(){
 
 //================================================
 // function : createMenus
-//                Verifier l'avant dernier nombre passe en parametre
 //================================================
 void HOMARDGUI::createMenus(){
   MESSAGE("createMenus")
@@ -214,10 +213,14 @@ void HOMARDGUI::createMenus(){
   createMenu( 1401, HOMARD_Id, -1 ); // Création d'un schéma YACS
   createMenu( separator(), HOMARD_Id,-1);
 //
-/*// La langue des preferences
+// La langue des preferences
   SUIT_ResourceMgr* resMgr = getApp()->resourceMgr();
-  QString langue = resMgr->stringValue("language", "language", "en");
-  MESSAGE("langue " << langue.toStdString().c_str() );*/
+  _LanguageShort = resMgr->stringValue("language", "language", "en");
+  MESSAGE("_LanguageShort " << _LanguageShort.toStdString().c_str() );
+//
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( application() );
+  HOMARD::HOMARD_Gen_var homardGen = HOMARDGUI::InitHOMARDGen(app);
+  homardGen->SetLanguageShort(_LanguageShort.toStdString().c_str());
 }
 
 //================================================
index 1f2e909b68a63e0039531c81ff43265fee12c436..c6ac8bf65932c925c91cebaf31bc7952df61fa51 100644 (file)
@@ -89,6 +89,7 @@ private:
 
    int anId;
    QString _ObjectName;
+   QString _LanguageShort ;
 };
 
 #endif
index 89d7de235deae147ddb5c6130ac3431d82304177..647b84a17c058d039283f58676b987670c384e2c 100644 (file)
@@ -56,7 +56,6 @@ SALOME_ListIO HOMARD_UTILS::mySelected;
     return theStudy->studyDS();
 }
 
-
 //================================================================
 // Function : GetActiveStudy
 // Returne un pointeur sur l'etude active
@@ -120,7 +119,6 @@ const SALOME_ListIO& HOMARD_UTILS::selectedIO()
                 SCRUTE(it.Value()->getEntry());
       };
       return mySelected;
-
 }
 
 //================================================================
@@ -160,19 +158,6 @@ Handle(SALOME_InteractiveObject) HOMARD_UTILS::lastIObject()
       return aList.Extent() > 0 ? aList.Last() : Handle(SALOME_InteractiveObject)();
 }
 
-//================================================================
-// Function : isXmgrace
-// Retourne vrai si le fichier associe est de type ASCII
-//================================================================
-bool HOMARD_UTILS::isXmgrace(_PTR(SObject) MonObj)
-{
-   _PTR(GenericAttribute) anAttr;
-   if (!MonObj->FindAttribute(anAttr, "AttributeComment")) return false;
-   _PTR(AttributeComment) aFileComment (anAttr);
-   std::string Type = aFileComment->Value();
-   if (QString(Type.c_str()) == QString("HomardOuputQual")) return true;
-   return false;
-}
 //================================================================
 // Retourne vrai si l objet est du type voulu
 // . Dans le cas d'un cas, d'une hypothese, d'une zone, on se contente
@@ -267,7 +252,7 @@ bool HOMARD_UTILS::isFileType(_PTR(SObject) MonObj, QString TypeFile)
 }
 
 //=========================================================================================================
-void HOMARD_UTILS::PushOnHelp(QString monFichierAide, QString contexte)
+void HOMARD_UTILS::PushOnHelp(QString monFichierAide, QString contexte, QString LanguageShort)
 {
   MESSAGE("Debut de PushOnHelp avec monFichierAide = "<< monFichierAide.toStdString().c_str());
   LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
@@ -276,14 +261,14 @@ void HOMARD_UTILS::PushOnHelp(QString monFichierAide, QString contexte)
     HOMARDGUI* aHomardGUI = dynamic_cast<HOMARDGUI*>( app->module( "Homard" ) );
     // Repertoire de reference de la documentation
     QString rep = aHomardGUI ? app->moduleName(aHomardGUI->moduleName()) : QString("") ;
-    // Recherche de la langue
+    // WARNING/ATTENTION : si on savait recuperer la langue depuis les preferences, on ne fera pas le passage par argument
 //     SUIT_ResourceMgr* resMgr = getApp()->resourceMgr();
 //     SUIT_ResourceMgr* resMgr = myModule->getApp()->resourceMgr();
 //     QString langue = resMgr->stringValue("language", "language", "en");
-    QString langue = "fr" ;
-    MESSAGE(". langue " << langue.toStdString().c_str()) ;
+//     QString langue = "fr" ;
+    MESSAGE(". LanguageShort " << LanguageShort.toStdString().c_str()) ;
     // Complement du fichier
-    QString fichier = QString(langue+"/"+monFichierAide) ;
+    QString fichier = QString(LanguageShort+"/"+monFichierAide) ;
     MESSAGE(". Appel de onHelpContextModule avec :");
     MESSAGE("    rep      = "<< rep.toStdString().c_str());
     MESSAGE("    fichier  = "<< fichier.toStdString().c_str());
index e4315ba9c482f8f647532c847f028aac808a63c2..c3febcbadb67232945129a4abfaa10fbd4ef4ec2 100644 (file)
@@ -72,7 +72,6 @@ namespace HOMARD_UTILS {
                                       // Function returns the last selected object in the list
                                        // of selected objects
 
-  bool isXmgrace(_PTR(SObject)  MonObj);
   bool isBoundaryAn(_PTR(SObject)  MonObj);
   bool isBoundaryDi(_PTR(SObject)  MonObj);
   bool isCase(_PTR(SObject)  MonObj);
@@ -83,7 +82,7 @@ namespace HOMARD_UTILS {
   bool isFileType(_PTR(SObject)  MonObj, QString TypeFile);
   bool isObject(_PTR(SObject)  MonObj, QString TypeObject, int option );
 
-  void PushOnHelp(QString monFichierAide, QString contexte);
+  void PushOnHelp(QString monFichierAide, QString contexte, QString LanguageShort);
 
   extern SALOME_ListIO mySelected;
 }
index 21a0b2fab9b0d5169b5dd6c077af3d078113fd0b..4c6b4fa195507aedc458668fee970d3127b54198 100644 (file)
@@ -455,7 +455,8 @@ void MonCreateBoundaryAn::PushOnOK()
 void MonCreateBoundaryAn::PushOnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("un-cylindre") ) ;
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("un-cylindre"), QString(LanguageShort));
 }
 
 // -----------------------------------
index 0a40cd2bdfdb07ee3002377571d8f42d3b3c5d45..1d3541a654ec593dcf1886c953b3b6f8b0d3c7f7 100644 (file)
@@ -139,7 +139,8 @@ void MonCreateBoundaryDi::PushOnOK()
 void MonCreateBoundaryDi::PushOnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"), QString(LanguageShort));
 }
 // ------------------------------------------------------------------------
 void MonCreateBoundaryDi::AssocieLesGroupes()
index 7a71d11e07afd31fcdd66043d958cd045bdc7cbb..7f1137ef2dd132cd8cf81ced3a998eb37db2b7e2 100644 (file)
@@ -305,7 +305,8 @@ void MonCreateCase::PushOnOK()
 void MonCreateCase::PushOnHelp()
 //-------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort));
 }
 // ---------------------------------
 void MonCreateCase::SetNewName()
@@ -426,7 +427,8 @@ void MonCreateCase::PushBoundaryDiEdit()
 void MonCreateCase::PushBoundaryDiHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete") ) ;
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"), QString(LanguageShort));
 }
 // ------------------------------------------------------------------------
 void MonCreateCase::SetBoundaryA()
@@ -504,7 +506,8 @@ void MonCreateCase::PushBoundaryAnEdit()
 void MonCreateCase::PushBoundaryAnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-analytique") ) ;
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-analytique"), QString(LanguageShort));
 }
 // ------------------------------------------------------------------------
 void MonCreateCase::CaseNameChanged()
index a754df6ac0d3ef53bb8d479c633179e738cee93f..560a41bba4d3e2eaa5563ecd2639963431262548 100644 (file)
@@ -203,7 +203,8 @@ void MonCreateHypothesis::PushOnOK()
 void MonCreateHypothesis::PushOnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"), QString(""), QString(LanguageShort));
 }
 // -------------------------------------------------
 void MonCreateHypothesis::SetNewName()
index ba7ece292530f34a8ff24d5909902b74cbb373ed..ee962aee288b77180291577a0e4b8cbde6da6240 100644 (file)
@@ -189,7 +189,8 @@ void MonCreateIteration::PushOnOK()
 void MonCreateIteration::PushOnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html"), QString(""), QString(LanguageShort));
 }
 // ------------------------------------------------------------------------
 void MonCreateIteration::SetIterParentName()
index 7bd45e565f56f8fd56a917d641b39656fca3fa78..5e092b989a1a60b799240f6121ff34aa7568d025 100644 (file)
@@ -115,7 +115,8 @@ void MonCreateListGroup::PushOnOK()
 void MonCreateListGroup::PushOnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"), QString(""), QString(LanguageShort));
 }
 // ------------------------------------------------------------------------
 void MonCreateListGroup::InitGroupes()
index 0bf0acd65f19da3962ded425af41522ca7c2093c..aab4afe28ea82746263084b9076aa13f06d6c1c0 100644 (file)
@@ -228,7 +228,8 @@ void MonCreateYACS::PushOnOK()
 void MonCreateYACS::PushOnHelp()
 //-------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("yacs.html"), QString(""), QString(LanguageShort));
 }
 // -------------------------------------------------
 void MonCreateYACS::SetNewName()
index 7a01d9c7558e27531b5498c9329057ae966fb58b..e44b3a6889bc070ce5123123b561891337ab5e46 100644 (file)
@@ -586,7 +586,8 @@ void MonCreateZone::PushOnOK()
 void MonCreateZone::PushOnHelp()
 // ------------------------------------------------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_zone.html"), QString("") ) ;
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_zone.html"), QString(""), QString(LanguageShort));
 }
 
 // -----------------------------------
index 7442bd5a1519414562116b4bd0443ceff958726f..1d62d7fbc1aab890def207093cfe3e1d2cb18584 100644 (file)
@@ -131,7 +131,8 @@ void MonIterInfo::PushOnOK()
 void MonIterInfo::PushOnHelp()
 //-------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_mesh_info.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_mesh_info.html"), QString(""), QString(LanguageShort));
 }
 // ------------------------------------------------------------------------
 void MonIterInfo::SetBlockSize()
index a1af7d20d8fd3caa4bf3c3f1ed5fc8266a29afcc..5916fb796aa57fb4ec57cda2cb1ca089a56a54d8 100644 (file)
@@ -178,7 +178,8 @@ void MonMeshInfo::PushOnOK()
 void MonMeshInfo::PushOnHelp()
 //-------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort));
 }
 // ---------------------------------
 void MonMeshInfo::SetNewCaseName()
index 9fc20fb8f74c377cf532980d3c6ae88863e4e689..357f93bfaa5d626cf699a1ca5a3f6bd9f59d76d5 100644 (file)
@@ -186,7 +186,8 @@ void MonPursueIteration::PushOnOK()
 void MonPursueIteration::PushOnHelp()
 //-------------------------------
 {
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""));
+  char* LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort));
 }
 // ---------------------------------
 void MonPursueIteration::SetNewCaseName()
index 9bce3685e4c8638bbdf65ae2cc95157f9f2e55ab..3c4deb67df72af779f186e2250b542c483d3b9d7 100755 (executable)
@@ -97,6 +97,8 @@ Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
   _tag_hypo = 0 ;
   _tag_yacs = 0 ;
   _tag_zone = 0 ;
+  _Langue = "Francais" ;
+  _LangueShort = "fr" ;
 }
 //=================================
 /*!
@@ -2305,8 +2307,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   // E. Les donnees de l'execution HOMARD
   // E.1. L'objet du texte du fichier de configuration
   HomardDriver* myDriver = new HomardDriver(siter, siterp1);
-  std::string Langue = "Francais" ;
-  myDriver->TexteInit(DirCompute, LogFile, Langue);
+  myDriver->TexteInit(DirCompute, LogFile, _Langue);
 
   // E.2. Le maillage associe a l'iteration
   const char* NomMesh = myIteration->GetMeshName();
@@ -2378,8 +2379,8 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       if ( modeHOMARD == 1 )
       {
         std::stringstream saux0 ;
-        Commentaire = "Iteration" ;
-        Commentaire += " " + siter ;
+        Commentaire = "Mesh" ;
+        Commentaire += " " + siterp1 ;
         PublishFileUnderIteration(NomIteration, MeshFile, Commentaire.c_str());
         if ( Option2 % 2 == 0 ) { PublishResultInSmesh(MeshFile, 1); }
       }
@@ -3489,7 +3490,7 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option)
 //=============================================================================
 void HOMARD_Gen_i::DeleteResultInSmesh(std::string NomFich, std::string MeshName)
 {
-  MESSAGE (" DeleteResultInSmesh pour le maillage " << MeshName << " dans le fichier " << NomFich );
+  MESSAGE ("DeleteResultInSmesh pour le maillage " << MeshName << " dans le fichier " << NomFich );
   if (CORBA::is_nil(myCurrentStudy))
   {
       SALOME::ExceptionStruct es;
@@ -3531,12 +3532,12 @@ void HOMARD_Gen_i::DeleteResultInSmesh(std::string NomFich, std::string MeshName
        }
      }
   }
-
+  return ;
 }
 //=============================================================================
 void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* NomFich, const char* Commentaire)
 {
-//   MESSAGE (" PublishFileUnderIteration pour l'iteration " << NomIter << " du fichier " << NomFich << " avec le commentaire " << Commentaire );
+//   MESSAGE ("PublishFileUnderIteration pour l'iteration " << NomIter << " du fichier " << NomFich << " avec le commentaire " << Commentaire );
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[NomIter];
 
   SALOMEDS::SObject_var aIterSO=SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
@@ -3571,7 +3572,7 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No
 //=============================================================================
 void HOMARD_Gen_i::PublishFileUnderYACS(const char* nomYACS, const char* NomFich, const char* Commentaire)
 {
-//   MESSAGE (" PublishFileUnderYACS pour le schema " << nomYACS << " du fichier " << NomFich << " avec le commentaire " << Commentaire );
+//   MESSAGE ("PublishFileUnderYACS pour le schema " << nomYACS << " du fichier " << NomFich << " avec le commentaire " << Commentaire );
   HOMARD::HOMARD_YACS_var myYACS = myContextMap[GetCurrentStudyID()]._mesYACSs[nomYACS];
 
   SALOMEDS::SObject_var aYACSSO=SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myYACS)));
@@ -3758,7 +3759,8 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* YACSF
     throw SALOME::SALOME_Exception(es);
     return 0;
   }
-  YACSFile_base += "/share/salome/resources/homard/yacs_01.xml" ;
+  YACSFile_base += "/share/salome/resources/homard/yacs_01." + _LangueShort + ".xml" ;
+//   if ( _Langue ==
   MESSAGE("YACSFile_base ="<<YACSFile_base);
 
   // G. Lecture du schema de reference et insertion des donnees propres au fil de la rencontre des mots-cles
@@ -3948,7 +3950,7 @@ SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
                                       const char* theURL,
                                       CORBA::Boolean isMultiFile)
 {
-  MESSAGE (" Save for theURL = "<< theURL);
+  MESSAGE ("Save for theURL = "<< theURL);
   SALOMEDS::TMPFile_var aStreamFile;
 
   // get temporary directory name
@@ -4068,7 +4070,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
                                   const char* theURL,
                                   CORBA::Boolean isMultiFile)
 {
-  MESSAGE (" Load pour theURL = "<< theURL);
+  MESSAGE ("Load pour theURL = "<< theURL);
   SALOMEDS::Study_var aStudy = theComponent->GetStudy();
 
   // set current study
@@ -4115,7 +4117,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
     std::string yacsSignature = HOMARD::GetSignature(HOMARD::YACS);
     if (line.substr(0, bounSignature.size()) == bounSignature) {
       // re-create boundary
-      MESSAGE (" Recreation de la frontiere" );
+      MESSAGE ("Recreation de la frontiere" );
       HOMARD::HOMARD_Boundary_var aBoundary = newBoundary();
       PortableServer::ServantBase_var aServant = GetServant(aBoundary);
       HOMARD_Boundary_i* aBoundaryServant = dynamic_cast<HOMARD_Boundary_i*>(aServant.in());
@@ -4126,7 +4128,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
     }
     else if (line.substr(0, caseSignature.size()) == caseSignature) {
       // re-create case
-      MESSAGE (" Recreation du cas" );
+      MESSAGE ("Recreation du cas" );
       HOMARD::HOMARD_Cas_var aCase = newCase();
       PortableServer::ServantBase_var aServant = GetServant(aCase);
       HOMARD_Cas_i* aCaseServant = dynamic_cast<HOMARD_Cas_i*>(aServant.in());
@@ -4137,7 +4139,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
     }
     else if (line.substr(0, hypoSignature.size()) == hypoSignature) {
       // re-create hypothesis
-      MESSAGE (" Recreation de l hypothese" );
+      MESSAGE ("Recreation de l hypothese" );
       HOMARD::HOMARD_Hypothesis_var aHypo = newHypothesis();
       PortableServer::ServantBase_var aServant = GetServant(aHypo);
       HOMARD_Hypothesis_i* aHypoServant = dynamic_cast<HOMARD_Hypothesis_i*>(aServant.in());
@@ -4148,7 +4150,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
     }
     else if (line.substr(0, iterSignature.size()) == iterSignature) {
       // re-create iteration
-      MESSAGE (" Recreation de l iteration" );
+      MESSAGE ("Recreation de l iteration" );
       HOMARD::HOMARD_Iteration_var aIter = newIteration();
       PortableServer::ServantBase_var aServant = GetServant(aIter);
       HOMARD_Iteration_i* aIterServant = dynamic_cast<HOMARD_Iteration_i*>(aServant.in());
@@ -4158,7 +4160,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
       }
     }
     else if (line.substr(0, zoneSignature.size()) == zoneSignature) {
-      MESSAGE (" Recreation de la zone" );
+      MESSAGE ("Recreation de la zone" );
       // re-create zone
       HOMARD::HOMARD_Zone_var aZone = newZone();
       PortableServer::ServantBase_var aServant = GetServant(aZone);
@@ -4169,7 +4171,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
       }
     }
     else if (line.substr(0, zoneSignature.size()) == yacsSignature) {
-      MESSAGE (" Recreation du schema YACS" );
+      MESSAGE ("Recreation du schema YACS" );
       // re-create YACS
       HOMARD::HOMARD_YACS_var aYACS = newYACS();
       PortableServer::ServantBase_var aServant = GetServant(aYACS);
@@ -4574,7 +4576,7 @@ char* HOMARD_Gen_i::getVersion()
 #endif
 }
 //===============================================================================
-// Recuperation de la chaine de caracteres par rapport l'apparition d'un texte
+// Recuperation de la chaine de caracteres par rapport l'apparition d'un texte
 // ligne : la ligne a manipuler
 // texte : le texte a reperer
 // option : 0 : la chaine avant le texte
@@ -4592,10 +4594,25 @@ std::string HOMARD_Gen_i::GetStringInTexte( const std::string ligne, const std::
     if ( option == 0 ) { chaine = ligne.substr( 0, position ) ; }
     else               { chaine = ligne.substr( position+1 ) ; }
   }
-// Conversion de type
   return chaine ;
 //
 }
+// //===============================================================================
+// // Langue de SALOME
+// //===============================================================================
+void HOMARD_Gen_i::SetLanguageShort(const char* LanguageShort)
+{
+  MESSAGE ("SetLanguageShort pour LanguageShort = " << LanguageShort );
+  _LangueShort = LanguageShort ;
+  if ( _LangueShort == "fr" ) { _Langue = "Francais" ; }
+  else                        { _Langue = "English" ; }
+  return ;
+}
+char* HOMARD_Gen_i::GetLanguageShort()
+{
+//   MESSAGE ("GetLanguageShort");
+  return CORBA::string_dup( _LangueShort.c_str() );
+}
 
 //=============================================================================
 extern "C"
index 66efe93f23d59f2f5ab860272b3902d3eee45067..d45c2d91d27c7ef9d061ecd1cfc2988a7033d6ef 100644 (file)
@@ -139,6 +139,7 @@ public:
   SALOMEDS::Study_ptr             GetCurrentStudy();
   void                            SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
   CORBA::Long                     GetCurrentStudyID();
+  void                            IsValidStudy();
 
 // Liens entre structures
   void                            InvalideBoundary(const char* nomBoundary);
@@ -193,7 +194,10 @@ public:
   std::string                     YACSDriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, YACSDriver* myDriver);
   std::string                     YACSDriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, YACSDriver* myDriver);
 
-  void                            IsValidStudy();
+// Divers
+  void                            SetLanguageShort(const char* LanguageShort);
+  char*                           GetLanguageShort();
+
 
   // ---------------------------------------------------------------
   // next functions are inherited from SALOMEDS::Driver interface
@@ -311,6 +315,8 @@ private:
   int _tag_hypo ;
   int _tag_yacs ;
   int _tag_zone ;
+  std::string _Langue ;
+  std::string _LangueShort ;
 
 };