From e7d9ea599135529b719de1d2868e678b28f17fa4 Mon Sep 17 00:00:00 2001 From: nicolas Date: Mon, 23 Sep 2013 12:14:37 +0000 Subject: [PATCH] =?utf8?q?Documentation=20sur=20les=20sch=C3=83=C2=A9mas?= =?utf8?q?=20YACS?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- doc/en/Makefile.am | 4 +- doc/en/gui_create_case.rst | 2 +- doc/en/gui_create_iteration.rst | 2 +- doc/en/gui_create_yacs.rst | 88 +++++++++++++++ doc/en/gui_usage.rst | 12 ++ doc/en/intro.rst | 2 +- doc/en/tui_create_case.rst | 2 +- doc/en/tui_create_iteration.rst | 21 ++-- doc/en/tui_create_yacs.rst | 181 +++++++++++++++++++++++++++++++ doc/en/tui_usage.rst | 1 + doc/en/tutorials.rst | 4 +- doc/en/yacs.rst | 11 +- doc/files/yacs_script.py | 25 +++-- doc/fr/Makefile.am | 4 +- doc/fr/demarrage_rapide.rst | 29 +++++ doc/fr/gui_create_case.rst | 2 +- doc/fr/gui_create_hypothese.rst | 2 +- doc/fr/gui_create_iteration.rst | 2 +- doc/fr/gui_create_yacs.rst | 88 +++++++++++++++ doc/fr/gui_usage.rst | 18 ++- doc/fr/images/create_yacs_01.png | Bin 0 -> 13959 bytes doc/fr/intro.rst | 2 +- doc/fr/tui_create_boundary.rst | 14 +-- doc/fr/tui_create_case.rst | 40 +++---- doc/fr/tui_create_hypothese.rst | 22 ++-- doc/fr/tui_create_iteration.rst | 27 +++-- doc/fr/tui_create_yacs.rst | 179 ++++++++++++++++++++++++++++++ doc/fr/tui_create_zone.rst | 10 +- doc/fr/tui_homard.rst | 8 +- doc/fr/tui_usage.rst | 3 +- doc/fr/tutorials.rst | 18 +-- doc/fr/yacs.rst | 13 ++- src/HOMARD/HOMARD_YACS.cxx | 1 + src/HOMARDGUI/CreateYACS.h | 56 ++++++---- src/HOMARDGUI/CreateYACS.ui | 59 ++++++---- src/HOMARDGUI/HOMARD_msg_fr.ts | 12 +- src/HOMARDGUI/HOMARD_msg_ja.ts | 12 +- src/HOMARDGUI/MonCreateYACS.cxx | 4 +- src/HOMARDGUI/MonEditYACS.cxx | 8 +- src/HOMARD_I/HOMARD_YACS_i.cxx | 1 + 40 files changed, 823 insertions(+), 166 deletions(-) create mode 100644 doc/en/gui_create_yacs.rst create mode 100644 doc/en/tui_create_yacs.rst create mode 100644 doc/fr/gui_create_yacs.rst create mode 100644 doc/fr/images/create_yacs_01.png create mode 100644 doc/fr/tui_create_yacs.rst diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am index cd6ef89e..feb204a6 100644 --- a/doc/en/Makefile.am +++ b/doc/en/Makefile.am @@ -71,7 +71,9 @@ tui_create_iteration.rst \ tui_create_zone.rst \ tui_homard.rst \ tui_usage.rst \ -tutorials.rst +tutorials.rst \ +gui_create_yacs.rst \ +tui_create_yacs.rst EXTRA_DIST += $(RSTFILES) images ../images ../files diff --git a/doc/en/gui_create_case.rst b/doc/en/gui_create_case.rst index 08aedc6a..68eed8ba 100644 --- a/doc/en/gui_create_case.rst +++ b/doc/en/gui_create_case.rst @@ -106,7 +106,7 @@ If pyramids are present into the initial mesh, HOMARD stops with an error. Howev The pursuit of a case ********************* .. index:: single: pursuit -.. index:: single: yacs +.. index:: single: YACS The pursuit of a case is interesting in the following situation. A list of adaptations was done for a case and, at the end, SALOME is closed. The directories for these iterations are kept. Then, the user wants to go on these iterations from the final point of the previous list. This function is useful with a schema YACS if a long list of adaptations is cut into small parts. diff --git a/doc/en/gui_create_iteration.rst b/doc/en/gui_create_iteration.rst index a45fe773..7826750f 100644 --- a/doc/en/gui_create_iteration.rst +++ b/doc/en/gui_create_iteration.rst @@ -16,7 +16,7 @@ The definition of an iteration is done by the following information: Name of the iteration ********************* -A name of case is proposed automatically: Iter_1, Iter_2, etc This name can be modified. It must not have been used for a preceding iteration. +A name of iteration is proposed automatically: Iter_1, Iter_2, etc This name can be modified. It must not have been used for a preceding iteration. The preceding iteration *********************** diff --git a/doc/en/gui_create_yacs.rst b/doc/en/gui_create_yacs.rst new file mode 100644 index 00000000..5d3b67d3 --- /dev/null +++ b/doc/en/gui_create_yacs.rst @@ -0,0 +1,88 @@ +.. _gui_create_yacs: + +The schema YACS +############### +.. index:: single: YACS +.. index:: single: case + +The object YACS contains every definition that allows the creation of a schema. This schema will drive the alternation of the computation of a physical modelization over a mesh and the adaptation of the mesh for the computation. This alternation is driven by some criteria for the convergence. + +.. note:: + To read an exhaustive description of any part of the schema, see :ref:`yacs` + +Procedure +********* +The automatic creation of the schema is going to be made in three phases. + +- At first, it is necessary to have done a calculation on the very first mesh. This calculation will have produced the results in a MED file. +- Then, a case is created in the module HOMARD, as described in :ref:`gui_create_case`. In this case, we create the following iteration of the mesh by defining a hypothesis of adaptation ; see :ref:`gui_create_iteration`. +- Last, from this case, a schema will be created, based on the hypothesis for the adaptation. + + +.. image:: images/create_yacs_01.png + :align: center + :alt: yacs - creation + :width: 516 + :height: 295 + +Name of the schema +****************** +A name of schema is automatically proposed: YACS_1, YACS_2, etc. This name can be modified. He must not have been already used for another schema. + +The script +********** + +The file containing the script which allows to launch the calculation connected to the physical modelling is supplied here. It is a script python who has to respect the following rules: + +- the name of the class which manages the calculation is ``Script`` +- to launch the calculation is made by the method``Compute()`` +- the result of the calculation is under the shape of three variables: the code of error, a message, a dictionary python. + +If they are necessary for the creation of the class, we can supply arguments under the shape: + +- ``--rep_calc=rep_calc``, where ``rep_calc`` is the directory for the computation +- ``--num=num``, where ``num`` eis the number of calculation : 0 for the very first calculation, then 1, 2 etc. +- ``--mesh_file=meshfile``, where ``meshfile`` is the file that contains the mesh for the computation +- ``-v``, for the messages + +In return: + +- ``error`` : the error code, integer: 0 if it was correct, non 0 if not +- ``message`` : a possible message of information about the calculation +- ``dico_resu`` : a dictionary python that contains at less the two following keys: ``FileName`` is the key for the name of the MED file which contains the results of the calculation, ``V_TEST`` is the key for the real value to be tested. + + + +Example for the script: +:: + + argu = ["--rep_calc=" + rep_calc)] + argu.append("--num=%d" % numCalc) + argu.append("--mesh_file=" + MeshFile) + Script_A = Script(argu) + error, message, dico_resu = Script_A.compute () + +.. note:: + + * To drive Code_Aster : :download:`ScriptAster<../files/yacs_script.py>` + +The directory +************* +The directory will countain all the files producted by the computations. By default, nothing is suggested. The choice is made either by giving a name into the text zone or by a selection through the search window. + +The initial mesh +**************** +The initial mesh must be stored into a MED file. It is the very first mesh that is used to solve the physical problem. The name of the file is choosen either by giving a name into the text zone or by a selection through the search window. + +The type of the schema +********************** +Two types of schemas are proposed: constant or variable. + +The default choice, 'constant', alternate a computation that is always the same and a mesh adaptation: from a computation to another one, the only part that is changed is the mesh. All the rest is identical. For example, in case the calculation would model a transient phenomenon, it is always the completeness of the transient phenomenon that is taken into account. + +The option 'variable' is inactive today. + +Corresponding python functions +****************************** +Look :ref:`tui_create_yacs` + diff --git a/doc/en/gui_usage.rst b/doc/en/gui_usage.rst index e67ce13b..bad09716 100644 --- a/doc/en/gui_usage.rst +++ b/doc/en/gui_usage.rst @@ -37,3 +37,15 @@ User's guide of the graphical interface gui_homard gui_mesh_info + +Creation of a schema YACS +************************* + +An automatic creation of a schema YACS is available in the module HOMARD. + +.. toctree:: + :maxdepth: 2 + + gui_create_yacs + + diff --git a/doc/en/intro.rst b/doc/en/intro.rst index b13589cf..00ffc8e4 100644 --- a/doc/en/intro.rst +++ b/doc/en/intro.rst @@ -53,7 +53,7 @@ Some variations may exist. If no error indicator is available, another filed can `Available here `_ -.. index:: single: yacs +.. index:: single: YACS .. note:: This alternation (computation/adaptation) suits in the :ref:`yacs` schemes. diff --git a/doc/en/tui_create_case.rst b/doc/en/tui_create_case.rst index 2f6e2b25..bdbdfe01 100644 --- a/doc/en/tui_create_case.rst +++ b/doc/en/tui_create_case.rst @@ -89,7 +89,7 @@ Creation of a case by pursuit of a computed iteration Methods of the class cas ************************ -.. index:: single: yacs +.. index:: single: YACS +---------------------------------------------------------------+ +---------------------------------------------------------------+ diff --git a/doc/en/tui_create_iteration.rst b/doc/en/tui_create_iteration.rst index 3b57984b..6862ff2d 100644 --- a/doc/en/tui_create_iteration.rst +++ b/doc/en/tui_create_iteration.rst @@ -1,7 +1,7 @@ .. _tui_create_iteration: The iteration -============= +############# .. index:: single: iteration .. index:: single: hypothesis @@ -10,7 +10,7 @@ The iteration The variables are described in :ref:`gui_create_iteration`. Methods of the class homard -""""""""""""""""""""""""""" +*************************** +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -31,7 +31,8 @@ Methods of the class homard +---------------------------------------------------------------+ Methods of both classes cas and iteration -""""""""""""""""""""""""""""""""""""""""" +****************************************" +See also in :ref:`tui_create_case`. +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -66,10 +67,10 @@ Methods of both classes cas and iteration +---------------------------------------------------------------+ Methods of the class iteration -"""""""""""""""""""""""""""""" +****************************** General methods -^^^^^^^^^^^^^^^ +=============== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -174,7 +175,7 @@ General methods +---------------------------------------------------------------+ Information about the meshes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +============================ +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -220,7 +221,7 @@ Information about the meshes +---------------------------------------------------------------+ Information about the field -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +=========================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -266,7 +267,7 @@ Information about the field +---------------------------------------------------------------+ Miscellenaous -^^^^^^^^^^^^^ +============= +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -291,7 +292,7 @@ Miscellenaous Example -""""""" +******* .. index:: single: mesh;initial To create the first iteration, the starting point is the iteration associated to the initial mesh. It is the one that defines the case. @@ -320,5 +321,5 @@ Then, the next iteration is created from the current iteration. Similar graphical input -""""""""""""""""""""""" +*********************** Look at :ref:`gui_create_iteration` diff --git a/doc/en/tui_create_yacs.rst b/doc/en/tui_create_yacs.rst new file mode 100644 index 00000000..5bab00a7 --- /dev/null +++ b/doc/en/tui_create_yacs.rst @@ -0,0 +1,181 @@ +.. _tui_create_yacs: + +The schema YACS +############### + +.. index:: single: YACS + +The variables are described in :ref:`gui_create_yacs`. + +Méthodes de la classe cas +************************* +See also in :ref:`tui_create_case`. + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: CreateYACSSchema | +| | +| **CreateYACSSchema(yacs_name, ScriptFile, DirName, MeshFile)**| +| Returns an instance of the class ``yacs``, after its | +| creation | +| | +| - ``yacs_name`` : the name of the schema | +| - ``ScriptFile`` : the file of the python script that | +| drives the computation, coupled with the mesh adaptation| +| - ``DirName`` : the directory for the computation | +| - ``MeshFile`` : the MED file that contains the very first| +| mesh for the computation | ++---------------------------------------------------------------+ + +Methodes of the class homard +**************************** + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: GetYACS | +| | +| **GetYACS(yacs_name)** | +| Returns the instance of the class classe ``yacs`` | +| known by its name | +| | +| - ``yacs_name`` : the name of the schema | ++---------------------------------------------------------------+ +| .. module:: GetAllYACSsName | +| | +| **GetAllYACSsName()** | +| Returns the list of the names of all the existing | +| schemas | ++---------------------------------------------------------------+ + + + +Methodes of the class YACS +************************** + +General methods +=============== + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: Write | +| | +| **Write()** | +| Writes the schema into the file ``schema.xml``, in the | +| directory of the case | +| | +| Returns an integer: | +| * 0: the writing is done | +| * other value: problem | ++---------------------------------------------------------------+ +| .. module:: WriteOnFile | +| | +| **WriteOnFile(file_xml)** | +| Writes the schema into a specified file. | +| | +| - ``file_xml`` : name of the xml file for the schema | +| | +| Returns an integer: | +| * 0: the writing is done | +| * other value: problem | ++---------------------------------------------------------------+ +| .. module:: Delete | +| | +| **Delete(option)** | +| Deletes the schema | +| | +| - ``option``: an integer to define what to do with the | +| xml file of the schema | +| | +| * 0: the files is kept | +| * 1: the files is removed | +| | +| Returns an integer: | +| * 0: the destruction is done | +| * other value: problem | ++---------------------------------------------------------------+ + + +Informations about the schema +============================= + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: GetName | +| | +| **GetName()** | +| Returns the name of the schema | ++---------------------------------------------------------------+ +| .. module:: GetType | +| | +| **GetType()** | +| Returns the type of the schema | +| | +| * 1 : static | +| * 2 : transitory | ++---------------------------------------------------------------+ +| .. module:: SetScriptFile | +| | +| **SetScriptFile(script_file)** | +| Defines the file of the script python that launches the | +| computation | +| | +| - ``script_file`` : the name of the file that contains | +| the script python | ++---------------------------------------------------------------+ +| .. module:: GetScriptFile | +| | +| **GetScriptFile()** | +| Returns the name of the file that contains the script | +| python | ++---------------------------------------------------------------+ +| .. module:: SetDirName | +| | +| **SetDirName(dir_name)** | +| Defines the name of the directory for the computation | +| | +| - ``dir_name`` : the name of the directory for the | +| computation | ++---------------------------------------------------------------+ +| .. module:: GetDirName | +| | +| **GetDirName()** | +| Returns the name of the directory for the computation | ++---------------------------------------------------------------+ +| .. module:: SetMeshFile | +| | +| **SetMeshFile(mesh_file)** | +| Defines the MED file of the very first mesh | +| | +| - ``mesh_file`` : the name of the MED file that contains | +| the very first mesh for the computation | ++---------------------------------------------------------------+ +| .. module:: GetMeshFile | +| | +| **GetMeshFile()** | +| Returns the name of the MED file of the very first mesh | +| for the computation | ++---------------------------------------------------------------+ + + +Example +******* +The creation of a schema is done as follows: +:: + + ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py" + DirName = "/scratch/D68518/computation" + MeshFile = "/scratch/D68518/computation/maill.00.med" + YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile) + +It can be writen down in a file : +:: + + YACSFile = "/scratch/D68518/computation/yacs.xml" + codret = YACS_0.WriteOnFile(YACSFile) + +Similar graphical input +*********************** +Look at :ref:`gui_create_yacs` + + + diff --git a/doc/en/tui_usage.rst b/doc/en/tui_usage.rst index 3cc1c575..0d8c271e 100644 --- a/doc/en/tui_usage.rst +++ b/doc/en/tui_usage.rst @@ -11,3 +11,4 @@ The functionnalities of the module HOMARD are available by python instructions. tui_create_zone tui_create_boundary tui_homard + tui_create_yacs diff --git a/doc/en/tutorials.rst b/doc/en/tutorials.rst index 74beaa55..4de3b77a 100644 --- a/doc/en/tutorials.rst +++ b/doc/en/tutorials.rst @@ -8,7 +8,7 @@ It is in the directory ``dircase`` that the files will be written resulting from Loading of the module HOMARD **************************** -.. index:: single: yacs +.. index:: single: YACS The loading of the module HOMARD is done in a way similar to the other modules. @@ -83,7 +83,7 @@ To adapt the H_1 mesh resulting from the Iter_1 iteration, two alternatives are Non plane boundaries ******************** .. index:: single: field -.. index:: single: yacs +.. index:: single: YACS One tests the follow-up of the curved borders here: analytical borders to describe various surfaces of the pipes and a discrete border to describe the intersecting lines of the two pipes. The driving of refinement is the following: uniform refinement of all the elements contained in indicated groups. One starts by refining the inner faces with the pipes; then, one refines continuation twice the external faces with the pipes. Scheme YACS carrying out this adaptation is downloadable. diff --git a/doc/en/yacs.rst b/doc/en/yacs.rst index d08dcfa9..03e6de2a 100644 --- a/doc/en/yacs.rst +++ b/doc/en/yacs.rst @@ -2,13 +2,18 @@ YACS #### -.. index:: single: yacs +.. index:: single: YACS + +Using a YACS scheme allows the coupling between a computation and an adaptation as described into :ref:`intro`. This coupling can be repeated inside a loop as long as a criteria for the convergence is reached for instance. Many ways are available to program a YACS scheme. The solution that is shown here is correct but many others are too! + +In this part, an extensive description of a schema YACS is available. + +.. note:: + The module HOMARD proposes an automatic creation of a schema YASC starting from a defined case. To do that, see :ref:`gui_create_yacs` Introduction ************ -Using a YACS scheme allows the coupling between a computation and an adaptation as described into :ref:`intro`. This coupling can be repeated inside a loop as long as a criteria for the convergence is reached for instance. Many ways are available to program a YACS scheme. The solution that is shown here is correct but many others are too! - 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 diff --git a/doc/files/yacs_script.py b/doc/files/yacs_script.py index 5b6f347d..f911f6ab 100755 --- a/doc/files/yacs_script.py +++ b/doc/files/yacs_script.py @@ -3,7 +3,7 @@ """ Lancement d'un calcul ASTER """ -__revision__ = "V5.2" +__revision__ = "V5.3" # import sys import os @@ -43,14 +43,16 @@ class Script : Mode d'emploi : --------------- -Cette procedure lance un calcul Aster. Le mode de lancement est le suivant : +Cette procedure lance un calcul Aster. Avant de lancer ce script, il faut avoir cree un repertoire pour le calcul. Dans ce repertoire, on aura mis le fichier de commandes sous le nom 'calcul.comm'. Apres un premier calcul, lance traditionnellement, on aura copie le fichier '*export' sous le nom 'calcul.ref.export' dans ce repertoire. + +Le mode de lancement est le suivant : ScriptAster --rep_calc=rep_calc --num=nro --mesh_file=mesh_file [-dump] [-h|-help] [-v] [-v_max] options Arguments obligatoires : --rep_calc=rep_calc : le repertoire du calcul. --num=nro : le numero du calcul, depuis 0. ---mesh_file=mesh_file : le fichier contenant le maillage sur lequel on veut calculer. +--mesh_file=mesh_file : le fichier contenant le maillage sur lequel on veut calculer. Le nom est absolu ou relatif par rapport au repertoire de calcul. Options supplementaires, selon les cas : . Pour un cas transitoire : @@ -379,12 +381,15 @@ Controle les arguments et stockage de quelques informations if ( self.mesh_file[:1] == "~" ) : self.mesh_file = os.path.join(HOME, self.mesh_file[2:]) if not os.path.isfile(self.mesh_file) : - self.message_info += "Fichier " + self.mesh_file - erreur = -4 - break - else : - aux = os.path.join(os.getcwd(),self.mesh_file) - self.mesh_file = os.path.normpath(aux) + aux = os.path.join(self.rep_calc, self.mesh_file) + if not os.path.isfile(aux) : + self.message_info += "Fichier " + self.mesh_file + erreur = -4 + break + else : + self.mesh_file = os.path.normpath(aux) + aux = os.path.join(os.getcwd(),self.mesh_file) + self.mesh_file = os.path.normpath(aux) # # 2. On en deduit le cas # @@ -1342,6 +1347,8 @@ Dump du resultat du calcul if self.verbose_max : print blabla print ". erreur :", erreur +# + os.remove(nomfic_donn) # if erreur : message_erreur = messages_erreur[erreur] diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am index e1362916..53a863e8 100644 --- a/doc/fr/Makefile.am +++ b/doc/fr/Makefile.am @@ -71,7 +71,9 @@ tui_create_iteration.rst \ tui_create_zone.rst \ tui_homard.rst \ tui_usage.rst \ -tutorials.rst +tutorials.rst \ +gui_create_yacs.rst \ +tui_create_yacs.rst EXTRA_DIST += $(RSTFILES) images ../images ../files diff --git a/doc/fr/demarrage_rapide.rst b/doc/fr/demarrage_rapide.rst index d443a8a8..a2f19749 100644 --- a/doc/fr/demarrage_rapide.rst +++ b/doc/fr/demarrage_rapide.rst @@ -13,46 +13,71 @@ La premi .. image:: images/homard_1.png :align: center + :alt: HOMARD - lancement + :width: 565 + :height: 154 Une fois le module HOMARD activé, on crée un cas par le choix "*Nouveau cas*" dans le menu HOMARD. .. image:: images/homard_2.png :align: center + :alt: Nouveau cas + :width: 378 + :height: 120 La fenêtre suivante apparaît : .. image:: images/intro_31.png :align: center + :alt: Fenetre + :width: 554 + :height: 298 Il faut fournir deux informations : le répertoire qui contiendra les fichiers produits par les adaptations successives et le fichier MED issu du calcul que l'on vient de faire. On valide par "Appliquer et fermer". .. image:: images/intro_32.png :align: center + :alt: Fenetre - 2 + :width: 554 + :height: 298 L'arbre d'études est enrichi de ce cas. On déplie le cas jusqu'à afficher le maillage correspondant à l'itération 0. On désigne cette itération initiale et on demande une nouvelle itération par "*Nouvelle itération*" dans le menu HOMARD ou à la souris. .. image:: images/intro_331.png :align: center + :alt: Nouvelle itération + :width: 324 + :height: 282 La fenêtre suivante apparaît : .. image:: images/intro_33.png :align: center + :alt: Nouvelle itération - 2 + :width: 649 + :height: 372 On désigne le fichier issu du calcul que l'on vient de faire et qui contient le champ de température. C'est le même que celui qui a été donné dans la définition du cas. .. image:: images/intro_34.png :align: center + :alt: Fenetre + :width: 624 + :height: 103 On clique sur "Nouveau" dans la rubrique hypothèse. La fenêtre suivante apparaît : .. image:: images/intro_35.png :align: center + :alt: Fenetre + :width: 769 + :height: 775 On modifie les options par défaut pour correspondre à notre choix de pilotage de l'adaptation. La sélection d'un pilotage par les sauts entre éléments et d'un seuil absolu de 4.0 va demander le découpage de chaque arête de maille où le température varie de plus de 4.0 degrés entre les deux extrémités de l'arête. .. image:: images/intro_36.png :align: center + :alt: Fenetre On valide par "Appliquer et fermer" cette création d'hypothése, puis la création de la nouvelle itération. On se retrouve avec un arbre d'études enrichi avec la description de l'hypothèse créée et de l'itération à calculer, repérée par une icone "en attente". @@ -60,21 +85,25 @@ Lancer l'adaptation s'obtient en s .. image:: images/intro_37.png :align: center + :alt: Fenetre A ce stade, on va utiliser ce nouveau maillage pour un deuxième calcul, dans les mêmes conditions que le premier. Une fois que ce nouveau calcul est achevé, on peut décider de poursuivre le processus d'adaptation. Pour cela on revient dans SALOME et on active le module HOMARD. On désigne l'itération que l'avait calculée précédemment "*Iter_1*" et on demande une nouvelle itération. La fenêtre suivante apparaît : .. image:: images/intro_38.png :align: center + :alt: Fenetre Comme on continue l'adaptation avec le même critère de saut de température entre noeuds voisins, on garde l'hypothèse "*Hypo_1*". Il suffit de désigner le fichier issu du calcul que l'on vient de faire et qui contient le nouveau champ de température. .. image:: images/intro_39.png :align: center + :alt: Fenetre Comme précédemment, on lance l'adaptation et on récupère les résultats dans le répertoire du cas, dont le maillage ``maill.02.med``. .. image:: ../images/intro_40.png :align: center + :alt: Fenetre On peut alors lancer un nouveau calcul sur ce nouveau maillage et poursuiver cette alternance calcul/adaptation jusqu'à l'obtention du résultat attendu. diff --git a/doc/fr/gui_create_case.rst b/doc/fr/gui_create_case.rst index dbf43bf5..1f4956c9 100644 --- a/doc/fr/gui_create_case.rst +++ b/doc/fr/gui_create_case.rst @@ -106,7 +106,7 @@ Si le maillage initial comporte des pyramides, il y a arr La poursuite d'un cas ********************* .. index:: single: poursuite -.. index:: single: yacs +.. index:: single: YACS La poursuite d'un cas correspond à la situation suivante : Une série d'adaptations ont été conduites sur un cas puis SALOME est fermé. On a gardé les répertoires de travail de ces itérations. On souhaite ensuite reprendre ces itérations pour les poursuivre là où on s'est arrêté. Cette fonctionnalité est particulièrement utile dans le cas de schémas YACS pour lesquels on scinde en plusieurs parties une longue série d'adaptations. diff --git a/doc/fr/gui_create_hypothese.rst b/doc/fr/gui_create_hypothese.rst index 501ea181..0da927c6 100644 --- a/doc/fr/gui_create_hypothese.rst +++ b/doc/fr/gui_create_hypothese.rst @@ -18,7 +18,7 @@ Il existe trois classes d'hypoth Nom de l'hypothèse ****************** -Un nom de l'hypothèse est proposé automatiquement : Hypo_1, Hypo_2, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une hypothèse précédente. +Un nom d'hypothèse est proposé automatiquement : Hypo_1, Hypo_2, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une hypothèse précédente. Adaptation uniforme ******************* diff --git a/doc/fr/gui_create_iteration.rst b/doc/fr/gui_create_iteration.rst index 5590d862..0a166313 100644 --- a/doc/fr/gui_create_iteration.rst +++ b/doc/fr/gui_create_iteration.rst @@ -16,7 +16,7 @@ La d Le nom de l'itération ********************* -Un nom de cas est proposé automatiquement : Iter_1, Iter_2, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une itération précédente. +Un nom d'iteration est proposé automatiquement : Iter_1, Iter_2, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une itération précédente. L'itération précédente ********************** diff --git a/doc/fr/gui_create_yacs.rst b/doc/fr/gui_create_yacs.rst new file mode 100644 index 00000000..2272377f --- /dev/null +++ b/doc/fr/gui_create_yacs.rst @@ -0,0 +1,88 @@ +.. _gui_create_yacs: + +Le schéma YACS +############## +.. index:: single: YACS +.. index:: single: cas + +L'objet YACS contient toutes les définitions permettant de créer un schéma. Ce schéma va piloter l'alternance d'un calcul représentant une modélisation physique sur un maillage et l'adaptation de ce maillage de calcul. Cette alternance est piloté par des critères de convergence. + +.. note:: + Pour avoir une description détaillée de chacune des rubriques formant le schéma, consulter :ref:`yacs` + +Procédure à employer +******************** +La création automatique du schéma va se faire en trois phases : + +- Au départ, il faut avoir fait un calcul sur un tout premier maillage. Ce calcul aura produit des résultats dans un fichier MED. +- Ensuite, on crée un cas dans le module HOMARD, tel qu'il est décrit dans :ref:`gui_create_case`. Dans ce cas, on crée une itération suivante du maillage en définissant une hypothèse d'adaptation ; voir :ref:`gui_create_iteration`. +- Enfin, de ce cas, on va créer le schéma qui se basera sur l'hypothèse d'adapation définie. + + +.. image:: images/create_yacs_01.png + :align: center + :alt: yacs - création + :width: 551 + :height: 295 + +Nom du schéma +************* +Un nom de schéma est proposé automatiquement : YACS_1, YACS_2, etc. Ce nom peut être modifié. Il ne doit pas avoir été déjà utilisé pour un autre schéma. + +Le script +********* + +Le fichier contenant le script qui permet de lancer le calcul lié à la modélisation physique est fourni ici. C'est un script python qui doit respecter les règles suivantes : + +- le nom de la classe qui gère le calcul est ``Script`` +- le lancement du calcul se fait par la méthode ``Compute()`` +- le résultat du calcul est sous la forme de trois variables : le code d'erreur, un message, un dictionnaire python. + +S'ils sont nécessaires à la création de la classe, on peut passer des arguments sous la forme : + +- ``--rep_calc=rep_calc``, où ``rep_calc`` est le répertoire de calcul +- ``--num=num``, où ``num`` est le numéro du calcul : 0 pour le tout premier, puis 1, 2 etc. +- ``--mesh_file=meshfile``, où ``meshfile`` est le fichier contenant le maillage sur lequel calculer. +- ``-v``, pour des messages + +Les arguments de retour : + +- ``erreur`` : le code d'erreur, entier : 0 si le calcul est correct, non nul sinon +- ``message`` : un éventuel message d'information sur le calcul +- ``dico_resu`` : un dictionnaire python qui comprend a minima les deux clés suivantes : ``FileName`` est la clé pour le nom du fichier MED qui contient les résultats du calcul, ``V_TEST`` est la clé pour la valeur réelle à tester. + + + +Exemple d'usage du script : +:: + + argu = ["--rep_calc=" + rep_calc)] + argu.append("--num=%d" % numCalc) + argu.append("--mesh_file=" + MeshFile) + Script_A = Script(argu) + erreur, message, dico_resu = Script_A.compute () + +.. note:: + + * Pour piloter Code_Aster : :download:`ScriptAster<../files/yacs_script.py>` + +Le répertoire +************* +Le répertoire est celui qui contiend les fichiers produits par le calcul. Par défaut, rien n'est proposé. Le choix est fait, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche. + +Le maillage initial +******************* +Le maillage initial doit se trouver dans un fichier au format MED. C'est celui qui est le point de départ du tout premier calcul. Le nom du fichier peut être fourni, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche. + + +Le type de schéma +***************** +Plusieurs types de schéma sont proposés : constant ou variable. + +L'option par défaut, 'constant', alterne le lancement d'un calcul qui est toujours le même et une adaptation de maillage : d'un calcul à l'autre, la seule chose qui change est le maillage. Tout le reste est identique. Par exemple, dans le cas où le calcul modéliserait un transitoire, c'est toujours l'intégralité du transitoire qui est prise en compte. + +L'option 'variable' est inactive aujourd'hui. + +Méthodes python correspondantes +******************************* +Consulter :ref:`tui_create_yacs` diff --git a/doc/fr/gui_usage.rst b/doc/fr/gui_usage.rst index 27943c6b..a860429f 100644 --- a/doc/fr/gui_usage.rst +++ b/doc/fr/gui_usage.rst @@ -1,12 +1,12 @@ .. _gui_usage: Mode d'emploi pour l'interface graphique -======================================== +######################################## .. index:: single: cas .. index:: single: itération Activer le module HOMARD -"""""""""""""""""""""""" +************************ Pour utiliser le module HOMARD, deux façons existent : #. en activant l'onglet HOMARD dans la liste des modules, @@ -18,13 +18,13 @@ L'utilisateur a alors le choix entre cr :align: center Définir une adaptation -"""""""""""""""""""""" +********************** Une fois que HOMARD a été activé, la permière action consiste à créer un cas. Il s'agit de sélectionner le maillage initial de la suite d'adaptations envisagée (voir :ref:`gui_create_case`). A partir de ce cas, on définira les itérations successives (voir :ref:`gui_create_iteration`) à partir des hypothèses (voir :ref:`gui_create_hypothese`). Les adaptations sont lancées tel que décrit dans :ref:`gui_homard`. Mode d'emploi de la saisie des données -"""""""""""""""""""""""""""""""""""""" +************************************** .. toctree:: :maxdepth: 2 @@ -37,3 +37,13 @@ Mode d'emploi de la saisie des donn gui_homard gui_mesh_info + +Création d'un schéma YACS +************************* + +Le module HOMARD propose la création automatique de schémas YACS alternant un calcul et une adaptation de maillage. + +.. toctree:: + :maxdepth: 2 + + gui_create_yacs diff --git a/doc/fr/images/create_yacs_01.png b/doc/fr/images/create_yacs_01.png new file mode 100644 index 0000000000000000000000000000000000000000..97f455d94bf69d933b01076b9499b498075bd0a9 GIT binary patch literal 13959 zcmb7r1z1$=y7njrinMeJ3Q7t{mr6-@cS$!x!zf6JfQW!JNOun1DP2Q%cMhHZ%eVJF z|9Ad<_Vr(9E-ql!ta#VEp67n<`+nXDl#>xde@y%s0)e25e-KuHK0W~1-NTE3d{yQy&7=JN>7haGK-GlG^oH!D26N%U zXH{%0Y}w2c8hdjK&;^JL;&62NvDjOUPH<$7n*Sj}5_4^l|c`8_vgnnk@2z|Xmo8Z!$ z{W_`X!%3m)XztPE?jTp+lh$=r_qvx@+maW`9&0NLN-ig18aa3ro!mRSC_E0N76uH- z*H*G|^^vgEJAHy?iN=Jq4=?nSnfW*OAm(@bkg80Vbf&}1r!@>wT}O$7=5W;#*fT$~ zO(agc-L!}D!_e?=0pR}K&fU1N?e5OLeO2oC(}7_>Ev>26eQA!;mQ>e6b#v;=7O|;I zag@Bi>;0}VbrTN=%uP$B=w=BPPh42kJmKrY&2IJ*rj%amcoCY}$E1=8XNUiE5T6dr zbm$gGPUiNTj)v~`Pj|U?w;|W-m$2j?mW$p5tT`SG*8ZC2CZ#9UBt*Pzq@hsinz7FJ>&f`S!Mpg$$W zW|y-~7Lb-%z1&$D9BWZ~yeps~*vr|{<=Q4#EUR5NTPEV;>|Q;Tc++!NEnX!htczkJs5c)j2p;J_a7{CepR(h8i3tLz1gDSIw zcck?U0Ug~~vHi2vbBf0oj}xOPqAa?Gi6dKA848OveK8IE%dJ+D)JiW7qT~FT;fi=u zt`)~}b&`vst|BL`o=@X@S!iLE_7+kB=0@Kwy4pGyetcz?oxXm<7`p1~M9x(HnBv3Sn;ZGaD$}hpQnN>)ZR6oU2YwJKNb4*!1;NGSI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AJ$x7{`Zz?5o%@_g{>m@E$i0K}AOkK#4?Vr7=!U@kYR#w(0 zIYf-NXYDSA%V%(k@q64sG(T&0Kskx?nn5&2gg!$-JcG{dB+4=V6K+uzR$Ub_RR#Q> z$oW%36FC2c!g;AO9$FrMM{yu7yoJ1_b*(Ys8RYpMPl%GNvjExwlZDXtf3-sKwz_!K zc$(Kx0Hs2q#0v$Ic5c-WtU_YFb)WxZGx$IBi2t#fZWf!Ck7}Im3e@BCPx}-CK>;3O zEk-6Ln$>I&$evc$3~~uo^E&<^=>LptgO)Sj$uA#&jNZvZpVLp!{W5DC@CB>N76R?3 vw7)`_ -.. index:: single: yacs +.. index:: single: YACS .. note:: Cet alternance de calculs et d'adaptions est très appropriée à la mise place de schémas :ref:`yacs`. diff --git a/doc/fr/tui_create_boundary.rst b/doc/fr/tui_create_boundary.rst index f28dced4..4ef349cb 100644 --- a/doc/fr/tui_create_boundary.rst +++ b/doc/fr/tui_create_boundary.rst @@ -1,7 +1,7 @@ .. _tui_create_boundary: La frontière -============ +############ .. index:: single: boundary .. index:: single: frontière @@ -11,7 +11,7 @@ La fronti Les variables sont décrites dans :ref:`gui_create_boundary`. Méthodes de la classe homard -"""""""""""""""""""""""""""" +**************************** Ces méthodes retournent une instance de la classe boundary. +----------------------------------------------------------------------------------------+ @@ -89,8 +89,8 @@ Ces m +---------------------------------------------------------------+ Méthodes de la classe cas -""""""""""""""""""""""""" -Voir également dans dans :ref:`tui_create_case`. +************************* +Voir également dans :ref:`tui_create_case`. +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -116,7 +116,7 @@ Voir +---------------------------------------------------------------+ Méthodes de la classe boundary -"""""""""""""""""""""""""""""" +****************************** +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -157,7 +157,7 @@ M Exemple -""""""" +******* Création d'une frontière discrète, d'une frontière sphèrique, puis d'une frontière cylindrique : :: inter = homard.CreateBoundaryDi("INTERSECTION", 'PIQUAGE', dircase+'/tutorial_4.fr.med') @@ -166,5 +166,5 @@ Cr Saisie graphique correspondante -""""""""""""""""""""""""""""""" +******************************* Consulter :ref:`gui_create_boundary` diff --git a/doc/fr/tui_create_case.rst b/doc/fr/tui_create_case.rst index 67db96af..bc7efc36 100644 --- a/doc/fr/tui_create_case.rst +++ b/doc/fr/tui_create_case.rst @@ -1,7 +1,7 @@ .. _tui_create_case: Le cas -====== +###### .. index:: single: cas .. index:: single: type de conformité .. index:: single: maillage;initial @@ -9,10 +9,10 @@ Le cas Les variables sont décrites dans :ref:`gui_create_case`. Méthodes de la classe homard -"""""""""""""""""""""""""""" +**************************** Création d'un cas -^^^^^^^^^^^^^^^^^ +================= +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -48,7 +48,7 @@ Cr +---------------------------------------------------------------+ Création d'un cas par poursuite d'une itération calculée -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +======================================================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -90,8 +90,8 @@ Cr Méthodes de la classe cas -""""""""""""""""""""""""" -.. index:: single: yacs +************************* +.. index:: single: YACS +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -182,21 +182,23 @@ M | * 0 : correspond à un maillage initial | | * autre valeur : poursuite d'une itération de numéro n| +---------------------------------------------------------------+ -| .. module:: WriteYACSSchema | +| .. module:: CreateYACSSchema | | | -| **WriteYACSSchema(ScriptFile, DirName, MeshFile)** | -| Ecrit un schéma YACS correspondant au cas. | +| **CreateYACSSchema(yacs_name, ScriptFile, DirName, MeshFile)**| +| Retourne une instance de la classe ``yacs`` après sa | +| création | | | -| - ``ScriptFile`` : nom du fichier contenant le script de | -| lancement du calcul | -| - ``DirName`` : le repertoire de lancement des calculs | -| du schéma | -| - ``MeshFile`` : nom du fichier contenant le maillage pour| -| le premier calcul | +| - ``yacs_name`` : le nom du schéma | +| - ``ScriptFile`` : le fichier du script python qui permet | +| de lancer le calcul à coupler avec l'adaptation de | +| maillage | +| - ``DirName`` : le répertoire où a lieu le calcul | +| - ``MeshFile`` : le fichier MED contenant le tout premier | +| maillage de calcul | +---------------------------------------------------------------+ Les options avancées -^^^^^^^^^^^^^^^^^^^^ +==================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -219,7 +221,7 @@ Les options avanc +---------------------------------------------------------------+ Informations sur le maillage initial -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==================================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -241,7 +243,7 @@ Informations sur le maillage initial Exemple -""""""" +******* La création de l'objet case_1 se fait ainsi : :: case_name = "CAS_1" @@ -259,7 +261,7 @@ La cr Saisie graphique correspondante -""""""""""""""""""""""""""""""" +******************************* Consulter :ref:`gui_create_case` diff --git a/doc/fr/tui_create_hypothese.rst b/doc/fr/tui_create_hypothese.rst index 84f1bf54..2960ee2b 100644 --- a/doc/fr/tui_create_hypothese.rst +++ b/doc/fr/tui_create_hypothese.rst @@ -1,7 +1,7 @@ .. _tui_create_hypothese: L'hypothèse -=========== +########### .. index:: single: itération .. index:: single: hypothèse @@ -10,7 +10,7 @@ L'hypoth Les variables sont décrites dans :ref:`gui_create_hypothese`. Méthodes de la classe homard -"""""""""""""""""""""""""""" +**************************** +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -37,10 +37,10 @@ M +---------------------------------------------------------------+ Méthodes de la classe hypothese -""""""""""""""""""""""""""""""" +******************************* Généralités -^^^^^^^^^^^ +=========== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -97,7 +97,7 @@ G +---------------------------------------------------------------+ Le champ et les seuils -^^^^^^^^^^^^^^^^^^^^^^ +====================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -167,7 +167,7 @@ Le champ et les seuils Les composantes du champ -^^^^^^^^^^^^^^^^^^^^^^^^ +======================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -198,7 +198,7 @@ Les composantes du champ Les zones -^^^^^^^^^ +========= +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -215,7 +215,7 @@ Les zones Le filtrage par les groupes -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +=========================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -233,7 +233,7 @@ Le filtrage par les groupes +---------------------------------------------------------------+ Les options avancées -^^^^^^^^^^^^^^^^^^^^ +==================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -299,7 +299,7 @@ Les options avanc Exemple -""""""" +******* La création de l'objet hypo_1 se fait ainsi : :: hypo_1 = homard.CreateHypothesis("HypoField") @@ -311,7 +311,7 @@ La cr Saisie graphique correspondante -""""""""""""""""""""""""""""""" +******************************* Consulter :ref:`gui_create_hypothese` .. warning:: diff --git a/doc/fr/tui_create_iteration.rst b/doc/fr/tui_create_iteration.rst index 9cb3c531..6fbb9c03 100644 --- a/doc/fr/tui_create_iteration.rst +++ b/doc/fr/tui_create_iteration.rst @@ -1,7 +1,7 @@ .. _tui_create_iteration: L'itération -=========== +########### .. index:: single: itération .. index:: single: hypothèse @@ -10,7 +10,7 @@ L'it Les variables sont décrites dans :ref:`gui_create_iteration`. Méthodes de la classe homard -"""""""""""""""""""""""""""" +**************************** +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -30,7 +30,8 @@ M +---------------------------------------------------------------+ Méthodes communes aux classes cas et iteration -"""""""""""""""""""""""""""""""""""""""""""""" +********************************************** +Voir également dans :ref:`tui_create_case`. +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -63,10 +64,10 @@ M +---------------------------------------------------------------+ Méthodes de la classe iteration -""""""""""""""""""""""""""""""" +******************************* Généralités -^^^^^^^^^^^ +=========== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -171,7 +172,7 @@ G +---------------------------------------------------------------+ Informations sur les maillages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +============================== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -217,7 +218,7 @@ Informations sur les maillages +---------------------------------------------------------------+ Informations sur le champ -^^^^^^^^^^^^^^^^^^^^^^^^^ +========================= +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -265,7 +266,7 @@ Informations sur le champ +---------------------------------------------------------------+ Divers -^^^^^^ +====== +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -292,10 +293,11 @@ Divers Exemple -""""""" +******* .. index:: single: maillage;initial -Pour la création de la première itération, on part de celle qui correspond au maillage initial. C'est celle contenue dans le cas. :: +Pour la création de la première itération, on part de celle qui correspond au maillage initial. C'est celle contenue dans le cas. +:: iter_name = "Iteration_1" iter_1 = case_1.NextIteration(iter_name) @@ -306,7 +308,8 @@ Pour la cr iter_1.AssociateHypo("HypoField") codret = iter_1.Compute(1, 2) -Ensuite, on crée une itération suivante à l'itération parent de laquelle on part. :: +Ensuite, on crée une itération suivante à l'itération parent de laquelle on part. +:: iter_name = "Iteration_2" iter_2 = iter_1.NextIteration(iter_name) @@ -319,5 +322,5 @@ Ensuite, on cr Saisie graphique correspondante -""""""""""""""""""""""""""""""" +******************************* Consulter :ref:`gui_create_iteration` diff --git a/doc/fr/tui_create_yacs.rst b/doc/fr/tui_create_yacs.rst new file mode 100644 index 00000000..22545102 --- /dev/null +++ b/doc/fr/tui_create_yacs.rst @@ -0,0 +1,179 @@ +.. _tui_create_yacs: + +Le schéma YACS +############## + +.. index:: single: YACS + +Les variables sont décrites dans :ref:`gui_create_yacs`. + +Méthodes de la classe cas +************************* +Voir également dans :ref:`tui_create_case`. + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: CreateYACSSchema | +| | +| **CreateYACSSchema(yacs_name, ScriptFile, DirName, MeshFile)**| +| Retourne une instance de la classe ``yacs`` après sa | +| création | +| | +| - ``yacs_name`` : le nom du schéma | +| - ``ScriptFile`` : le fichier du script python qui permet | +| de lancer le calcul à coupler avec l'adaptation de | +| maillage | +| - ``DirName`` : le répertoire où a lieu le calcul | +| - ``MeshFile`` : le fichier MED contenant le tout premier | +| maillage de calcul | ++---------------------------------------------------------------+ + +Méthodes de la classe homard +**************************** + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: GetYACS | +| | +| **GetYACS(yacs_name)** | +| Retourne l'instance de la classe ``yacs`` connue par | +| son nom | +| | +| - ``yacs_name`` : le nom du schéma | ++---------------------------------------------------------------+ +| .. module:: GetAllYACSsName | +| | +| **GetAllYACSsName()** | +| Retourne la liste des noms de tous les schémas existant | ++---------------------------------------------------------------+ + + + +Méthodes de la classe YACS +************************** + +Généralités +=========== + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: Write | +| | +| **Write()** | +| Ecrit le schéma dans le fichier ``schema.xml``, dans le | +| répertoire du cas | +| | +| Retourne un entier : | +| * 0 : écriture réussie | +| * autre valeur : problème | ++---------------------------------------------------------------+ +| .. module:: WriteOnFile | +| | +| **WriteOnFile(file_xml)** | +| Ecrit le schéma dans un fichier désigné. | +| | +| - ``file_xml`` : nom du fichier xml du schéma | +| | +| Retourne un entier : | +| * 0 : écriture réussie | +| * autre valeur : problème | ++---------------------------------------------------------------+ +| .. module:: Delete | +| | +| **Delete(option)** | +| Detruit le schéma. | +| | +| - ``option`` : un entier précisant ce qui est fait du | +| fichier xml du schéma | +| | +| * 0 : le fichier est conservé | +| * 1 : le fichier est détruit | +| | +| Retourne un entier : | +| * 0 : destruction réussie | +| * autre valeur : problème | ++---------------------------------------------------------------+ + + +Informations sur le schéma +========================== + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: GetName | +| | +| **GetName()** | +| Retourne le nom du schéma | ++---------------------------------------------------------------+ +| .. module:: GetType | +| | +| **GetType()** | +| Retourne le type du schéma | +| | +| * 1 : statique | +| * 2 : transitoire | ++---------------------------------------------------------------+ +| .. module:: SetScriptFile | +| | +| **SetScriptFile(script_file)** | +| Définit le fichier du script python de lancement du calcul| +| | +| - ``script_file`` : le nom du fichier qui contient le | +| le script python | ++---------------------------------------------------------------+ +| .. module:: GetScriptFile | +| | +| **GetScriptFile()** | +| Retourne le nom du fichier MED qui contient le script | +| python | ++---------------------------------------------------------------+ +| .. module:: SetDirName | +| | +| **SetDirName(dir_name)** | +| Définit le nom du répertoire de calcul | +| | +| - ``dir_name`` : le nom du répertoire de calcul | ++---------------------------------------------------------------+ +| .. module:: GetDirName | +| | +| **GetDirName()** | +| Retourne le nom du répertoire de calcul | ++---------------------------------------------------------------+ +| .. module:: SetMeshFile | +| | +| **SetMeshFile(mesh_file)** | +| Définit le fichier MED du tout premier maillage | +| | +| - ``mesh_file`` : le nom du fichier MED contenant le tout | +| premier maillage de calcul | ++---------------------------------------------------------------+ +| .. module:: GetMeshFile | +| | +| **GetMeshFile()** | +| Retourne le nom du fichier MED du tout premier maillage | +| de calcul | ++---------------------------------------------------------------+ + + +Exemple +******* +La création d'un schéma se fait ainsi : +:: + + ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py" + DirName = "/scratch/D68518/calcul" + MeshFile = "/scratch/D68518/calcul/maill.00.med" + YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile) + +On peut ensuite l'écrire dans un fichier : +:: + + YACSFile = "/scratch/D68518/calcul/yacs.xml" + codret = YACS_0.WriteOnFile(YACSFile) + +Saisie graphique correspondante +******************************* +Consulter :ref:`gui_create_yacs` + + + diff --git a/doc/fr/tui_create_zone.rst b/doc/fr/tui_create_zone.rst index ecad60c5..57e4d884 100644 --- a/doc/fr/tui_create_zone.rst +++ b/doc/fr/tui_create_zone.rst @@ -1,7 +1,7 @@ .. _tui_create_zone: La zone -======= +####### .. index:: single: zone .. index:: single: boite @@ -15,7 +15,7 @@ La zone Les variables sont décrites dans :ref:`gui_create_zone`. Méthodes de la classe homard -"""""""""""""""""""""""""""" +**************************** Ces méthodes retournent une instance de la classe zone. @@ -144,7 +144,7 @@ Ces m Méthodes de la classe zone -"""""""""""""""""""""""""" +************************** +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -184,7 +184,7 @@ M Exemple -""""""" +******* La création d'une boîte 3D se fait ainsi : :: @@ -198,7 +198,7 @@ La cr Saisie graphique correspondante -""""""""""""""""""""""""""""""" +******************************* Consulter :ref:`gui_create_zone` .. warning:: diff --git a/doc/fr/tui_homard.rst b/doc/fr/tui_homard.rst index 5727d981..d81278b0 100644 --- a/doc/fr/tui_homard.rst +++ b/doc/fr/tui_homard.rst @@ -1,16 +1,16 @@ .. _tui_homard: Le calcul -========= +######### Méthodes de la classe homard -"""""""""""""""""""""""""""" +**************************** Exemple -""""""" +******* Saisie graphique correspondante -""""""""""""""""""""""""""""""" +******************************* Consulter :ref:`gui_homard` diff --git a/doc/fr/tui_usage.rst b/doc/fr/tui_usage.rst index fec8871e..6ff6f751 100644 --- a/doc/fr/tui_usage.rst +++ b/doc/fr/tui_usage.rst @@ -1,5 +1,5 @@ Mode d'emploi pour TUI -====================== +###################### Le module HOMARD peut se lancer à partir d'instructions python. On trouvera ici la description de chacune des fonctions accessibles par l'utilisateur. .. toctree:: @@ -11,3 +11,4 @@ Le module HOMARD peut se lancer tui_create_zone tui_create_boundary tui_homard + tui_create_yacs diff --git a/doc/fr/tutorials.rst b/doc/fr/tutorials.rst index d91c4f86..1f040f81 100644 --- a/doc/fr/tutorials.rst +++ b/doc/fr/tutorials.rst @@ -1,5 +1,5 @@ Exemples -======== +######## .. index:: single: exemple .. index:: single: python @@ -7,8 +7,8 @@ On trouvera ici les instructions python pour quelques configurations caract C'est dans le répertoire ``dircase`` que seront écrits les fichiers résultant des adaptations successives. Ce répertoire est créé par défaut dans ``/tmp``. Chargement du module HOMARD -""""""""""""""""""""""""""" -.. index:: single: yacs +*************************** +.. index:: single: YACS Le chargement du module HOMARD se fait de manière analogue aux autres modules. @@ -28,7 +28,7 @@ Pour utiliser le module HOMARD au sein d'un sch homard.SetCurrentStudy(salome.myStudy) Raffinement uniforme -"""""""""""""""""""" +******************** .. index:: single: raffinement;uniforme On fera ici trois raffinements uniformes successifs du maillage contenu dans le fichier ``tutorial_1.00.med``. Quelques remarques : @@ -46,7 +46,7 @@ On fera ici trois raffinements uniformes successifs du maillage contenu dans le Raffinement par des zones -""""""""""""""""""""""""" +************************* .. index:: single: zone On procède ici au raffinement selon des zones. Pour passer du maillage initial au maillage 'M_1', on utilise une boîte encadrant le plan z=1 et une sphère centrée sur l'origine de rayon 1.05. Puis pour passer du maillage 'M_1' au maillage 'M_2', on remplace la sphère par une boîte encadrant le cube de côté 0.5, pointant sur l'origine. On notera que le type de raffinement n'a pas été précisé ; par défaut, il sera donc conforme. @@ -62,7 +62,7 @@ On proc Raffinement selon un champ -"""""""""""""""""""""""""" +************************** .. index:: single: champ On procède ici au raffinement selon un champ. Les hypothèses servent à définir le nom du champ et les seuils de raffinement/déraffinement. La donnée du fichier et des instants est faite dans l'itération. Des champs sur les noeuds ou sur les mailles sont interpolés. @@ -80,9 +80,9 @@ Pour adapter le maillage H_1 issu de l'it Suivi de frontières courbes -""""""""""""""""""""""""""" +*************************** .. index:: single: champ -.. index:: single: yacs +.. index:: single: YACS On teste ici le suivi des frontières courbes : des frontières analytiques pour décrire les différentes surfaces des tuyaux et une frontière discrète pour décrire les lignes d'intersection des deux tuyaux. Le pilotage du raffinement est le suivant : raffinement uniforme de toutes les mailles contenues dans des groupes désignés. On commence par raffiner les faces internes aux tuyaux ; ensuite, on raffine deux fois de suite les faces externes aux tuyaux. Le schéma YACS réalisant cette adaptation est téléchargeable. @@ -100,7 +100,7 @@ Le sch Instructions spécifiques au 2D -"""""""""""""""""""""""""""""" +****************************** .. index:: single: 2D Les instructions pour adapter un maillage 2D sont exactement identiques à celles nécessaires à l'adaptation d'un maillage 3D. La seule exception concerne le raffinement selon des zones géométriques : des fonctions différentes sont utilisées pour pouvoir définir des zones 2D. On donne alors les coordonnées 2D des zones, en précisant l'orientation du plan du maillage. diff --git a/doc/fr/yacs.rst b/doc/fr/yacs.rst index 18b0b03c..e91f8ba9 100644 --- a/doc/fr/yacs.rst +++ b/doc/fr/yacs.rst @@ -2,13 +2,18 @@ YACS #### -.. index:: single: yacs - -Introduction -************ +.. index:: single: YACS L'utilisation de schémas YACS va permettre de coupler un calcul et une adaptation comme il est décrit dans :ref:`intro`. Ce couplage peut être répété au sein d'une boucle jusqu'à l'obtention d'un critère de convergence par exemple. Il existe de nombreuses façons de programmer un schéma YACS. La solution proposée ici fonctionne mais on peut très bien faire autrement ! +On trouvera ici la description exhaustive d'un schéma YACS pour un calcul statique. + +.. note:: + Le module HOMARD propose une création automatique de schéma YASC à partir d'un cas précédemment créé. Pour la mettre en oeuvre, consulter :ref:`gui_create_yacs` + +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 diff --git a/src/HOMARD/HOMARD_YACS.cxx b/src/HOMARD/HOMARD_YACS.cxx index 99b4c94f..9931af09 100644 --- a/src/HOMARD/HOMARD_YACS.cxx +++ b/src/HOMARD/HOMARD_YACS.cxx @@ -104,6 +104,7 @@ int HOMARD_YACS::GetType() const { return _Type; } +//============================================================================= void HOMARD_YACS::SetDirName( const char* NomDir ) { _NomDir = std::string( NomDir ); diff --git a/src/HOMARDGUI/CreateYACS.h b/src/HOMARDGUI/CreateYACS.h index 85eda433..9ce7a302 100644 --- a/src/HOMARDGUI/CreateYACS.h +++ b/src/HOMARDGUI/CreateYACS.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'CreateYACS.ui' ** -** Created: Wed Sep 18 10:38:42 2013 +** Created: Mon Sep 23 13:29:12 2013 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -49,8 +49,10 @@ public: QLabel *MeshFile; QPushButton *PBMeshFile; QLineEdit *LEMeshFile; - QRadioButton *RBStatic; - QRadioButton *RBTransient; + QGroupBox *GBTypeSchema; + QHBoxLayout *_4; + QRadioButton *RBConstant; + QRadioButton *RBVariable; QGroupBox *GroupButtons; QGridLayout *gridLayout1; QPushButton *buttonHelp; @@ -63,7 +65,7 @@ public: { if (CreateYACS->objectName().isEmpty()) CreateYACS->setObjectName(QString::fromUtf8("CreateYACS")); - CreateYACS->resize(537, 304); + CreateYACS->resize(538, 340); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -81,7 +83,7 @@ public: LEName->setObjectName(QString::fromUtf8("LEName")); LEName->setMaxLength(32); - gridLayout_2->addWidget(LEName, 0, 1, 1, 3); + gridLayout_2->addWidget(LEName, 0, 1, 1, 1); gridLayout = new QGridLayout(); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); @@ -104,7 +106,7 @@ public: gridLayout->addWidget(LECaseName, 0, 2, 1, 1); - gridLayout_2->addLayout(gridLayout, 1, 0, 1, 4); + gridLayout_2->addLayout(gridLayout, 1, 0, 1, 3); _2 = new QHBoxLayout(); #ifndef Q_OS_MAC @@ -130,7 +132,7 @@ public: _2->addWidget(LEScriptFile); - gridLayout_2->addLayout(_2, 2, 0, 1, 4); + gridLayout_2->addLayout(_2, 2, 0, 1, 3); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC @@ -156,7 +158,7 @@ public: hboxLayout->addWidget(LEDirName); - gridLayout_2->addLayout(hboxLayout, 3, 0, 1, 4); + gridLayout_2->addLayout(hboxLayout, 3, 0, 1, 3); _3 = new QHBoxLayout(); #ifndef Q_OS_MAC @@ -182,18 +184,31 @@ public: _3->addWidget(LEMeshFile); - gridLayout_2->addLayout(_3, 4, 0, 1, 4); + gridLayout_2->addLayout(_3, 4, 0, 1, 3); - RBStatic = new QRadioButton(CreateYACS); - RBStatic->setObjectName(QString::fromUtf8("RBStatic")); - RBStatic->setChecked(true); + GBTypeSchema = new QGroupBox(CreateYACS); + GBTypeSchema->setObjectName(QString::fromUtf8("GBTypeSchema")); + _4 = new QHBoxLayout(GBTypeSchema); +#ifndef Q_OS_MAC + _4->setSpacing(6); +#endif +#ifndef Q_OS_MAC + _4->setContentsMargins(9, 9, 9, 9); +#endif + _4->setObjectName(QString::fromUtf8("_4")); + RBConstant = new QRadioButton(GBTypeSchema); + RBConstant->setObjectName(QString::fromUtf8("RBConstant")); + RBConstant->setChecked(true); + + _4->addWidget(RBConstant); + + RBVariable = new QRadioButton(GBTypeSchema); + RBVariable->setObjectName(QString::fromUtf8("RBVariable")); - gridLayout_2->addWidget(RBStatic, 5, 0, 1, 2); + _4->addWidget(RBVariable); - RBTransient = new QRadioButton(CreateYACS); - RBTransient->setObjectName(QString::fromUtf8("RBTransient")); - gridLayout_2->addWidget(RBTransient, 5, 2, 1, 1); + gridLayout_2->addWidget(GBTypeSchema, 5, 0, 1, 2); GroupButtons = new QGroupBox(CreateYACS); GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); @@ -230,11 +245,11 @@ public: gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); - gridLayout_2->addWidget(GroupButtons, 6, 0, 1, 3); + gridLayout_2->addWidget(GroupButtons, 6, 0, 1, 2); spacer_2 = new QSpacerItem(128, 25, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_2->addItem(spacer_2, 6, 3, 1, 1); + gridLayout_2->addItem(spacer_2, 6, 2, 1, 1); retranslateUi(CreateYACS); @@ -254,8 +269,9 @@ public: PBDir->setText(QString()); MeshFile->setText(QApplication::translate("CreateYACS", "Mesh file", 0, QApplication::UnicodeUTF8)); PBMeshFile->setText(QString()); - RBStatic->setText(QApplication::translate("CreateYACS", "Static", 0, QApplication::UnicodeUTF8)); - RBTransient->setText(QApplication::translate("CreateYACS", "Transient", 0, QApplication::UnicodeUTF8)); + GBTypeSchema->setTitle(QApplication::translate("CreateYACS", "Type of schema", 0, QApplication::UnicodeUTF8)); + RBConstant->setText(QApplication::translate("CreateYACS", "Constant", 0, QApplication::UnicodeUTF8)); + RBVariable->setText(QApplication::translate("CreateYACS", "Variable", 0, QApplication::UnicodeUTF8)); GroupButtons->setTitle(QString()); buttonHelp->setText(QApplication::translate("CreateYACS", "Help", 0, QApplication::UnicodeUTF8)); buttonApply->setText(QApplication::translate("CreateYACS", "Apply", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateYACS.ui b/src/HOMARDGUI/CreateYACS.ui index aab5bc5b..e1819619 100644 --- a/src/HOMARDGUI/CreateYACS.ui +++ b/src/HOMARDGUI/CreateYACS.ui @@ -6,8 +6,8 @@ 0 0 - 537 - 304 + 538 + 340 @@ -30,14 +30,14 @@ - + 32 - + @@ -74,7 +74,7 @@ - + 6 @@ -111,7 +111,7 @@ - + 6 @@ -148,7 +148,7 @@ - + 6 @@ -186,23 +186,38 @@ - - - Static - - - true - - - - - - - Transient + + + Type of schema + + + 6 + + + 9 + + + + + Constant + + + true + + + + + + + Variable + + + + - + @@ -257,7 +272,7 @@ - + Qt::Horizontal diff --git a/src/HOMARDGUI/HOMARD_msg_fr.ts b/src/HOMARDGUI/HOMARD_msg_fr.ts index 77b334a9..22476ea7 100644 --- a/src/HOMARDGUI/HOMARD_msg_fr.ts +++ b/src/HOMARDGUI/HOMARD_msg_fr.ts @@ -988,12 +988,16 @@ Maillage initial - Static - Statique + Constant + Constant - Transient - Transitoire + Variable + Variable + + + Type of schema + Type de schema Edit a file diff --git a/src/HOMARDGUI/HOMARD_msg_ja.ts b/src/HOMARDGUI/HOMARD_msg_ja.ts index a7079d5f..73a66509 100644 --- a/src/HOMARDGUI/HOMARD_msg_ja.ts +++ b/src/HOMARDGUI/HOMARD_msg_ja.ts @@ -988,12 +988,16 @@ Mesh File - Static - Static + Constant + Constant - Transient - Transient + Variable + Variable + + + Type of schema + Type of schema Edit a file diff --git a/src/HOMARDGUI/MonCreateYACS.cxx b/src/HOMARDGUI/MonCreateYACS.cxx index aab4afe2..8b596bdd 100644 --- a/src/HOMARDGUI/MonCreateYACS.cxx +++ b/src/HOMARDGUI/MonCreateYACS.cxx @@ -93,8 +93,8 @@ void MonCreateYACS::InitConnect() connect( PBDir, SIGNAL(pressed()), this, SLOT(SetDirName())); connect( PBMeshFile, SIGNAL(pressed()), this, SLOT(SetMeshFile())); - connect( RBStatic, SIGNAL(clicked()), this, SLOT(SetType(1))); - connect( RBTransient, SIGNAL(clicked()), this, SLOT(SetType(2))); + connect( RBConstant, SIGNAL(clicked()), this, SLOT(SetType(1))); + connect( RBVariable, SIGNAL(clicked()), this, SLOT(SetType(2))); connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK())); connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply())); diff --git a/src/HOMARDGUI/MonEditYACS.cxx b/src/HOMARDGUI/MonEditYACS.cxx index 99ff258b..b168f2a2 100644 --- a/src/HOMARDGUI/MonEditYACS.cxx +++ b/src/HOMARDGUI/MonEditYACS.cxx @@ -71,10 +71,10 @@ void MonEditYACS::InitValEdit() LEMeshFile->setText(aMeshFile); int Type=aYACS->GetType(); - if(Type==1) { RBStatic->setChecked(true); } - else { RBTransient->setChecked(true); }; - RBStatic->setEnabled(false); - RBTransient->setEnabled(false); + if(Type==1) { RBConstant->setChecked(true); } + else { RBVariable->setChecked(true); }; + RBConstant->setEnabled(false); + RBVariable->setEnabled(false); // adjustSize(); } diff --git a/src/HOMARD_I/HOMARD_YACS_i.cxx b/src/HOMARD_I/HOMARD_YACS_i.cxx index 2e197115..70de2c9a 100644 --- a/src/HOMARD_I/HOMARD_YACS_i.cxx +++ b/src/HOMARD_I/HOMARD_YACS_i.cxx @@ -123,6 +123,7 @@ CORBA::Long HOMARD_YACS_i::GetType() ASSERT( myHomardYACS ); return CORBA::Long( myHomardYACS->GetType() ); } +//============================================================================= void HOMARD_YACS_i::SetDirName( const char* NomDir ) { ASSERT( myHomardYACS ); -- 2.30.2