From 76a5f649c23c08c9cbdc0bfaafa5cf6ef792713a Mon Sep 17 00:00:00 2001 From: nicolas Date: Fri, 20 Sep 2013 14:53:58 +0000 Subject: [PATCH] =?utf8?q?Correction=20schema=20YCAS=20pour=20une=20fronti?= =?utf8?q?=C3=83=C2=A8re=20discr=C3=83=C2=A8te.=20Multilinguisme=20des=20s?= =?utf8?q?ch=C3=83=C2=A9mas=20et=20de=20la=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- doc/en/yacs.rst | 50 +-- doc/files/yacs_01.en.xml | 512 ++++++++++++++++++++++ doc/files/{yacs_01.xml => yacs_01.fr.xml} | 4 +- doc/fr/yacs.rst | 48 +- idl/HOMARD_Gen.idl | 82 ++-- resources/Makefile.am | 3 +- resources/yacs_01.xml | 2 +- src/HOMARD/YACSDriver.cxx | 6 +- src/HOMARDGUI/HOMARDGUI.cxx | 11 +- src/HOMARDGUI/HOMARDGUI.h | 1 + src/HOMARDGUI/HOMARDGUI_Utils.cxx | 25 +- src/HOMARDGUI/HOMARDGUI_Utils.h | 3 +- src/HOMARDGUI/MonCreateBoundaryAn.cxx | 3 +- src/HOMARDGUI/MonCreateBoundaryDi.cxx | 3 +- src/HOMARDGUI/MonCreateCase.cxx | 9 +- src/HOMARDGUI/MonCreateHypothesis.cxx | 3 +- src/HOMARDGUI/MonCreateIteration.cxx | 3 +- src/HOMARDGUI/MonCreateListGroup.cxx | 3 +- src/HOMARDGUI/MonCreateYACS.cxx | 3 +- src/HOMARDGUI/MonCreateZone.cxx | 3 +- src/HOMARDGUI/MonIterInfo.cxx | 3 +- src/HOMARDGUI/MonMeshInfo.cxx | 3 +- src/HOMARDGUI/MonPursueIteration.cxx | 3 +- src/HOMARD_I/HOMARD_Gen_i.cxx | 55 ++- src/HOMARD_I/HOMARD_Gen_i.hxx | 8 +- 25 files changed, 695 insertions(+), 154 deletions(-) create mode 100644 doc/files/yacs_01.en.xml rename doc/files/{yacs_01.xml => yacs_01.fr.xml} (99%) diff --git a/doc/en/yacs.rst b/doc/en/yacs.rst index 9146bc79..d08dcfa9 100644 --- a/doc/en/yacs.rst +++ b/doc/en/yacs.rst @@ -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 index 00000000..1110af3a --- /dev/null +++ b/doc/files/yacs_01.en.xml @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med + + + + + + + + + HOMARD + + SetCurrentStudy + + + StudyCreation SetCurrentStudy + + StudyCreation NewStudy + SetCurrentStudy theStudy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Etude_Initialisation.SetCurrentStudy + LastIteration + + + + + Etude_Initialisation.SetCurrentStudy + GetHypothesis + + + + LastIteration GetHypothesis + + + + + + Etude_Initialisation.SetCurrentStudy + CreateCase + + + + + + + + + + + + Etude_Initialisation.SetCurrentStudy + CreateHypothesis + + + + CreateCase Case_Options + Case_Options CreateHypothesis + + + CreateCase return + Case_Options Case + + + + + + + + + + + + + + + HOMARD_Initialisation HOMARD_Exec + + HOMARD_Initialisation.default_Iter_n.LastIteration return + HOMARD_Exec LastIter + + + HOMARD_Initialisation.p1_Iter_1.Case_Options Iter0 + HOMARD_Exec LastIter + + + HOMARD_Initialisation.default_Iter_n.GetHypothesis return + HOMARD_Exec Hypo + + + HOMARD_Initialisation.p1_Iter_1.CreateHypothesis return + HOMARD_Exec Hypo + + + + + Calcul Analyse + Analyse Adaptation + + Analyse Error + Adaptation select + + + Analyse NumCalcP1 + Calcul numCalc + + + Analyse NumCalcP1 + Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation select + + + Analyse NumCalcP1 + Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec NumAdapt + + + Analyse FileName + Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCase FileName + + + Analyse MessInfo + Adaptation.default_Arret_boucle.Arret MessInfo + + + Calcul Error + Analyse ErrCalc + + + Calcul dico_resu + Analyse dico_resu + + + Calcul dico_resu + Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec dico_resu + + + Adaptation.default_Arret_boucle.Arret MeshFile + Calcul MeshFile + + + Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec MeshFile + Calcul MeshFile + + + + Alternance_Calcul_HOMARD.Analyse NumCalcP1 + Alternance_Calcul_HOMARD.Analyse NumCalc + + + + + + + DataInit Etude_Initialisation + Etude_Initialisation Boucle_de_convergence + Boucle_de_convergence Bilan + + DataInit MeshFile + Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul MeshFile + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret OK + Boucle_de_convergence condition + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec OK + Boucle_de_convergence condition + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret MessInfo + Bilan MessInfo + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec MessInfo + Bilan MessInfo + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCaseCaseName + Calcul + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.CalculnumCalc + 0 + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptationselect + 0 + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisationselect + 0 + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIterationCaseName + Calcul + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesisHypoName + Hypo + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesisHypoName + Hypo + + + Boucle_de_convergencecondition + true + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.AnalyseNumCalc + 0 + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.AnalyseErrCalc + 0 + + + Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCaseMeshName + BOX + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/files/yacs_01.xml b/doc/files/yacs_01.fr.xml similarity index 99% rename from doc/files/yacs_01.xml rename to doc/files/yacs_01.fr.xml index c62572b5..d3eb6f0b 100644 --- a/doc/files/yacs_01.xml +++ b/doc/files/yacs_01.fr.xml @@ -216,7 +216,7 @@ MeshFile = " "