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