Uniform adaptation
******************
-By default we propose a uniform refinement. When the starting point is a mesh which was already refined, the option of unefinement will eliminate the produced elements.
+By default we propose a uniform refinement. When the starting point is a mesh which was already refined, the option of unrefinement will eliminate the produced elements.
Adaptation by a field
*********************
- Beyond an absolute value; all the elements with a value of field superior to this value will be refined.
- Beyond an absolute value that is equal to the average of the mean of the field increased of n times its standard deviation; all the elements with a value of field superior to this value will be refined.
-The same convention applies to the unefinement, the by replacing upper by lower. We can inactivate one of the functions (refinement or unefinement) by checking the button ad_hoc.
+The same convention applies to the unrefinement, the by replacing upper by lower. We can inactivate one of the functions (refinement or unrefinement) by checking the button ad_hoc.
.. image:: images/create_hypothese_ch_3.png
:align: center
A first series of options concern the maximal sharpness of mesh which we do not want to exceed. Two directives are possible, separately or together. We can impose a size of minimal element: a element the diameter of which is lower than this limit will not be any more split. By default, we propose a minimal 0 diameter, what means imposing nothing. We can impose a level of maximal refinement. By default, the maximum is 99, what amounts generally to impose nothing.
-The second series of options has interest only in case the adaptation is driven by a field and in case this field is not defined everywhere in the mesh. It arrives for example when we build a field based on a distance in a plan while the domain is 3D: the field will not be defined on nodes outside the plan. For such fields, this option allows to specify the behavior which we wish in the regions where the field is not defined. By default, there is nothing: elements are kept as they are. We can choose two other variants: to refine all the elements will a priori be cut, or to unrefine all the elements will be candidate in the unefinement.
+The second series of options has interest only in case the adaptation is driven by a field and in case this field is not defined everywhere in the mesh. It arrives for example when we build a field based on a distance in a plan while the domain is 3D: the field will not be defined on nodes outside the plan. For such fields, this option allows to specify the behavior which we wish in the regions where the field is not defined. By default, there is nothing: elements are kept as they are. We can choose two other variants: to refine all the elements will a priori be cut, or to unrefine all the elements will be candidate in the unrefinement.
The last choice concerns an additional output of the adaptation. By default, nothing is checked and no field is produced. If at least one compartment is checked, the output file MED will contain some extra fields. The first choice represents the level of refinement of every element. The convention is the one of HOMARD: an element of the initial mesh is of level 0, an element produced by the refinement of an initial element carries the level 1, etc. The elements of transition which are produced between two different levels, n and n+1, are affected by the half-level n+0,5. The second choice is for the quality of the elements. The third choice is for the diameters of the elements.
###############
.. index:: single: iteration
.. index:: single: computation
+.. index:: single: SMESH
To compute an iteration
***********************
-To launch an adaptation obtains by selecting the iteration to calculate. It is identified by an icone "wait". We choose then "*Compute*" in the menu HOMARD or with the mouse.
+To launch an adaptation obtains by selecting the iteration to calculate. It is identified by an icone "wait". We choose then "*Compute*" or "*Compute and publish*" in the menu HOMARD or with the mouse. In the first case, the adaptation is done and the MED files are written down. In the second case, the new mesh will be published into SMESH. Note that if the choice "*Compute*" was used, the new mesh can be published afterwards, using the choice "*Publish*".
.. image:: images/lancement_1.png
:align: center
The first two files are text files, editable. Liste.n.vers.(n+1).log contains information on the progress of the adaptation: summary of the mode of adaptation, percentage of concerned elements, etc. The file apad.n.vers.(n+1).bilan is a summary of the characteristics of the obtained mesh.
-The file maill.(n+1).med is the one which contains the mesh produced in the format MED. We find this mesh in the section of the object browser of the module SMESH. It is then visible in this module and usable then as quite different mesh.
+The file maill.(n+1).med is the one which contains the mesh produced in the format MED. If the publication was selected, we find this mesh in the section of the object browser of the module SMESH. It is then visible in this module and usable then as quite different mesh.
.. image:: images/lancement_2.png
General presentation
********************
-The software HOMARD is intended to adapt the meshes within the framework of the computer codes by finite elements or finite volumes. This software, carried out by EDF R&D, proceeds by refinement and unefinement of the two-dimensional or three-dimensional meshes. It is conceived to be used independently of the computer code with which it is coupled.
+The software HOMARD is intended to adapt the meshes within the framework of the computer codes by finite elements or finite volumes. This software, carried out by EDF R&D, proceeds by refinement and unrefinement of the two-dimensional or three-dimensional meshes. It is conceived to be used independently of the computer code with which it is coupled.
To refine the mesh means to cut out elements indicated according to indications provided by the user. Unrefine the mesh means to reconsider behind cuttings previously carried out: thus, to in no case HOMARD cannot simplify an existing mesh which will have been created too fine. Unrefinement takes all its importance in calculations when the zone of interest moves during calculation: one will not hold any more account of refinements previously carried out and which become useless. One will find of it an illustration with the bottom of this page.
- triangles
- quadrangles
- tetrahedra
- - hexahaedra
+ - hexahedra
- prisms
These elements can be present simultaneously. For example, HOMARD will be able to adapt a comprising mesh of the triangles and the quadrangles.
.. image:: ../images/dec_hex.png
:align: center
:alt: Découpage standard d'un hexaèdre
- :scale: 70
+ :width: 600
Pentaedrons are split in eight. Each of the quadrangular faces is split into 4 quadrangular faces and the two triangles are split into 4. Edges are created connecting each centre of quadrangular faces. Those 3 edges create 4 triangles at the centre of the pentaedron. Six quandrangular faces are created to complete the construction of the height pentaedrons.
.. image:: ../images/dec.pent.png
:align: center
:alt: Découpage standard d'un pentaèdre
- :scale: 20
+ :width: 600
Splitting for the conformity
============================
For triangles, one of the three edges is split in two. Its middle is joined to the opposite vertex to form two additional triangles.
-.. image:: ../images/dec_tria_2.gif
+.. image:: ../images/dec_tria_2.png
:align: center
:alt: Découpage de conformité d'un triangle
- :width: 399
- :height: 88
+ :width: 424
-For quadrangles, one of the four edges is split in two. Its middle is joined to the opposite vertex to form three triangles. The mesh obtained is then mixed.
+For quadrangles, three configurations exist. First, one of the four edges is split in two. Its middle is joined to the opposite vertex to form three triangles. The mesh obtained is then mixed.
.. image:: ../images/dec_quad_2.png
:align: center
:alt: Découpage de conformité d'un quadrangle
:width: 399
+For a quadrangle where two opposite edges are cut, the two middle points are connected. Two quadrangles are created.
+
+.. image:: ../images/dec_quad_3.png
+ :align: center
+ :alt: Découpage de conformité d'un quadrangle - 2
+ :width: 424
+
+For a quadrangle where two opposite edges are cut, a new vertex is created at the centre of the quadrangle. This center point is then connected to the two middle points are connected and to the opposite vertex. Three quadrangles are created.
+
+.. image:: ../images/dec_quad_4.png
+ :align: center
+ :alt: Découpage de conformité d'un quadrangle - 3
+ :width: 424
+
For a tetrahedron with three split edges, this is possible only if the edges are concurrent. Therefore, one of the four faces is split in four. The middles of the split edges are joined to the opposite vertexes. The three other faces are thus split in two, and four tetrahedrons are created.
.. image:: ../images/dec_tetr_5.gif
:width: 116
:height: 116
-The conformal strategy for the hexaedrons is based on tetraedrons and pyramids. The situation depends on the number of non conformities.
+The conformal strategy for the hexaedrons is based on tetraedrons and pyramids. The situation depends on the number of non conformities, following the rules for the quadrangles. Here is some examples from the 66 possible situations.
For an hexaedron with one face cut, we create 4 edges, 4 tetraedrons and 5 pyramids.
************************************
.. index:: single: illustration
-Some examples of use cases can be found in the web page of `HOMARD <http://www.code-aster.org/outils/homard/en/applications.html>`_
+Some examples of use cases can be found in the web page of `HOMARD <http://www.code-aster.org/outils/homard/en/applications.html>`_.
+---------------------------------------------------------------+
+---------------------------------------------------------------+
****************************
.. index:: single: field
-One proceeds here to refinement according to a field. The hypotheses are used to define the name of the field and the thresholds of refinement/unefinement. The input of the file and the instants is made in the iteration. Fields on the nodes or the elements are interpolated.
+One proceeds here to refinement according to a field. The hypotheses are used to define the name of the field and the thresholds of refinement/unrefinement. The input of the file and the instants is made in the iteration. Fields on the nodes or the elements are interpolated.
To adapt the H_1 mesh resulting from the Iter_1 iteration, two alternatives are applied. In the first, Iter_2, the field is a scalar field of indicators of error and one cuts out the 1.5% of elements where the error is largest. In the second alternative, Iter_2_bis, one is based on a vector field and one examines the jump of this vector between an element and its neighbors: one will cut out where the infinite standard of this jump is higher than the absolute threshold of 0.0001.
.. literalinclude:: ../files/tutorial_3.py
#########
.. index:: single: itération
.. index:: single: calcul
+.. index:: single: SMESH
Lancer une adaptation
*********************
-Lancer une adaptation s'obtient en sélectionnant l'itération à calculer. Elle est repérée par une icone "en attente". On choisit ensuite "*Calculer*" dans le menu HOMARD ou à la souris.
+Lancer une adaptation s'obtient en sélectionnant l'itération à calculer. Elle est repérée par une icone "en attente". On choisit ensuite "*Calculer*" ou "*Calculer et publier*" dans le menu HOMARD ou à la souris. Dans le premier cas, l'adaptation sera réalisée et les fichiers MED seront écrits. Dans le second cas, le nouveau maillage sera publié dans SMESH. On notera que si on a seulement utilisé "*Calculer*", il est toujours possible de publier a posteriori le maillage produit en sélectionnant le choix "*Publier*".
.. image:: images/lancement_1.png
:align: center
Les deux premiers fichiers sont des fichiers de texte, éditables. Liste.n.vers.(n+1).log contient des informations sur le déroulement de l'adaptation : récapitulatif du mode d'adaptation, pourcentage de mailles concernées, etc. Le fichier apad.n.vers.(n+1).bilan est un résumé des caractéristiques du maillage obtenu.
-Le fichier maill.(n+1).med est celui qui contient le maillage produit au format MED. On retrouve ce maillage dans la section de l'arbre d'études du module SMESH. Il est alors visible dans ce module et utilisable ensuite comme tout autre maillage.
+Le fichier maill.(n+1).med est celui qui contient le maillage produit au format MED. Si on a demandé la publication, on retrouve ce maillage dans la section de l'arbre d'études du module SMESH. Il est alors visible dans ce module et utilisable ensuite comme tout autre maillage.
.. image:: images/lancement_2.png
.. image:: ../images/dec_hex.png
:align: center
:alt: Découpage standard d'un hexaèdre
- :scale: 70
+ :width: 600
Le découpage des pentaèdres se fait en huit. Chacune des faces quadrangulaires est découpée en 4 faces quadrangulaires de manière standard, de même pour les faces triangulaires. On construit trois arêtes internes chacune parallèle à une des faces quadrangulaires au milieu du penatèdre. On construit ensuite 4 faces triangulaires s'appuyant sur ces arêtes et correspondant au découpage standard d'une face triangulaire à l'intérieur du pentaèdre. Six faces quadrangulaires internes sont créées deux à deux parallèles à chaque face quadrangulaire du pentaèdre.
.. image:: ../images/dec.pent.png
:align: center
:alt: Découpage standard d'un pentaèdre
- :scale: 20
+ :width: 600
Le découpage de mise en conformité
==================================
Dans le cas d'un triangle, l'une de ses trois arêtes est coupée en deux. On joint son milieu au sommet opposé pour former deux nouveaux triangles.
-.. image:: ../images/dec_tria_2.gif
+.. image:: ../images/dec_tria_2.png
:align: center
:alt: Découpage de conformité d'un triangle
- :width: 399
- :height: 88
+ :width: 424
-Dans le cas d'un quadrangle, l'une de ses quatre arêtes est coupée en deux. On joint son milieu aux deux sommets opposés pour former trois triangles. Le maillage adapté obtenu est donc mixte.
+Dans le cas d'un quadrangle, trois cas de figure sont possibles. Dans le premier cas, l'une de ses quatre arêtes est coupée en deux. On joint son milieu aux deux sommets opposés pour former trois triangles. Le maillage adapté obtenu est donc mixte : il comportera des triangles en plus des quadrangles de départ.
.. image:: ../images/dec_quad_2.png
:align: center
- :alt: Découpage de conformité d'un quadrangle
- :width: 399
+ :alt: Découpage de conformité d'un quadrangle - 1
+ :width: 424
+
+Pour un quadrangle où deux arêtes opposées sont coupées en deux, les deux milieux d'arêtes opposées sont reliés. Il y a création de deux quadrangles.
+
+.. image:: ../images/dec_quad_3.png
+ :align: center
+ :alt: Découpage de conformité d'un quadrangle - 2
+ :width: 424
+
+Pour un quadrangle où deux arêtes adjacentes sont coupées en deux, on crée un nouveau noeud au milieu du quadrangle. Ce noeud milieu est relié aux deux milieux des arêtes coupées et au sommet opposé. Il y a création de trois quadrangles.
+
+.. image:: ../images/dec_quad_4.png
+ :align: center
+ :alt: Découpage de conformité d'un quadrangle - 3
+ :width: 424
Pour un tétraèdre dont trois des arêtes sont coupées : cela n'est possible que si ces arêtes sont sur la même face. Cette face est donc coupée en quatre. On joint les milieux des arêtes découpées au sommet opposé. Cela coupe en deux les trois autres faces et il y a création de 4 tétraèdres.
:width: 116
:height: 116
-La conformité des hexaèdres est assurée par des combinaisons de tétraèdres et de pyramides. Les situations dépendent du nombre de non-conformités.
+La conformité des hexaèdres est assurée par des combinaisons de tétraèdres et de pyramides. Les situations dépendent du nombre de non-conformités, en respectant les règles de découpage des quadrangles. Voici quelques exemples pris parmi les 66 configurations possibles.
Pour un hexaèdre dont une face est coupée il y a création de 4 arêtes, de 4 tétraèdres et de 5 pyramides.
******************************************
.. index:: single: illustration
-On pourra trouver des exemples d'utilisations de l'adaptation de maillage sur le site de `HOMARD <http://www.code-aster.org/outils/homard/fr/applications.html>`_
+On pourra trouver des exemples d'utilisations de l'adaptation de maillage sur le site de `HOMARD <http://www.code-aster.org/outils/homard/fr/applications.html>`_.
+---------------------------------------------------------------+
+---------------------------------------------------------------+