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