Salome HOME
23279: EDF 12978 - Overconstrained faces
[modules/smesh.git] / doc / salome / gui / SMESH / input / cartesian_algo.doc
1 /*!
2
3 \page cartesian_algo_page Body Fitting 3D meshing algorithm
4
5 Body Fitting algorithm generates hexahedrons of a Cartesian grid in
6 the internal part of geometry and polyhedrons and other types of
7 elements at the intersection of Cartesian cells with the geometrical
8 boundary.
9
10 \image html cartesian3D_sphere.png "A sphere meshed by Body Fitting algorithm"
11
12 The meshing algorithm is as follows.
13 <ol>
14 <li> Lines of a Cartesian structured grid defined by
15 \ref cartesian_hyp_anchor "Body Fitting Parameters" hypothesis are
16 intersected with the geometry boundary, thus nodes lying on the
17 boundary are found. This step also allows finding out for each node of
18 the Cartesian grid if it is inside or outside the geometry. </li>
19 <li> For each cell of the grid, check how many of its nodes are outside
20 of the geometry boundary. Depending on a result of this check
21 <ul>
22 <li> skip a cell, if all its nodes are outside </li>
23 <li> skip a cell, if it is too small according to <b> Size
24     Threshold </b> parameter</li>
25 <li> add a hexahedron in the mesh, if all nodes are inside </li>
26 <li> add a polyhedron or another cell type in the mesh, if some
27 nodes are inside and some outside. </li> 
28 </ul>
29 </li>
30 </ol>
31 To apply this algorithm when you define your mesh, select <b>Body
32   Fitting</b> in the list of 3D algorithms and add <b>Body Fitting
33   Parameters</b> hypothesis. The following dialog will appear:
34
35 <br>
36 \anchor cartesian_hyp_anchor
37 <h2>Body Fitting Parameters hypothesis</h2>
38
39 \image html cartesian3D_hyp.png "Body Fitting Parameters hypothesis dialog"
40
41 This dialog allows to define
42 <ul>
43   <li>\b Name of the algorithm. </li>
44   <li> Minimal size of a cell truncated by the geometry boundary. If the
45     size of a truncated grid cell is \b Threshold times less than a
46     initial cell size, then a mesh element is not created. </li>
47   <li> <b> Implement Edges </b> check-box activates incorporation of
48   geometrical edges in the mesh.
49   
50 \image html cartesian_implement_edge.png "Implement Edges switched off to the left and on to the right"
51
52   <li> <b>Definition mode</b> allows choosing how Cartesian structured
53   grid is defined. Location of nodes along each grid axis is defined
54   individually:
55     <ul>
56       <li> You can specify the \b Coordinates of grid nodes. \b Insert button
57         inserts a node at \b Step distance (negative or positive) from the
58         selected node. \b Delete button removes the selected node. Double
59         click on a coordinate in the list enables its edition. 
60         \b Note that node coordinates are measured along directions of
61         axes that can differ from the directions of the Global Coordinate
62         System.</li>
63       <li> You can define the \b Spacing of a grid as an algebraic formula
64         <em>f(t)</em> where \a t is a position along a grid axis
65         normalized at [0.0,1.0]. <em>f(t)</em> must be non-negative
66         at 0. <= \a t <= 1. The whole extent of geometry can be
67         divided into ranges with their own spacing formulas to apply;
68         \a t varies between 0.0 and 1.0 within each \b Range. \b Insert button
69         divides a selected range into two. \b Delete button adds the
70         selected sub-range to the previous one. Double click on a range in
71         the list enables edition of its right boundary. Double click on a
72         function in the list enables its edition.
73     </li> </ul>
74   </li>
75   
76   <li> <b> Fixed Point</b> group allows defining an exact location of
77   a grid node in the direction defined by spacing. The following cases
78   are possible:
79     <ul>
80       <li>If all three directions are defined by spacing, there will
81       be a mesh node at the <b> Fixed Point</b>. </li>
82       <li>If two directions are defined by spacing, there will be at
83       least a link between mesh nodes passing through the <b> Fixed
84       Point</b>.</li> 
85       <li> If only one direction is defined by spacing, there will be
86       at least an element facet passing through the <b> Fixed
87       Point</b>.</li>
88       <li>If no directions are defined by spacing, <b> Fixed Point</b>
89       is disabled.</li>
90     </ul>
91   </li>
92         
93   <li> <b> Directions of Axes</b> group allows setting the directions of grid axes.
94     <ul>
95       <li>If <b> Orthogonal Axes </b> check-box is activated the
96         axes remain orthogonal during their modification. </li>
97       <li> Selection buttons enable snapping corresponding axes to
98         direction of a geometrical edge selected in the Object
99         Browser. Edge direction is defined by coordinates of its end
100         points.</li>
101       <li><b> Optimal Axes</b> button runs an algorithm that tries to
102         set the axes to maximize the number of generated hexahedra.</li>
103       <li><b> Reset </b> button returns the axes in a default position
104       parallel to the axes of the Global Coordinate System.</li> 
105   </ul>
106   </li>
107  </ul>
108
109 <br>
110 <b>See Also</b> a sample TUI Script of a
111 \ref tui_cartesian_algo "Usage of Body Fitting algorithm".
112
113 */