Salome HOME
Update of CheckDone
[modules/smesh.git] / doc / salome / gui / SMESH / input / 1d_meshing_hypo.rst
1 .. _a1d_meshing_hypo_page:
2
3 *********************
4 1D Meshing Hypotheses
5 *********************
6
7 Basic 1D hypothesis specifies:
8         * how a :ref:`Wire Discretization <a1d_algos_anchor>` should divide the edge;
9         * how a :ref:`Composite Side Discretization <a1d_algos_anchor>` should divide the group of C1-continuous edges.
10
11 1D hypotheses can be categorized by type of nodes distribution as follows:
12         * Uniform distribution:
13                 * :ref:`Local Length <average_length_anchor>`
14                 * :ref:`Max Size <max_length_anchor>`
15                 * :ref:`Number of Segments <number_of_segments_anchor>` with Equidistant distribution
16                 * :ref:`Automatic Length <automatic_length_anchor>`
17
18         * Constantly increasing or decreasing length of segments:
19                 * :ref:`Arithmetic Progression <arithmetic_1d_anchor>` 
20                 * :ref:`Geometric Progression <geometric_1d_anchor>`
21                 * :ref:`Start and end length <start_and_end_length_anchor>` 
22                 * :ref:`Number of Segments <number_of_segments_anchor>` with Scale distribution
23
24         * Distribution depending on curvature:
25                 * :ref:`Adaptive <adaptive_1d_anchor>` 
26                 * :ref:`Deflection <deflection_1d_anchor>` 
27
28         * Arbitrary distribution:
29                 * :ref:`Fixed Points <fixed_points_1d_anchor>` 
30                 * :ref:`Number of Segments <number_of_segments_anchor>` with :ref:`Analytic Density Distribution <analyticdensity_anchor>` or Table Density Distribution
31
32
33 .. _adaptive_1d_anchor:
34
35 Adaptive hypothesis
36 ###################
37
38 **Adaptive** hypothesis allows to split edges into segments with a length that depends on the curvature of edges and faces and is limited by **Min. Size** and **Max Size**. The length of a segment also depends on the lengths of adjacent segments (that can't differ more than twice) and on the  distance to close geometrical entities (edges and faces) to avoid creation of narrow 2D elements.
39
40         .. image:: ../images/adaptive1d.png
41                 :align: center
42
43 * **Min size** parameter limits the minimal segment size. 
44 * **Max size** parameter defines the length of segments on straight edges. 
45 * **Deflection** parameter gives maximal distance of a segment from a curved edge.
46
47         .. image:: ../images/adaptive1d_sample_mesh.png 
48                 :align: center
49
50         .. centered::
51                 Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features
52
53 **See Also** a :ref:`sample TUI Script <tui_1d_adaptive>` that uses Adaptive hypothesis.
54
55 .. _arithmetic_1d_anchor:
56
57 Arithmetic Progression hypothesis
58 #################################
59
60 **Arithmetic Progression** hypothesis allows to split edges into segments with a length that changes in arithmetic progression (Lk = Lk-1 + d) beginning from a given starting length and up to a given end length.
61
62 The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use 
63 **Add** button to add the selected edges to the list.
64
65 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
66
67
68 .. image:: ../images/a-arithmetic1d.png
69         :align: center
70
71
72 .. image:: ../images/b-ithmetic1d.png 
73         :align: center
74
75 .. centered::
76         Arithmetic Progression hypothesis - the size of mesh elements gradually increases
77
78 **See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis <tui_1d_arithmetic>` operation.  
79
80 .. _geometric_1d_anchor:
81
82 Geometric Progression hypothesis
83 ################################
84
85 **Geometric Progression** hypothesis allows splitting edges into segments with a length that changes in geometric progression (Lk = Lk-1 * d) starting from a given **Start Length** and with a given **Common Ratio**.
86
87 The splitting direction is defined by the orientation of the underlying geometrical edge.
88 **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list.
89
90 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
91
92 .. image:: ../images/a-geometric1d.png
93         :align: center
94
95 **See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis <tui_1d_arithmetic>` operation.  
96
97 .. _deflection_1d_anchor:
98
99 Deflection hypothesis
100 #####################
101
102 **Deflection** hypothesis can be applied for meshing curvilinear edges composing your geometrical object. It defines only one parameter: the value of deflection (or chord error).
103
104 A geometrical edge is divided into segments of length depending on edge curvature. The more curved the edge, the shorter the segment. Nodes on the edge are placed so that the maximum distance between the edge and a segment approximating a part of edge between two nodes should not exceed the value of deflection.
105
106 .. image:: ../images/a-deflection1d.png
107         :align: center
108
109 .. image:: ../images/b-flection1d.png 
110         :align: center
111
112 .. centered::
113         Deflection hypothesis - useful for meshing curvilinear edges
114
115 **See Also** a sample TUI Script of :ref:`Defining Deflection hypothesis <tui_deflection_1d>` operation.
116
117 .. _average_length_anchor:
118
119 Local Length hypothesis
120 #######################
121
122 **Local Length** hypothesis can be applied for meshing of edges composing your geometrical object. Definition of this hypothesis consists of setting the **length** of segments, which will approximate these edges, and the **precision** of rounding.
123
124 The **precision** parameter is used to round a *number of segments*, calculated by dividing the *edge length* by the specified **length** of segment, to the higher integer if the *remainder* exceeds the **precision** and to the lower integer otherwise. 
125 Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07.
126
127 For example: if *edge length* is 10.0 and the segment **length**
128 is 3.0 then their division gives 10./3. = 3.33(3) and the *remainder* is 0.33(3).
129 If **precision** is less than 0.33(3) then the edge is divided into 3 segments.
130 If **precision** is more than 0.33(3) then the edge is divided into 4 segments.
131
132
133 .. image:: ../images/image41.gif
134         :align: center
135
136 .. image:: ../images/a-averagelength.png
137         :align: center
138
139 .. image:: ../images/b-erage_length.png 
140         :align: center
141
142 .. centered::
143         Local Length hypothesis - all 1D mesh segments are equal
144
145 **See Also** a sample TUI Script of :ref:`Defining Local Length <tui_average_length>` hypothesis
146 operation.
147
148 .. _max_length_anchor:
149
150 Max Size
151 ########
152
153 **Max Size** hypothesis allows splitting geometrical edges into segments not longer than the given length. Definition of this hypothesis consists of setting the maximal allowed **length** of segments.
154 **Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`Ratio Bounding Box Diagonal / Max Size <diagonal_size_ratio_pref>` preference parameter.
155 **Use preestimated length** check box is enabled only if the geometrical object has been selected before hypothesis definition.
156
157 .. image:: ../images/a-maxsize1d.png
158         :align: center
159
160 .. _number_of_segments_anchor:
161
162 Number of Segments hypothesis
163 #############################
164
165 **Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`Automatic Parameters / Default Number of Segments <nb_segments_pref>` preference parameter.
166
167 The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser.
168
169 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
170
171 You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog box:
172
173 .. image:: ../images/a-nbsegments1.png
174         :align: center
175
176 **Equidistant Distribution** - all segments will have the same length, you define only the **Number of Segments**.
177
178 **Scale Distribution** - length of segments gradually changes depending on the **Scale Factor**, which is a ratio of the first segment length to the last segment length.
179
180 Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is L * (1 - A)/(1 - A**N)
181
182 .. image:: ../images/a-nbsegments2.png
183         :align: center
184
185 .. _analyticdensity_anchor:
186
187 **Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the node distribution as blue crosses.
188
189 .. image:: ../images/distributionwithanalyticdensity.png
190         :align: center
191
192 The node distribution is computed so that to have the density function integral on the range between two nodes equal for all segments.
193
194 .. image:: ../images/analyticdensity.png
195         :align: center
196
197 **Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`Distribution with Analytic Density <analyticdensity_anchor>`. You can select the **Conversion mode** from **Exponent** and **Cut negative**.
198
199 .. image:: ../images/distributionwithtabledensity.png
200         :align: center
201
202
203 **See Also** a sample TUI Script of :ref:`Defining Number of Segments <tui_deflection_1d>` hypothesis operation.
204
205 .. note:: The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module).
206
207 .. _start_and_end_length_anchor:
208
209 Start and End Length hypothesis
210 ###############################
211
212 **Start and End Length** hypothesis allows to divide a geometrical edge into segments so that the first and the last segments have a specified length. The length of medium segments changes with automatically chosen geometric progression.
213
214 The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges, for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser.
215
216 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
217
218
219 .. image:: ../images/a-startendlength.png
220         :align: center
221
222 .. image:: ../images/b-art_end_length.png 
223         :align: center
224
225 .. centered::
226          The lengths of the first and the last segment are strictly defined
227
228 **See Also** a sample TUI Script of :ref:`Defining Start and End Length <tui_start_and_end_length>` hypothesis operation.
229
230
231 .. _automatic_length_anchor:
232
233 Automatic Length
234 ################
235
236 The dialog box prompts you to define the quality of the future mesh by only one parameter, which is **Fineness**, ranging from 0 (coarse mesh, low number of segments) to 1 (extremely fine mesh, great number of segments). 
237
238 .. image:: ../images/automaticlength.png
239         :align: center
240
241 Compare one and the same object (sphere) meshed with minimum and maximum value of this parameter.
242
243 .. image:: ../images/image147.gif
244         :align: center
245  
246 .. centered::
247         Example of a rough mesh at Automatic Length Fineness of 0.
248
249 .. image:: ../images/image148.gif
250         :align: center
251  
252 .. centered::
253         Example of a fine mesh at Automatic Length Fineness of 1.
254
255 .. _fixed_points_1d_anchor:
256
257 Fixed Points hypothesis
258 #######################
259
260 **Fixed Points** hypothesis allows splitting edges through a set of points parametrized on the edge (from 1 to 0) and a number of segments for each interval limited by the points.
261
262 .. image:: ../images/hypo_fixedpnt_dlg.png
263         :align: center
264
265 It is possible to check in **Same Nb. Segments for all intervals** option and to define one value for all intervals.
266
267 The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the Object Browser.
268
269 :ref:`Helper <reversed_edges_helper_anchor>`  group assists in defining **Reversed Edges** parameter.
270
271
272 .. image:: ../images/mesh_fixedpnt.png 
273         :align: center
274
275 .. centered::
276         Example of a sub-mesh on the edge built using Fixed Points hypothesis
277
278 **See Also** a sample TUI Script of a :ref:`Defining Fixed Points <tui_fixed_points>` hypothesis operation.
279
280
281 .. _reversed_edges_helper_anchor:
282
283 Reversed Edges Helper
284 #####################
285
286 .. image:: ../images/rev_edges_helper_dlg.png
287         :align: center
288
289 **Helper** group assists in defining **Reversed Edges** parameter of the hypotheses depending on edge direction.
290
291 **Show whole geometry** check-box allows seeing the whole geometrical model in the 3D Viewer, which can help to understand the location of a set of edges within the model.
292
293 **Propagation chains** group allows defining **Reversed Edges** for splitting opposite edges of quadrilateral faces in a logically uniform direction. When this group is activated, the list is filled with propagation chains found within the shape on which a hypothesis is assigned. When a chain is selected in the list its edges are shown in the Viewer with arrows, which enables choosing a common direction for all chain edges. **Reverse** button inverts the common direction of chain edges. **Add** button is active if some edges of a chain have a different direction, so you can click **Add** button to add them to **Reversed Edges** list.
294
295 .. image:: ../images/propagation_chain.png 
296         :align: center
297
298 .. centered::
299         The whole geometry and a propagation chain
300
301 .. note:: Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`definition of a sub-mesh <constructing_submeshes_page>` on one edge of the chain and assigning a :ref:`Propagation <propagation_anchor>` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field.
302
303