From: nicolas Date: Fri, 20 Sep 2013 14:53:58 +0000 (+0000) Subject: Correction schema YCAS pour une frontière discrète. X-Git-Tag: V7_3_0a1~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=76a5f649c23c08c9cbdc0bfaafa5cf6ef792713a;p=modules%2Fhomard.git Correction schema YCAS pour une frontière discrète. Multilinguisme des schémas et de la documentation --- 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.fr.xml b/doc/files/yacs_01.fr.xml new file mode 100644 index 00000000..d3eb6f0b --- /dev/null +++ b/doc/files/yacs_01.fr.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.xml deleted file mode 100644 index c62572b5..00000000 --- a/doc/files/yacs_01.xml +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /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/fr/yacs.rst b/doc/fr/yacs.rst index a2fdeb48..18b0b03c 100644 --- a/doc/fr/yacs.rst +++ b/doc/fr/yacs.rst @@ -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 : diff --git a/idl/HOMARD_Gen.idl b/idl/HOMARD_Gen.idl index 724e7948..29eabb24 100644 --- a/idl/HOMARD_Gen.idl +++ b/idl/HOMARD_Gen.idl @@ -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); }; }; diff --git a/resources/Makefile.am b/resources/Makefile.am index e7876f05..ec2f09e9 100644 --- a/resources/Makefile.am +++ b/resources/Makefile.am @@ -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 \ diff --git a/resources/yacs_01.xml b/resources/yacs_01.xml index 62319b4a..d3e238ba 100644 --- a/resources/yacs_01.xml +++ b/resources/yacs_01.xml @@ -213,7 +213,7 @@ MeshFile = " "