Salome HOME
Merge from V5_1_3_BR branch (07/12/09)
[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
8 <h1>General parameters</h1>
9
10 \image html blsurf_parameters.png
11
12 <ul>
13 <li><b>Name</b> - allows defining the name of the hypothesis (BLSURF
14 Parameters_n by default).</li>
15
16 <li><b>Physical Mesh</b> - can be set to None, Custom or Size Map
17  <ul>
18   <li>if set to "Custom", allows user input in the
19 in <b>User size</b>, <b>Max Physical Size</b> and <b>Min Physical
20 Size</b> fields.</li>
21   <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>
22 </ul>
23 </li>
24
25 <li><b>User size</b> - defines the size of the generated mesh elements. </li>
26
27 <li><b>Max Physical Size</b> - defines the upper limit of mesh element size. </li>
28
29 <li><b>Min Physical Size</b> - defines the lower limit of mesh element size. </li>
30
31 <li><b>Geometrical mesh</b> - if set to "Custom", allows user input in
32  <b>Angle Mesh S</b>, <b>Angle Mesh C</b> and
33 <b>Gradation</b> fields. These fields control
34 computation of the element size, so called <i>geometrical size</i>, conform to
35 the surface geometry considering local curvatures. \n
36 If both the <b>User size</b> and the <i>geometrical size</i> are defined, the
37  eventual element size correspond to the least of the two. </li>
38
39 <li><b>Angle Mesh S</b> - maximum angle between the mesh face and the
40 tangent to the geometrical surface at each mesh node, in degrees. </li>
41
42 <li><b>Angle Mesh C</b> - maximum angle between the mesh edge and the
43 tangent to the geometrical curve at each mesh node, in degrees. </li>
44
45 <li><b>Max Geometrical Size</b> - defines the upper limit of the <i>geometrical size</i>.</li>
46
47 <li><b>Min Geometrical Size</b> - defines the lower limit of the <i>geometrical size</i>.</li>
48
49 <li><b>Gradation</b> - maximum ratio between the lengths of
50 two adjacent edges. </li>
51
52 <li><b>Allow Quadrangles</b> - if checked, allows the creation of quadrilateral elements.</li>
53
54 <li><b>Patch independent</b> - if checked, geometrical
55 edges are not respected and all geometrical faces are meshed as one
56 hyper-face.</li>
57
58 <h1>Advanced parameters</h1>
59
60 \image html blsurf_parameters_advanced.png
61
62 <li><b>Topology</b> - allows creation of a conform mesh on a shell of
63 not sewed faces. 
64 <ul>
65   <li>"From CAD" means that mesh conformity is assured by conformity
66   of a shape.</li>
67   <li>"Pre-process" and "Pre-process++" allow the BLSURF software to
68   pre-process the geometrical model to eventually produce a conform
69   mesh. </li>
70 </ul>
71
72 <li><b>Verbosity level</b> - Defines the percentage of "verbosity" of
73 BLSURF [0-100].</li>
74
75 <li><b>Add option</b> - provides the choice of multiple advanced
76 options, which appear, if selected, in a table where it is possible to
77 input the value of the option and to edit it later.</li>
78
79 <li><b>Clear option</b> - removes the option selected in the table.
80
81 </ul>
82
83 \n
84 The following options are commonly usable. The notion of <i>diag</i>
85 used in the descriptions means
86 the diagonal of the bounding box of the geometrical object to mesh.
87
88 <ul>
89 <li><b>topo_eps1</b> (real) - is the tolerance level inside a CAD
90 patch. By default is equal to <i>diag</i> � 10-4. This tolerance is used to
91 identify nodes to merge within one geometrical face when \b Topology
92 option is to pre-process. Default is <i>diag</i>/10.0.</li>
93
94 <li><b>topo_eps2</b> (real) - is the tolerance level between two CAD
95 patches. By default is equal to <i>diag</i> � 10-4. This tolerance is used to
96 identify nodes to merge over different geometrical faces when
97 \b Topology option is to pre-process. Default is <i>diag</i>/10.0.</li>
98
99 <li>\b LSS (real) - is an abbreviation for "length of sub-segment". It is
100 a maximal allowed length of a mesh edge. Default is 0.5.</li>
101
102 <li>\b frontal (integer)
103 <ul>
104 <li> 1 - the mesh generator inserts points with an advancing front method.</li>
105 <li> 0 - it inserts them with an algebraic method (on internal edges). This method is
106 slightly faster but generates less regular meshes. </li>
107 </ul>
108 Default is 0.</li>
109
110 \anchor blsurf_hinterpol_flag
111 <li>\b hinterpol_flag (integer) - determines the computation of an
112 interpolated value <i>v</i> between two points <i>P1</i> and <i>P2</i> on a
113 curve. Let <i>h1</i> be the value at point <i>P1,</i> <i>h2</i> be the value at point
114 <i>P2,</i> and <i>t</i> be a parameter varying from 0 to 1 when moving from <i>P1
115 to</i> <i>P2</i> . 
116 <ul>
117 <li>0 - the interpolation is linear: <i>v = h1 + t (h2 - h1 )</i></li>
118 <li>1 - the interpolation is geometric: <i>v = h1 * pow( h2/h1, t)</i></li>
119 <li>2 - the interpolation is sinusoidal: <i>v = (h1+h2)/2 +
120 (h1-h2)/2*cos(PI*t)</i></li>
121 </ul>
122 Default is 0.</li>
123
124 \anchor blsurf_hmean_flag
125 <li>\b hmean_flag (integer) - determines the computation of the average of several
126 values:<ul>
127 <li>-1 - the minimum is computed.</li>
128 <li>0 or 2 - the arithmetic average computed.
129 <li>1 - the geometric average is computed.</li>
130 </ul>
131 Default is 0.</li>
132
133 <li>\b CheckAdjacentEdges, \b CheckCloseEdges and \b CheckWellDefined
134 (integers) - gives the number of calls of equally named subroutines the
135 purpose of which is to improve the mesh of domains having narrow
136 parts. At each iteration,\b CheckCloseEdges decreases the sizes of the
137 edges when two boundary curves are neighboring,\b CheckAdjacentEdges
138 balances the sizes of adjacent edges, and \b CheckWellDefined checks if
139 the parametric domain is well defined. Default values are 0.</li>
140
141
142 <li>\b CoefRectangle (real)- defines the relative thickness of the rectangles
143 used by subroutine \b CheckCloseEdges (see above). Default is 0.25.</li>
144
145 <li>\b eps_collapse (real) - if more than 0.0, BLSURF removes
146 curves whose lengths are less than \b eps_collapse. To obtain an
147 approximate value of the length of a curve, it is arbitrarily
148 split into 20 edges. Default is 0.0.</li>
149
150 <li>\b eps_ends (real) - is used to detect the curves whose lengths are very
151 small, which sometimes constitutes an error. A message is printed
152 if<i> fabs(P2-P1) < eps_ends</i>, where <i>P1</i> and <i>P2</i> are the
153 extremities of a curve. Default is <i>diag</i>/500.0.</li>
154
155 <li>\b prefix (char) - is a prefix of the files generated by
156 BLSURF. Default is "x".</li>
157
158 <li>\b refs (integer) - reference of a surface, used when exporting
159 files. Default is 1.</li>
160 </ul>
161
162 \n
163 The following advanced options are not documented and you can use them
164 at your own risk.
165 \n\n Integer variables:
166 <ul>
167 <li>    addsurf_ivertex</li>
168 <li>    background     </li>
169 <li>    coiter         </li>
170 <li>    communication  </li>
171 <li>    decim          </li>
172 <li>    export_flag    </li>
173 <li>    file_h         </li>
174 <li>    gridnu         </li>
175 <li>    gridnv         </li>
176 <li>    intermedfile   </li>
177 <li>    memory         </li>
178 <li>    normals        </li>
179 <li>    optim          </li>
180 <li>    pardom_flag    </li>
181 <li>    pinch          </li>
182 <li>    rigid          </li>
183 <li>    surforient     </li>
184 <li>    tconf          </li>
185 <li>    topo_collapse  </li>
186 </ul>
187 Real variables:
188 <ul>
189 <li>    addsurf_angle  </li>
190 <li>    addsurf_R      </li>
191 <li>    addsurf_H      </li>
192 <li>    addsurf_FG     </li>
193 <li>    addsurf_r      </li>
194 <li>    addsurf_PA     </li>
195 <li>    angle_compcurv </li>
196 <li>    angle_ridge    </li>
197 <li>    eps_pardom     </li>
198 </ul>
199 String variables:
200 <ul>
201 <li>    export_format  </li>
202 <li>    export_option  </li>
203 <li>    import_option  </li>  
204 </ul>
205
206 <h1>Custom size map</h1>
207
208 \image html blsurf_parameters_sizemap.png
209
210 User sizes can be defined on faces, edges or vertices.
211 <ul>
212 <li>The faces, edges and vertices can belong to the meshed geometrical
213 object or to its sub-shapes (created using <b>Explode</b> command).</li>
214 <li>Groups of faces, edges and vertices are also handled.</li>
215 <li>It is possible to attribute the same size to several geometries using multi-selection.</li>
216 <li>The sizes are constant values or python functions.</li>
217 <li>In case of a python function, the following rules must be respected:
218 <ul>
219 <li>The name of the function is f.</li>
220 <li>If geometry is a face or a group of faces, the function is f(u,v).</li>
221 <li>If geometry is an edge or a group of edges, the function is f(t).</li>
222 <li>If geometry is a vertex or a group of vertices, the function is f().</li>
223 <li>The function must return a double.</li>
224 </ul></li>
225 </ul>
226
227 <br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including size map.
228
229 \anchor blsurf_sizemap_computation
230 <h2>Computation of the physical size</h2>
231 \n
232 The physical size is obtained by querying sizemap functions associated to the input CAD object for surfaces, curves and points.
233 Each function can either return a value h (which is then trimmed
234 between the two bounds hphymin and hphymax), or "no answer" (by not
235 assigning a value to h), thus providing great flexibility in the
236 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:
237 <ul>
238 <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>
239 <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>
240 <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>
241 </ul>
242 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".
243
244
245 <h1>Custom enforced vertices</h1>
246
247 \image html blsurf_parameters_enforced_vertices.png
248
249 It is possible to define some enforced vertices to BLSurf algorithm
250 without creating any vertices by CAD algorithms.
251 <ul>
252 <li>The enforced vertex is the projection of a point defined by its
253 (x,y,z) coordinates on the selected face.</li>
254 <li>It is possible to define several enforced vertices on a face or a group of faces.</li>
255 <li>If the projected point is on the boundary or outside of the face, it will be ignored.</li>
256 </ul>
257
258 <br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including enforced vertices.
259
260 <h1>Limitations</h1>
261
262 Currently BLSURF plugin has the following limitations.
263 <ul>
264   <li>The created mesh will contain inverted elements if it is based on a shape,
265       consisting of more than one face (box, cone, torus...) and if
266       the option "Allow Quadrangles (Test)" has been checked before
267       computation.</li>
268
269   <li>SIGFPE exception is raised at the attempt to compute the mesh
270       based on a box when the option "Patch independent" is checked.</li>
271
272   <li>BLSURF algorithm cannot be used as a local algorithm (on
273       sub-meshes) or as a provider of a low-level
274       mesh for some 3D algorithms, because the BLSURF mesher (and
275       consequently plugin) does not provide the information on node
276       parameters on edges (U) and faces (U,V). For example the
277       following combinations of algorithms are impossible:
278       <ul>
279         <li> global MEFISTO or Quadrangle(mapping) + local BLSURF;</li>
280         <li> BLSUFR + Projection 2D from faces meshed by BLSURF;</li>
281         <li> local BLSURF + Extrusion 3D;</li>
282       </ul>
283       </li>
284 </ul>
285
286 */