Salome HOME
c5792322192df23ea22bedd91df44993cb8973a2
[modules/smesh.git] / doc / salome / gui / SMESH / input / blsurf_hypo.doc
1 /*!
2
3 \page blsurf_hypo_page BLSURF Parameters hypothesis
4
5 \n BLSURF Parameters hypothesis works only with <b>BLSURF</b> 2d
6 algorithm. This algorithm is a commercial software.
7 \n To get a licence, visit http://www.distene.com/corp/eval-distene.html
8
9 <h1>General parameters</h1>
10
11 \image html blsurf_parameters.png
12
13 <ul>
14 <li><b>Name</b> - allows defining the name of the hypothesis (BLSURF
15 Parameters_n by default).</li>
16
17 <li><b>Physical Mesh</b> - can be set to None, Custom or Size Map
18  <ul>
19   <li>if set to "Custom", allows user input in the
20 in <b>User size</b>, <b>Max Physical Size</b> and <b>Min Physical
21 Size</b> fields.</li>
22   <li>if set to "Size Map", behaves like "Custom" mode and takes into account the custom elements sizes given in the Size Map tab.</li>
23 </ul>
24 </li>
25
26 <li><b>User size</b> - defines the size of the generated mesh elements. </li>
27
28 <li><b>Max Physical Size</b> - defines the upper limit of mesh element size. </li>
29
30 <li><b>Min Physical Size</b> - defines the lower limit of mesh element size. </li>
31
32 <li><b>Geometrical mesh</b> - if set to "Custom", allows user input in
33  <b>Angle Mesh S</b>, <b>Angle Mesh C</b> and
34 <b>Gradation</b> fields. These fields control
35 computation of the element size, so called <i>geometrical size</i>, conform to
36 the surface geometry considering local curvatures. \n
37 If both the <b>User size</b> and the <i>geometrical size</i> are defined, the
38  eventual element size correspond to the least of the two. </li>
39
40 <li><b>Angle Mesh S</b> - maximum angle between the mesh face and the
41 tangent to the geometrical surface at each mesh node, in degrees. </li>
42
43 <li><b>Angle Mesh C</b> - maximum angle between the mesh edge and the
44 tangent to the geometrical curve at each mesh node, in degrees. </li>
45
46 <li><b>Max Geometrical Size</b> - defines the upper limit of the <i>geometrical size</i>.</li>
47
48 <li><b>Min Geometrical Size</b> - defines the lower limit of the <i>geometrical size</i>.</li>
49
50 <li><b>Gradation</b> - maximum ratio between the lengths of
51 two adjacent edges. </li>
52
53 <li><b>Allow Quadrangles</b> - if checked, allows the creation of quadrilateral elements.</li>
54
55 <li><b>Patch independent</b> - if checked, geometrical
56 edges are not respected and all geometrical faces are meshed as one
57 hyper-face.</li>
58
59 <h1>Advanced parameters</h1>
60
61 The notion of <i>diag</i> used in the descriptions means the diagonal of the bounding box of the 
62 geometrical object to mesh.
63
64 \image html blsurf_parameters_advanced.png
65
66 <li><b>Verbosity level</b> - Defines the percentage of "verbosity" of
67 BLSURF [0-100].</li>
68
69 <li><b>Topology</b> - allows creation of a conform mesh on a shell of
70 not sewed faces. 
71 <ul>
72   <li>"From CAD" means that mesh conformity is assured by conformity
73   of a shape.</li>
74   <li>"Pre-process" and "Pre-process++" allow the BLSURF software to
75   pre-process the geometrical model to eventually produce a conform
76   mesh. </li>
77   <li>"PreCAD" is an auxiliary CAD pre-processing module which has 
78   two main goals:
79   <ul>
80     <li> Complete missing or inadequate CAD-description.</li>
81     <li>Perform topology reconstruction and specific geometry 
82     enhancement for mesh generation.</li>
83   </ul>
84   This module requires a specific licence.
85   \n
86   The following PreCAD options are the most significant and important ones:
87   <ul>
88   <li><b>Merge Edges</b> - allows PreCAD to optimize the geometry by merging some
89   edges. Default is 0.</li>
90   <li><b>Remove nano edges</b> - allows PreCAD to optimize the geometry by removing 
91   the nano edges whenever possible. Default is 0.</li>
92   <li><b>Nano edge length</b> - gives the length below which an edge is considered as nano 
93   for the topology processing. See also the \b remove_nano_edges option. If unset, PreCAD
94   default value is \f$\mathrm{diag} \times 10^{-5}\f$.</li>
95   <li><b>Discard input topology</b> - computes the CAD topology from scratch, 
96   without considering the toplogical information contained in the original CAD
97   (Useful for iges files). Default is 0.</li>
98   </ul>
99   </li>
100 </ul>
101
102 <li><b>ExportGMF</b> - saves the computed mesh into a GMF file (.mesh or .meshb).</li>
103
104 <li><b>Add option</b> - provides the choice of multiple PreCAD and BLSURF 
105 advanced options, which appear, if selected, in a table where it is 
106 possible to input the value of the option and to edit it later. The PreCAD 
107 options are prefixed with "PRECAD_".</li>
108
109 <li><b>Clear option</b> - removes the option selected in the table.</li>
110
111 </ul>
112
113 \n
114 The following BLSURF options are commonly usable.
115
116 <ul>
117 <li>\b topo_eps1 (real) - is the tolerance level inside a CAD
118 patch. By default is equal to \f$\mathrm{diag} \times 10^{-4}\f$. This tolerance is used to
119 identify nodes to merge within one geometrical face when \b Topology
120 option is to pre-process.</li>
121
122 <li>\b topo_eps2 (real) - is the tolerance level between two CAD
123 patches. By default is equal to \f$\mathrm{diag} \times 10^{-4}\f$. This tolerance is used to
124 identify nodes to merge over different geometrical faces when
125 \b Topology option is to pre-process.</li>
126
127 <li>\b LSS (real) - is an abbreviation for "length of sub-segment". It is
128 a maximal allowed length of a mesh edge. Default is \f$0.5\f$.</li>
129
130 <li>\b frontal (integer)
131 <ul>
132 <li> 1 - the mesh generator inserts points with an advancing front method.</li>
133 <li> 0 - it inserts them with an algebraic method (on internal edges). This method is
134 slightly faster but generates less regular meshes. </li>
135 </ul>
136 Default is 0.</li>
137
138 \anchor blsurf_hinterpol_flag
139 <li>\b hinterpol_flag (integer) - determines the computation of an
140 interpolated value <i>v</i> between two points <i>P1</i> and <i>P2</i> on a
141 curve. Let <i>h1</i> be the value at point <i>P1,</i> <i>h2</i> be the value at point
142 <i>P2,</i> and <i>t</i> be a parameter varying from 0 to 1 when moving from <i>P1
143 to</i> <i>P2</i>.
144 <ul>
145 <li>0 - the interpolation is linear: \f$v = h1 + t (h2 - h1 )\f$</li>
146 <li>1 - the interpolation is geometric: \f$v = h1 \times \left( \frac{h1}{h2} \right)^{t}\f$</li>
147 <li>2 - the interpolation is sinusoidal: \f$v = \frac{h1+h2}{2} + \frac{h1-h2}{2 \cdot \cos(\pi \cdot t)}\f$</li>
148 </ul>
149 Default is 0.</li>
150
151 \anchor blsurf_hmean_flag
152 <li>\b hmean_flag (integer) - determines the computation of the average of several
153 values:<ul>
154 <li>-1 - the minimum is computed.</li>
155 <li>0 or 2 - the arithmetic average is computed.
156 <li>1 - the geometric average is computed.</li>
157 </ul>
158 Default is 0.</li>
159
160 <li>\b CheckAdjacentEdges, \b CheckCloseEdges and \b CheckWellDefined
161 (integers) - gives the number of calls of equally named subroutines the
162 purpose of which is to improve the mesh of domains having narrow
163 parts. At each iteration,\b CheckCloseEdges decreases the sizes of the
164 edges when two boundary curves are neighboring,\b CheckAdjacentEdges
165 balances the sizes of adjacent edges, and \b CheckWellDefined checks if
166 the parametric domain is well defined. Default values are 0.</li>
167
168
169 <li>\b CoefRectangle (real)- defines the relative thickness of the rectangles
170 used by subroutine \b CheckCloseEdges (see above). Default is 0.25.</li>
171
172 <li>\b eps_collapse (real) - if more than 0.0, BLSURF removes
173 curves whose lengths are less than \b eps_collapse. To obtain an
174 approximate value of the length of a curve, it is arbitrarily
175 split into 20 edges. Default is 0.0.</li>
176
177 <li>\b eps_ends (real) - is used to detect the curves whose lengths are very
178 small, which sometimes constitutes an error. A message is printed
179 if \f$\left|P2-P1\right| < eps\_ends\f$, where <i>P1</i> and <i>P2</i> are the
180 extremities of a curve. Default is \f$\frac{\mathrm{diag}}{500.0}\f$.</li>
181
182 <li>\b prefix (char) - is a prefix of the files generated by
183 BLSURF. Default is "x".</li>
184
185 <li>\b refs (integer) - reference of a surface, used when exporting
186 files. Default is 1.</li>
187 </ul>
188
189 \n
190 The following PreCAD options are commonly usable. 
191 <ul>
192 <li>\b closed_geometry (int) - describes whether the working geometry 
193 should be closed or not. When activated, this option helps PreCAD to treat 
194 the most dirtiest geometries. Default is 0.</li>
195 <li>\b debug (int) - If debug = 1 PreCAD will be very verbose and will output 
196 some intermediate files in the working directory. Default is 0.</li>
197 <li>\b eps_nano_relative (real) -  Same as \b eps_nano but given in relatively to 
198 the diagonal of the box bounding the geometry. Default is \f$10^{-5}\f$.</li>
199 <li>\b eps_sewing (real) - tolerance of the assembly. It rarely requires to be tuned. 
200 Default is \f$\mathrm{diag} \times 5 \cdot 10^{-4}\f$.</li>
201 <li>\b eps_sewing_relative (real) -  Same as \b eps_nano but given in relatively to 
202 the diagonal of the box bounding the geometry. Default is \f$5 \cdot 10^{-4}\f$.</li>
203 <li>\b manifold_geometry (int) - describes whether the working geometry should be manifold or not.
204 When activated, this option helps PreCAD to treat the most dirtiest geometries. Default is 0.</li>
205 <li>\b create_tag_collision (int) - creates some new tags from original ones in case 
206 of collision (entity merge or association for example). Default is 0.</li>
207 <li>\b periodic_tolerance (real) - defines the maximum distance error accepted between 
208 two sets of periodic entities. Default is \f$\mathrm{diag} \times 10^{-5}\f$.</li>
209 <li>\b periodic_tolerance_relative (real) -  Same as \b periodic_tolerance but in relative
210 unit. Default is \f$10^{-5}\f$.</li>
211 <li>\b periodic_split_tolerance (real) - This periodicity processing related option defines 
212 the minimum distance between a CAD point and an imprinted point. It allows to indirectly 
213 control the number of points and small edges created. Default is \f$\mathrm{diag} \times 10^{-4}\f$.</li>
214 <li>\b periodic_split_tolerance_relative (real -  Same as \b periodic_split_tolerance but in
215 relative unit. Default is \f$10^{-4}\f$.</li>
216 </ul>
217
218 \n
219 The following advanced options are not documented and you can use them
220 at your own risk.
221 \n\n Integer variables:
222 <ul>
223 <li>    addsurf_ivertex</li>
224 <li>    background     </li>
225 <li>    coiter         </li>
226 <li>    communication  </li>
227 <li>    decim          </li>
228 <li>    export_flag    </li>
229 <li>    file_h         </li>
230 <li>    gridnu         </li>
231 <li>    gridnv         </li>
232 <li>    intermedfile   </li>
233 <li>    memory         </li>
234 <li>    normals        </li>
235 <li>    optim          </li>
236 <li>    pardom_flag    </li>
237 <li>    pinch          </li>
238 <li>    rigid          </li>
239 <li>    surforient     </li>
240 <li>    tconf          </li>
241 <li>    topo_collapse  </li>
242 </ul>
243 Real variables:
244 <ul>
245 <li>    addsurf_angle  </li>
246 <li>    addsurf_R      </li>
247 <li>    addsurf_H      </li>
248 <li>    addsurf_FG     </li>
249 <li>    addsurf_r      </li>
250 <li>    addsurf_PA     </li>
251 <li>    angle_compcurv </li>
252 <li>    angle_ridge    </li>
253 <li>    eps_pardom     </li>
254 </ul>
255 String variables:
256 <ul>
257 <li>    export_format  </li>
258 <li>    export_option  </li>
259 <li>    import_option  </li>  
260 </ul>
261
262 <h1>Custom size map</h1>
263
264 \image html blsurf_parameters_sizemap1.png 
265
266 User sizes can be defined on faces, edges or vertices.
267 <ul>
268 <li>The faces, edges and vertices can belong to the meshed geometrical
269 object or to its sub-shapes (created using <b>Explode</b> command).</li>
270 <li>Groups of faces, edges and vertices are also handled.</li>
271 <li>It is possible to attribute the same size to several geometries using multi-selection.</li>
272 <li>The sizes are constant values or python functions.</li>
273 <li>In case of a python function, the following rules must be respected:
274 <ul>
275 <li>The name of the function is f.</li>
276 <li>If geometry is a face or a group of faces, the function is f(u,v).</li>
277 <li>If geometry is an edge or a group of edges, the function is f(t).</li>
278 <li>If geometry is a vertex or a group of vertices, the function is f().</li>
279 <li>The function must return a double.</li>
280 </ul></li>
281 </ul>
282
283 \anchor blsurf_sizemap_computation
284 <h2>Computation of the physical size</h2>
285 \n
286 The physical size is obtained by querying sizemap functions associated to the input CAD object for surfaces, curves and points.
287 Each function can either return a value h (which is then trimmed
288 between the two bounds hphymin and hphymax), or "no answer" (by not
289 assigning a value to h), thus providing great flexibility in the
290 specification of the sizes. The computation depends on whether point P is internal to a surface, internal to a curve, or at the end of several curves:
291 <ul>
292 <li> If point P is internal to a surface, the CAD surface size function is queried. If no answer is returned, one interpolates with the values at the vertices of the discretized interface curves.</li>
293 <li> If point P is internal to a curve, the CAD curve size function is queried first. If no answer is returned, the surface size function is queried for every adjacent surface and the mean value of the returned values is computed. If no answer is returned, sizes h1 and h2 at both ends of the curve are considered (see next item) and the interpolated value is computed.</li>
294 <li> If point P is at the extremity of several curves, the CAD point size function is queried first. If no answer is returned, the curve size function is queried for every adjacent curve and the mean value of the returned values is computed. If no answer is returned, the surface size function is queried for every adjacent surface and the mean value of the returned values is computed. If there is still no answer returned, the default value hphydef is kept.</li>
295 </ul>
296 In order to compute the mean of several values, the arithmetic mean is used by default, but this can be modified by the parameter \ref blsurf_hmean_flag "hmean flag". In the same way, in order to interpolate two values, a linear interpolation is used by default, but this can be modified by \ref blsurf_hinterpol_flag "hinterpol flag".
297
298 \anchor blsurf_attractor
299 <h2>Advanced maps</h2>
300 \n
301 \image html blsurf_parameters_sizemap2.png 
302 \n
303 More specific size maps can be defined on faces. 
304
305 <ul>
306 <li> <i> Attractors </i> allow to define the size of the mesh elements
307 on a face so that the mesh is the finest on the attractor shape and
308 becomes coarser when getting far from this shape.
309 <ul> 
310 <li> The selected attractor can be a Vertex, an Edge, a Wire or a
311 Compound mixing several entities of those types.</li>
312 <li> The attractor doesn't have to be a sub-shape of the shape to mesh.</li>
313 <li> The size will grow exponentially (see the formula below) but is
314 bounded by gradation, \n so if you want the formula to be strictly
315 respected, you should set the <i>gradation</i> 
316 to its maximum (2.5) in the <i>arguments</i> tab. 
317 </ul>
318 \n
319 <li> Furthermore you can choose to <i> keep the size constant </i>
320 until a certain distance from a shape. This option can be combined or
321 not with an <i>attractor</i> size map described above. 
322 <ul>
323 <li> If the two options are combined the size will remain constant
324 until the distance specified in "constant over" and grow then as
325 prescribed by the attractor function.</li>
326 <li> Else the growing is only controled by the standard arguments of
327 BLSURF (gradation ...).</li>
328 </ul>
329 </ul>
330
331 \image html blsurf_attractors2.png "Example of mesh created using
332 attractors, the attractors here are the side edges and the size grows
333 from the side of the surface towards the apex"
334 \n
335 \image html blsurf_const_size_near_shape2.png "Example of size map
336 with constant size option, the size is kept constant on the left side
337 of the surface until a certain distance"
338 \n
339 Remark : The validation of the hypothesis might take a few seconds if
340 attractors are defined or the "constant size" option is used because a
341 map of distances has to be built on the whole surface for each face
342 where such a hypothesis has been defined.
343
344 <br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including size map.
345
346 \anchor blsurf_attractor_computation
347 <h2>Computation of attractors</h2>
348 \n
349 The size grows exponentially following the equation : 
350 \f$h(d) = \mathrm{User Size} + (\mathrm{h\_start} - \mathrm{User Size}) \times e ^ { - \left( \frac{d}{R} \right) ^ {2} }\f$
351 \n
352 Where :
353 <ul>
354 <li>h_start is the desired size on the given attractor shape</li>
355 <li>d is the distance of the current point from the attractor
356 shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed) </li>
357 <li>R is called the distance of influence and allows controlling the growth rate of the mesh </li>
358 </ul>
359
360 <h1>Custom enforced vertices</h1>
361
362 \image html blsurf_parameters_enforced_vertices.png
363
364 It is possible to define some enforced vertices to BLSurf algorithm
365 without creating any vertices by CAD algorithms.
366 <ul>
367 <li>The enforced vertex is the projection of a point defined by its
368 (x,y,z) coordinates on the selected face.</li>
369 <li>It is possible to define several enforced vertices on a face or a group of faces.</li>
370 <li>If the projected point is on the boundary or outside of the face, it will be ignored.</li>
371 </ul>
372
373 <br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including enforced vertices.
374
375 <h1>Limitations</h1>
376
377 Currently BLSURF plugin has the following limitations.
378 <ul>
379   <li>BLSURF algorithm cannot be used as a local algorithm (on
380       sub-meshes) or as a provider of a low-level
381       mesh for some 3D algorithms, because the BLSURF mesher (and
382       consequently plugin) does not provide the information on node
383       parameters on edges (U) and faces (U,V). For example the
384       following combinations of algorithms are impossible:
385       <ul>
386         <li> global MEFISTO or Quadrangle(mapping) + local BLSURF;</li>
387         <li> BLSURF + Projection 2D from faces meshed by BLSURF;</li>
388         <li> local BLSURF + Extrusion 3D;</li>
389       </ul>
390   </li>
391 </ul>
392
393 */