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