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