Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / doc / salome / gui / SMESH / input / constructing_submeshes.rst
1 .. _constructing_submeshes_page: 
2
3 ***********************
4 Constructing sub-meshes
5 ***********************
6
7 .. contents:: `Table of contents`
8
9 What the sub-mesh is for
10 ########################
11
12 By purpose, the sub-mesh is an object used to assign to a sub-shape
13 different meshing parameters than those assigned to the main shape.
14
15 Structurally, the sub-mesh is a mesh on a certain sub-shape, or a group of
16 sub-shapes, possibly generated using different meshing algorithms
17 and/or hypotheses than those used to generate the mesh on other
18 sub-shapes. Elements generated on a sub-shape can be retrieved without
19 explicit creation of a sub-mesh by creating a *Group on Geometry* using
20 :ref:`Create Groups from Geometry <create_groups_from_geometry_page>` dialog.
21
22 Creation of a sub-mesh allows to control individually meshing of a
23 certain sub-shape, thus to get a locally coarser or finer mesh, to get
24 elements of different types in the same mesh, etc.
25
26 A sub-mesh can be meshed individually. To achieve this, select a
27 sub-mesh and either invoke **Compute Sub-mesh** vai the contextual
28 menu in the Object Browser or invoke **Mesh > Compute** menu.
29
30 .. _submesh_shape_section: 
31
32 How to get a sub-shape for sub-mesh construction
33 ################################################
34
35 A sub-shape to create a sub-mesh on should be retrieved from the main shape
36 in one of the following ways: 
37
38 * In Geometry module, via **New Entity > Explode** menu.
39 * In Geometry module, by creation of a group (**New Entity > Group > Create Group** menu). 
40 * In Mesh module, by :ref:`selecting a mesh element <subshape_by_mesh_elem>` generated on a sub-shape of interest. This way is accessible if the mesh is already computed. 
41 * In Mesh module, by clicking **Publish Sub-shape** button in a dialog showing :ref:`meshing errors <meshing_failed_anchor>`. 
42
43
44 .. :submesh_priority: 
45
46 How hypotheses are selected among sub-meshes
47 ############################################
48
49 Internally, definition of meshing parameters to apply for
50 discretization of a certain sub-shape, for example an edge of a
51 compound of solids, starts from searching an algorithm, 1D as for the
52 edge. The following sub-shapes are sequentially checked for presence
53 of a sub-mesh where 1D algorithm is assigned:
54
55 * the **edge** itself
56 * **groups of edges** containing the edge, if any
57 * **wires** sharing the edge
58 * **faces** sharing the edge
59 * **groups of faces** sharing the edge, if any
60 * **shells** sharing the edge
61 * **solids** sharing the edge
62 * **groups of solids** sharing the edge, if any
63 * the **main shape**
64
65 (This sequence of sub-shapes defines the priority of sub-meshes. Thus more
66 local, i.e. assigned to sub-shape of lower dimension, algorithms and
67 hypotheses have higher priority during the search of hypotheses to
68 apply.)
69
70 As soon as a 1D algorithm is found, the search stops and the same
71 sequence of sub-shapes is checked to find the main and additional 1D
72 hypotheses, which can be taken into account by the found 1D algorithm. 
73
74 The multi-dimensional algorithms have a higher priority than
75 uni-dimensional ones if they are assigned to sub-meshes of the
76 same priority.
77
78 If meshing parameters are defined on sub-meshes of the same priority,
79 for example, different 1D hypotheses are assigned to two faces sharing
80 an edge, the hypothesis assigned to a sub-shape with a lower ID will
81 be used for meshing. You can :ref:`change <submesh_order_anchor>` mutual
82 priority of such concurrent sub-meshes. 
83
84 .. _submesh_definition: 
85
86 How to construct a sub-mesh
87 ###########################
88
89 Construction of a sub-mesh consists of:
90
91 * Selecting a mesh which will encapsulate the sub-mesh.
92 * Selecting a sub-shape for meshing.
93 * Selecting a :ref:`meshing algorithm <basic_meshing_algos_page>` which will be used for discretization of this sub-shape.
94 * Creating or selecting one or several :ref:`hypotheses <about_hypo_page>`.
95
96
97 *To construct a sub-mesh:*
98
99 .. |img| image:: ../images/image33.gif
100
101 From the **Mesh** menu select **Create Sub-mesh** or click *"Create Sum-mesh"* button |img| in the toolbar.
102
103 The following dialog box will appear:
104
105         .. image:: ../images/createmesh-inv2.png
106                 :align: center
107
108 It allows to define the **Name**, the parent **Mesh** and the **Geometry** (e.g. a face if the parent mesh has been built on box) of the sub-mesh. You can define meshing algorithms and hypotheses in the same way as in :ref:`Create mesh <constructing_meshes_page>` dialog. 
109
110 Later you can change the applied hypotheses or their parameters in :ref:`Edit mesh/sub-mesh <editing_meshes_page>` dialog. Mesh entities generated using changed hypotheses are automatically removed.
111
112 .. _subshape_by_mesh_elem:
113
114 If the parent mesh is already computed, then you can define the **Geometry** by picking mesh elements computed on a sub-shape of interest in the 3D Viewer, i.e. you do not have to extract this sub-shape in Geometry module beforehand. To start element selection, press *Selection* button to the right of **Geometry** label. If this button is already down, then click it to release and then click it again. The following pop-up menu allowing to choose a way of geometry definition will appear.
115
116 .. image:: ../images/choose_geom_selection_way.png
117         :align: center
118
119 **Direct geometry selection** enables selecting the sub-shape in the Objec Browser.
120 **Find geometry by mesh element selection** activates the following dialog.
121
122 .. image:: ../images/find_geom_by_mesh_elem.png
123         :align: center
124
125 In this dialog, **Element Type** defines a kind of element to pick in the Viewer. Instead of picking an element in the Viewer, you can type its ID in **Element ID** field. **Geometry name** field allows defining a name of the sub-shape, with which the sub-shape will appear in the Object Browser (if not yet there).
126
127
128 .. _submesh_tree:
129
130 Sub-mesh in the Object Browser
131 ##############################
132
133 In the Object Browser the structure of the new sub-mesh will be displayed as follows:
134
135         .. image:: ../images/image10.jpg
136                 :align: center
137
138 It contains:
139
140 * a sub-mesh name (*SubMeshFace1*)
141 * a reference to the geometrical object on the basis of which the sub-mesh has been constructed (*Cylindrical Face_1*);
142 * *Applied hypotheses* folder containing references to hypotheses assigned to the sub-mesh;
143 * *Applied algorithms* folder containing references to algorithms assigned to the sub-mesh.
144
145
146 **See Also** a sample TUI Script of a :ref:`tui_construction_submesh` operation.
147