From: GERALD NICOLAS Date: Thu, 30 Aug 2018 09:08:49 +0000 (+0200) Subject: Documentation schémas YACS X-Git-Tag: V9_1_0~1^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b8fa8e3c5e48f5dbc36d133167b6985baf884a4d;p=modules%2Fhomard.git Documentation schémas YACS --- diff --git a/doc/en/images/yacs_01.png b/doc/en/images/yacs_01.png new file mode 100644 index 00000000..eba9c785 Binary files /dev/null and b/doc/en/images/yacs_01.png differ diff --git a/doc/en/images/yacs_a_01.png b/doc/en/images/yacs_a_01.png new file mode 100644 index 00000000..9e29132c Binary files /dev/null and b/doc/en/images/yacs_a_01.png differ diff --git a/doc/en/images/yacs_b_01.png b/doc/en/images/yacs_b_01.png new file mode 100644 index 00000000..ec2b4285 Binary files /dev/null and b/doc/en/images/yacs_b_01.png differ diff --git a/doc/en/images/yacs_c_01.png b/doc/en/images/yacs_c_01.png new file mode 100644 index 00000000..693630a3 Binary files /dev/null and b/doc/en/images/yacs_c_01.png differ diff --git a/doc/en/images/yacs_c_02.png b/doc/en/images/yacs_c_02.png new file mode 100644 index 00000000..b5a23e82 Binary files /dev/null and b/doc/en/images/yacs_c_02.png differ diff --git a/doc/en/images/yacs_c_03.png b/doc/en/images/yacs_c_03.png new file mode 100644 index 00000000..8341bc3d Binary files /dev/null and b/doc/en/images/yacs_c_03.png differ diff --git a/doc/en/images/yacs_c_04.png b/doc/en/images/yacs_c_04.png new file mode 100644 index 00000000..6d77c371 Binary files /dev/null and b/doc/en/images/yacs_c_04.png differ diff --git a/doc/en/images/yacs_c_05.png b/doc/en/images/yacs_c_05.png new file mode 100644 index 00000000..21fdaec4 Binary files /dev/null and b/doc/en/images/yacs_c_05.png differ diff --git a/doc/en/images/yacs_c_06.png b/doc/en/images/yacs_c_06.png new file mode 100644 index 00000000..ed992907 Binary files /dev/null and b/doc/en/images/yacs_c_06.png differ diff --git a/doc/en/images/yacs_c_07.png b/doc/en/images/yacs_c_07.png new file mode 100644 index 00000000..fbddf895 Binary files /dev/null and b/doc/en/images/yacs_c_07.png differ diff --git a/doc/en/images/yacs_c_08.png b/doc/en/images/yacs_c_08.png new file mode 100644 index 00000000..897b7e56 Binary files /dev/null and b/doc/en/images/yacs_c_08.png differ diff --git a/doc/en/images/yacs_c_09.png b/doc/en/images/yacs_c_09.png new file mode 100644 index 00000000..8f1282ba Binary files /dev/null and b/doc/en/images/yacs_c_09.png differ diff --git a/doc/en/images/yacs_d_01.png b/doc/en/images/yacs_d_01.png new file mode 100644 index 00000000..94f407a7 Binary files /dev/null and b/doc/en/images/yacs_d_01.png differ diff --git a/doc/en/yacs.rst b/doc/en/yacs.rst index 710bb918..e0b1625d 100644 --- a/doc/en/yacs.rst +++ b/doc/en/yacs.rst @@ -16,11 +16,11 @@ Introduction Here is the description of a scheme for a computation in which a value is to be stabilized. The computation starts over an initial mesh, then HOMARD makes an adaptation. A new computation is done over this new mesh and its result is analyzed. Depending on this analysis, the coupling goes on or does not. The general look of the scheme is this one: -.. image:: ../images/yacs_01.png +.. image:: ./images/yacs_01.png :align: center - :alt: yacs - allure générale - :width: 512 - :height: 306 + :alt: yacs - global view + :width: 530 + :height: 281 .. note:: Among all the treated data, certain are unchanging: the name of the directory of calculation, the name of the case, the name of the hypothesis of adaptation, etc. It was chosen to impose them 'hard' in the various parameters of service or within the scripts python. We could also define them a priori in a node PresetNode and then pass on them by links. We did not hold this solution because it increases strongly the number of parameters and links attached to every node. It is very penalizing for the legibility of the scheme. The only data which are going to circulate are the ones been imperative by the description of the service and those that evolve during the execution of the scheme. @@ -31,13 +31,13 @@ The boxes The main boxes are: - DataInit : initialisation of the initial mesh -- Etude_Initialisation : launching of the module HOMARD inside SALOME -- Boucle_de_convergence : gestion of the loop computation/adaptation -- Bilan : final information +- Study_Initialisation : launching of the module HOMARD inside SALOME +- Convergence_Loop : gestion of the loop computation/adaptation +- Results : final information DataInit ======== -.. image:: ../images/yacs_a_01.png +.. image:: ./images/yacs_a_01.png :align: center :alt: DataInit :width: 158 @@ -46,78 +46,78 @@ 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.en.xml - :lines: 38-42 + :lines: 37-41 -Etude_Initialisation +Study_Initialisation ==================== -The box Etude_Initialisation launches the component HOMARD inside SALOME. It is a block consisted of two parts, that are invariable whatever is the envisaged application: +The box Study_Initialisation launches the component HOMARD inside SALOME. It is a block consisted of two parts, that are invariable whatever is the envisaged application: - StudyCreation : python node - UpdateStudy : service of the component HOMARD -.. image:: ../images/yacs_b_01.png +.. image:: ./images/yacs_b_01.png :align: center - :alt: Etude_Initialisation - :width: 323 - :height: 97 + :alt: Study_Initialisation + :width: 322 + :height: 69 The python node StudyCreation initialize the SALOME study that is given through the output: .. literalinclude:: ../files/yacs_01.en.xml - :lines: 44-62 + :lines: 43-59 The service UpdateStudy connects this study to an instance of HOMARD. .. literalinclude:: ../files/yacs_01.en.xml - :lines: 63-68 + :lines: 60-64 -Boucle_de_convergence +Convergence_Loop ===================== -The box Boucle_de_convergence is type WhileLoop. The condition is initialized in 1: the internal block Alternance_Calcul_HOMARD is executed. Within this block, we calculate and we adapt the mesh; when the process has to stop either as a result of error, or by convergence, the condition passes in 0. The loop ends and we pass in the following box, Bilan. +The box Convergence_Loop is type WhileLoop. The condition is initialized with 1: the internal block Alternation_Computation_HOMARD is executed. Within this block, we calculate and we adapt the mesh; when the process has to stop either as a result of error, or by convergence, the condition passes to 0. The loop ends and we pass in the following box, Results. -.. image:: ../images/yacs_c_01.png +.. image:: ./images/yacs_c_01.png :align: center :alt: Boucle - :width: 163 - :height: 93 + :width: 192 + :height: 141 -Bilan -===== -.. image:: ../images/yacs_d_01.png +Results +======= +.. image:: ./images/yacs_d_01.png :align: center - :alt: Bilan - :width: 158 - :height: 63 + :alt: Results + :width: 157 + :height: 62 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.en.xml - :lines: 406-419 + :lines: 398-411 Loop for the calculations ************************* -.. image:: ../images/yacs_c_02.png +.. image:: ./images/yacs_c_02.png :align: center :alt: Boucle - :width: 338 - :height: 152 + :width: 505 + :height: 114 This box is a block that manages the computation, the adaptation and the analysis. -Calcul -====== -.. image:: ../images/yacs_c_03.png +Computation +=========== +.. image:: ./images/yacs_c_03.png :align: center - :alt: Calcul - :width: 155 - :height: 87 + :alt: Computation + :width: 158 + :height: 90 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.en.xml - :lines: 77-103 + :lines: 70-90 In this example, we must define: @@ -134,13 +134,13 @@ On the other hand the output of the script has to obey the following rule. We ge Adaptation ========== -.. image:: ../images/yacs_c_04.png +.. image:: ./images/yacs_c_04.png :align: center :alt: Adaptation - :width: 661 - :height: 566 + :width: 667 + :height: 568 -The box Adaptation is a Switch node driven by the code of error of the previous calculation. If this code is nil, YACS will activate the box Adaptation_HOMARD that will launch the adaptation. If the code is not nil, we pass directly in the box Arret_boucle. +The box Adaptation is a Switch node driven by the code of error of the previous calculation. If this code is nil, YACS will activate the box Adaptation_HOMARD that will launch the adaptation. If the code is not nil, we pass directly in the box Loop_Stop. Adaptation_HOMARD ----------------- @@ -148,7 +148,7 @@ The first task tries to execute concern the initialization of the data necessary Iter_1 ^^^^^^ -.. image:: ../images/yacs_c_06.png +.. image:: ./images/yacs_c_06.png :align: center :alt: Iter_1 :width: 481 @@ -157,20 +157,20 @@ Iter_1 This box begins by creating the case HOMARD by calling the CreateCase service. .. literalinclude:: ../files/yacs_01.en.xml - :lines: 208-215 + :lines: 200-207 -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. +The name of the case CaseName is imposed on "Computation". 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.en.xml - :lines: 443-446 + :lines: 435-438 .. literalinclude:: ../files/yacs_01.en.xml - :lines: 483-486 + :lines: 475-478 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 :doc:`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.en.xml - :lines: 216-228 + :lines: 208-220 Finally, a hypothesis is created by calling the CreateHypothese service. The parameter of output is an instance of hypothese. @@ -178,7 +178,7 @@ Homard_Exec ^^^^^^^^^^^ Once initialized, the adaptation can be calculated. It is the goal of the Homard_Exec box, in the form of a script python. -.. image:: ../images/yacs_c_09.png +.. image:: ./images/yacs_c_09.png :align: center :alt: Homard_Exec :width: 153 @@ -187,38 +187,38 @@ 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.en.xml - :lines: 245-250 + :lines: 237-242 ../.. .. literalinclude:: ../files/yacs_01.en.xml - :lines: 325-333 + :lines: 317-325 The hypothesis transmitted in input parameter characterized (look :doc:`tui_create_hypothese`) : .. literalinclude:: ../files/yacs_01.en.xml - :lines: 254-278 + :lines: 246-270 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.en.xml - :lines: 280-290 + :lines: 272-282 The iteration is supplemented : hypothesis, future mesh, field (look :doc:`tui_create_iteration`) : .. literalinclude:: ../files/yacs_01.en.xml - :lines: 292-311 + :lines: 284-303 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.en.xml - :lines: 313-324 + :lines: 305-316 After this execution, the process leaves the Adaptation_HOMARD node, then Adaptation node. One arrives then at the node of analysis. Iter_n ^^^^^^ -.. image:: ../images/yacs_c_07.png +.. image:: ./images/yacs_c_07.png :align: center :alt: Iter_n :width: 323 @@ -231,56 +231,56 @@ For the following passing in the block of adaptation, it is necessary to recover One passes then in the Homard_Exec node to calculate the new mesh. -Arret_boucle ------------- -.. image:: ../images/yacs_c_08.png +Loop_Stop +--------- +.. image:: ./images/yacs_c_08.png :align: center - :alt: Arret_boucle - :width: 163 - :height: 152 + :alt: Loop_Stop + :width: 161 + :height: 151 -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: +The Loop_Stop 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.en.xml - :lines: 173-184 + :lines: 165-176 -Analyse -======= -.. image:: ../images/yacs_c_05.png +Analysis +======== +.. image:: ./images/yacs_c_05.png :align: center - :alt: Analyse - :width: 156 - :height: 139 + :alt: Analysis + :width: 158 + :height: 143 -The Analyse block is a script python which ensures the complete control of the process by examining the causes of possible error successively. +The Analysis 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.en.xml - :lines: 104-116 + :lines: 96-108 ../.. .. literalinclude:: ../files/yacs_01.en.xml - :lines: 162-170 + :lines: 154-162 One starts by analyzing the return of the computer code: .. literalinclude:: ../files/yacs_01.en.xml - :lines: 118-123 + :lines: 110-115 Checking of the presence of the name of the result file in the dictionary of the results: .. literalinclude:: ../files/yacs_01.en.xml - :lines: 125-132 + :lines: 117-124 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.en.xml - :lines: 134-152 + :lines: 126-146 Lastly, it is checked that a maximum nomber of adaptations is not exceeded: .. literalinclude:: ../files/yacs_01.en.xml - :lines: 154-159 + :lines: 146-151 Use this scheme diff --git a/doc/files/yacs_01.en.xml b/doc/files/yacs_01.en.xml index babc556c..7ce832f3 100644 --- a/doc/files/yacs_01.en.xml +++ b/doc/files/yacs_01.en.xml @@ -36,10 +36,10 @@ - /scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med + /home/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med - + - HOMARD @@ -65,15 +64,15 @@ CurrentStudy = clt.Resolve("/Study") StudyCreation UpdateStudy - - - + + + - + - + - + @@ -163,7 +162,7 @@ while not Error : - + - DataInit Etude_Initialisation - Etude_Initialisation Boucle_de_convergence - Boucle_de_convergence Bilan + DataInit Study_Initialisation + Study_Initialisation Convergence_Loop + Convergence_Loop Results DataInit MeshFile - Boucle_de_convergence.Alternance_Calcul_HOMARD.Calcul MeshFile + Convergence_Loop.Alternation_Computation_HOMARD.Computation MeshFile - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret OK - Boucle_de_convergence condition + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.default_Loop_Stop.Arret OK + Convergence_Loop condition - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec OK - Boucle_de_convergence condition + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec OK + Convergence_Loop condition - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.default_Arret_boucle.Arret MessInfo - Bilan MessInfo + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.default_Loop_Stop.Arret MessInfo + Results MessInfo - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec MessInfo - Bilan MessInfo + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Exec MessInfo + Results MessInfo - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCaseCaseName - Calcul + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCaseCaseName + Computation - Boucle_de_convergence.Alternance_Calcul_HOMARD.CalculnumCalc + Convergence_Loop.Alternation_Computation_HOMARD.ComputationnumCalc 0 - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptationselect + Convergence_Loop.Alternation_Computation_HOMARD.Adaptationselect 0 - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisationselect + Convergence_Loop.Alternation_Computation_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 + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.LastIterationCaseName + Computation - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.default_Iter_n.GetHypothesisHypoName + Convergence_Loop.Alternation_Computation_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 + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateHypothesisHypoName Hypo - Boucle_de_convergencecondition + Convergence_Loopcondition true - Boucle_de_convergence.Alternance_Calcul_HOMARD.AnalyseNumCalc + Convergence_Loop.Alternation_Computation_HOMARD.AnalysisNumCalc 0 - Boucle_de_convergence.Alternance_Calcul_HOMARD.AnalyseErrCalc + Convergence_Loop.Alternation_Computation_HOMARD.AnalysisErrCalc 0 - Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCaseMeshName + Convergence_Loop.Alternation_Computation_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1.CreateCaseMeshName BOX - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/files/yacs_01.fr.xml b/doc/files/yacs_01.fr.xml index 9eda8c33..8fce9b51 100644 --- a/doc/files/yacs_01.fr.xml +++ b/doc/files/yacs_01.fr.xml @@ -36,7 +36,7 @@ - /scratch/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med + /home/D68518/HOMARD_SVN/trunk/training/tet_aster_ther/maill.00.med @@ -56,7 +56,6 @@ import HOMARD_Boundary_idl clt = orbmodule.client() CurrentStudy = clt.Resolve("/Study") ]]> - HOMARD @@ -72,8 +71,8 @@ CurrentStudy = clt.Resolve("/Study") 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") +rep_calc = "/home/D68518/HOMARD_SVN/trunk/training/tet_aster_ther" +rep_script = os.path.dirname("/home/D68518/HOMARD_SVN/trunk/training/script") sys.path.append(rep_script) from ScriptAster import Script # @@ -84,15 +83,15 @@ argu.append("--mesh_file=" + MeshFile) # Script_A = Script(argu) # -Error, message_erreur, dico_resu = Script_A.compute () +Error, message_erreur, dict_resu = Script_A.compute () # -dico_resu["rep_calc"] = rep_calc +dict_resu["rep_calc"] = rep_calc # ]]> - + - + @@ -210,7 +209,7 @@ MeshFile = " " diff --git a/doc/fr/images/yacs_01.png b/doc/fr/images/yacs_01.png new file mode 100644 index 00000000..07967038 Binary files /dev/null and b/doc/fr/images/yacs_01.png differ diff --git a/doc/fr/images/yacs_a_01.png b/doc/fr/images/yacs_a_01.png new file mode 100644 index 00000000..9e29132c Binary files /dev/null and b/doc/fr/images/yacs_a_01.png differ diff --git a/doc/fr/images/yacs_b_01.png b/doc/fr/images/yacs_b_01.png new file mode 100644 index 00000000..be158c63 Binary files /dev/null and b/doc/fr/images/yacs_b_01.png differ diff --git a/doc/fr/images/yacs_c_01.png b/doc/fr/images/yacs_c_01.png new file mode 100644 index 00000000..5f888dfb Binary files /dev/null and b/doc/fr/images/yacs_c_01.png differ diff --git a/doc/fr/images/yacs_c_02.png b/doc/fr/images/yacs_c_02.png new file mode 100644 index 00000000..7e933e41 Binary files /dev/null and b/doc/fr/images/yacs_c_02.png differ diff --git a/doc/fr/images/yacs_c_03.png b/doc/fr/images/yacs_c_03.png new file mode 100644 index 00000000..d93e928a Binary files /dev/null and b/doc/fr/images/yacs_c_03.png differ diff --git a/doc/fr/images/yacs_c_04.png b/doc/fr/images/yacs_c_04.png new file mode 100644 index 00000000..110efe92 Binary files /dev/null and b/doc/fr/images/yacs_c_04.png differ diff --git a/doc/fr/images/yacs_c_05.png b/doc/fr/images/yacs_c_05.png new file mode 100644 index 00000000..5dc8c865 Binary files /dev/null and b/doc/fr/images/yacs_c_05.png differ diff --git a/doc/fr/images/yacs_c_06.png b/doc/fr/images/yacs_c_06.png new file mode 100644 index 00000000..ed992907 Binary files /dev/null and b/doc/fr/images/yacs_c_06.png differ diff --git a/doc/fr/images/yacs_c_07.png b/doc/fr/images/yacs_c_07.png new file mode 100644 index 00000000..fbddf895 Binary files /dev/null and b/doc/fr/images/yacs_c_07.png differ diff --git a/doc/fr/images/yacs_c_08.png b/doc/fr/images/yacs_c_08.png new file mode 100644 index 00000000..fcd05273 Binary files /dev/null and b/doc/fr/images/yacs_c_08.png differ diff --git a/doc/fr/images/yacs_c_09.png b/doc/fr/images/yacs_c_09.png new file mode 100644 index 00000000..8f1282ba Binary files /dev/null and b/doc/fr/images/yacs_c_09.png differ diff --git a/doc/fr/images/yacs_d_01.png b/doc/fr/images/yacs_d_01.png new file mode 100644 index 00000000..3963ecc9 Binary files /dev/null and b/doc/fr/images/yacs_d_01.png differ diff --git a/doc/fr/yacs.rst b/doc/fr/yacs.rst index e8e27500..b2b6f767 100644 --- a/doc/fr/yacs.rst +++ b/doc/fr/yacs.rst @@ -16,7 +16,7 @@ Présentation générale On va décrire ici un schéma s'appliquant à un calcul pour lequel on cherche à stabiliser une valeur. Le calcul démarre sur un maillage initial puis HOMARD enchaîne avec une adaptation. On refait un calcul sur ce nouveau maillage et son résultat est analysé. En fonction de cette analyse, le couplage continue ou non. L'allure générale du schéma est la suivante : -.. image:: ../images/yacs_01.png +.. image:: ./images/yacs_01.png :align: center :alt: yacs - allure générale :width: 512 @@ -37,7 +37,7 @@ Les boîtes principales sont : DataInit ======== -.. image:: ../images/yacs_a_01.png +.. image:: ./images/yacs_a_01.png :align: center :alt: DataInit :width: 158 @@ -46,7 +46,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.fr.xml - :lines: 38-42 + :lines: 37-41 Etude_Initialisation ==================== @@ -55,28 +55,28 @@ La boîte Etude_Initialisation lance le composant HOMARD dans SALOME. C'est un b - StudyCreation : noeud python - UpdateStudy : service du composant HOMARD -.. image:: ../images/yacs_b_01.png +.. image:: ./images/yacs_b_01.png :align: center :alt: Etude_Initialisation - :width: 323 - :height: 97 + :width: 327 + :height: 73 Le noeud python StudyCreation sert à initialiser l'étude SALOME qui est fournie en sortie : .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 44-62 + :lines: 43-59 Le service UpdateStudy affecte cette étude à une instance de HOMARD. .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 63-68 + :lines: 60-64 Boucle_de_convergence ===================== La boîte Boucle_de_convergence est une boucle de type WhileLoop. La condition est initialisée à 1 : le bloc interne Alternance_Calcul_HOMARD est exécuté. Au sein de ce bloc, on calcule et on adapte le maillage ; quand le processus doit s'arrêter soit par suite d'erreur, soit par convergence, la condition passe à 0. La boucle s'achève et on passe à la boîte suivante, Bilan. -.. image:: ../images/yacs_c_01.png +.. image:: ./images/yacs_c_01.png :align: center :alt: Boucle :width: 163 @@ -84,7 +84,7 @@ La boîte Boucle_de_convergence est une boucle de type WhileLoop. La condition e Bilan ===== -.. image:: ../images/yacs_d_01.png +.. image:: ./images/yacs_d_01.png :align: center :alt: Bilan :width: 158 @@ -93,22 +93,22 @@ 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.fr.xml - :lines: 406-419 + :lines: 398-411 La boucle de calculs ******************** -.. image:: ../images/yacs_c_02.png +.. image:: ./images/yacs_c_02.png :align: center :alt: Boucle - :width: 338 - :height: 152 + :width: 496 + :height: 112 -Cette boîte est un bloc qui gère le calcul, l'adaptation et l'analyse. +Cette boîte est un bloc qui gère le calcul, l'analyse et l'adaptation. Calcul ====== -.. image:: ../images/yacs_c_03.png +.. image:: ./images/yacs_c_03.png :align: center :alt: Calcul :width: 155 @@ -117,7 +117,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.fr.xml - :lines: 77-103 + :lines: 70-90 Dans cet exemple, il faut définir : @@ -134,7 +134,7 @@ En revanche la sortie du script doit obéir à la règle suivante. On récupère Adaptation ========== -.. image:: ../images/yacs_c_04.png +.. image:: ./images/yacs_c_04.png :align: center :alt: Adaptation :width: 661 @@ -148,7 +148,7 @@ La première tâche à exécuter concerne l'initialisation des données nécessa Iter_1 ^^^^^^ -.. image:: ../images/yacs_c_06.png +.. image:: ./images/yacs_c_06.png :align: center :alt: Iter_1 :width: 481 @@ -157,20 +157,20 @@ Iter_1 Cette boîte commence par créer le cas HOMARD en appelant le service CreateCase. .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 208-215 + :lines: 200-207 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.fr.xml - :lines: 443-446 + :lines: 435-438 .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 483-486 + :lines: 475-478 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 :doc:`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.fr.xml - :lines: 216-228 + :lines: 208-220 Enfin, une hypothèse est créée en appelant le service CreateHypothese. Le paramètre de sortie est une instance d'hypothèse. @@ -178,7 +178,7 @@ Homard_Exec ^^^^^^^^^^^ Une fois initialisée, l'adaptation peut être calculée. C'est le but de la boîte Homard_Exec, sous forme d'un script python. -.. image:: ../images/yacs_c_09.png +.. image:: ./images/yacs_c_09.png :align: center :alt: Homard_Exec :width: 153 @@ -187,38 +187,38 @@ Une fois initialisée, l'adaptation peut être calculée. C'est le but de la bo Le répertoire de calcul est récupéré. Le nom du maillage est rappelé. .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 245-250 + :lines: 237-242 ../.. .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 325-333 + :lines: 317-325 L'hypothèse transmise en paramètre d'entrée est caractérisée (voir :doc:`tui_create_hypothese`) : .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 254-278 + :lines: 246-270 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.fr.xml - :lines: 280-290 + :lines: 272-282 L'itération est complétée : hypothèse, futur maillage, champ (voir :doc:`tui_create_iteration`) : .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 292-311 + :lines: 284-303 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.fr.xml - :lines: 313-324 + :lines: 305-316 Après cette exécution, le processus sort du noeud Adaptation_HOMARD, puis du noeud Adaptation. On arrive alors au noeud d'analyse. Iter_n ^^^^^^ -.. image:: ../images/yacs_c_07.png +.. image:: ./images/yacs_c_07.png :align: center :alt: Iter_n :width: 323 @@ -233,7 +233,7 @@ On passe ensuite dans le noeud Homard_Exec pour calculer le nouveau maillage. Arret_boucle ------------ -.. image:: ../images/yacs_c_08.png +.. image:: ./images/yacs_c_08.png :align: center :alt: Arret_boucle :width: 163 @@ -242,11 +242,11 @@ 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.fr.xml - :lines: 173-184 + :lines: 165-176 Analyse ======= -.. image:: ../images/yacs_c_05.png +.. image:: ./images/yacs_c_05.png :align: center :alt: Analyse :width: 156 @@ -255,32 +255,32 @@ 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.fr.xml - :lines: 104-116 + :lines: 96-108 ../.. .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 162-170 + :lines: 154-162 On commence par analyser le retour du code de calcul : .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 118-123 + :lines: 110-115 Vérification de la présence du nom du fichier de résultats dans le dictionnaire des résultats : .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 125-132 + :lines: 117-124 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.fr.xml - :lines: 134-152 + :lines: 126-146 Enfin, on vérifie que l'on ne dépasse pas un nombre maximal d'adaptations : .. literalinclude:: ../files/yacs_01.fr.xml - :lines: 154-159 + :lines: 146-151 Utiliser ce schéma diff --git a/doc/images/yacs_01.png b/doc/images/yacs_01.png deleted file mode 100644 index 07967038..00000000 Binary files a/doc/images/yacs_01.png and /dev/null differ diff --git a/doc/images/yacs_a_01.png b/doc/images/yacs_a_01.png deleted file mode 100644 index 9e29132c..00000000 Binary files a/doc/images/yacs_a_01.png and /dev/null differ diff --git a/doc/images/yacs_b_01.png b/doc/images/yacs_b_01.png deleted file mode 100644 index 6fc0e48f..00000000 Binary files a/doc/images/yacs_b_01.png and /dev/null differ diff --git a/doc/images/yacs_c_01.png b/doc/images/yacs_c_01.png deleted file mode 100644 index 5f888dfb..00000000 Binary files a/doc/images/yacs_c_01.png and /dev/null differ diff --git a/doc/images/yacs_c_02.png b/doc/images/yacs_c_02.png deleted file mode 100644 index c8b5d9cd..00000000 Binary files a/doc/images/yacs_c_02.png and /dev/null differ diff --git a/doc/images/yacs_c_03.png b/doc/images/yacs_c_03.png deleted file mode 100644 index d93e928a..00000000 Binary files a/doc/images/yacs_c_03.png and /dev/null differ diff --git a/doc/images/yacs_c_04.png b/doc/images/yacs_c_04.png deleted file mode 100644 index 110efe92..00000000 Binary files a/doc/images/yacs_c_04.png and /dev/null differ diff --git a/doc/images/yacs_c_05.png b/doc/images/yacs_c_05.png deleted file mode 100644 index 5dc8c865..00000000 Binary files a/doc/images/yacs_c_05.png and /dev/null differ diff --git a/doc/images/yacs_c_06.png b/doc/images/yacs_c_06.png deleted file mode 100644 index ed992907..00000000 Binary files a/doc/images/yacs_c_06.png and /dev/null differ diff --git a/doc/images/yacs_c_07.png b/doc/images/yacs_c_07.png deleted file mode 100644 index fbddf895..00000000 Binary files a/doc/images/yacs_c_07.png and /dev/null differ diff --git a/doc/images/yacs_c_08.png b/doc/images/yacs_c_08.png deleted file mode 100644 index fcd05273..00000000 Binary files a/doc/images/yacs_c_08.png and /dev/null differ diff --git a/doc/images/yacs_c_09.png b/doc/images/yacs_c_09.png deleted file mode 100644 index 8f1282ba..00000000 Binary files a/doc/images/yacs_c_09.png and /dev/null differ diff --git a/doc/images/yacs_d_01.png b/doc/images/yacs_d_01.png deleted file mode 100644 index 3963ecc9..00000000 Binary files a/doc/images/yacs_d_01.png and /dev/null differ