Salome HOME
Increment version: 9.4.0
[modules/hexablock.git] / doc / tui_elements.rst
1 :tocdepth: 3
2
3
4 .. _tuielements:
5
6 ========
7 Elements
8 ========
9
10 You must be careful with the signification of the word "element", when it is used with singular or plural form : 
11
12   - The class "Element" is a basic class. The classes Vertex, Edge, Quad an Hexa inherit from the Element Class. This class is used to call common function like getName(), setName() ...
13
14   - The class "Elements" (plural) represents a set of Elements (vertices, edges, quads an hexaedras). This class is used to implements grids or result of ome complex operations (join, prism, ...)
15
16
17 .. _tuielement:
18
19 Element
20 =======
21
22
23 Set a name of an element::
24
25         elt.setName(name)
26         
27 Get a name of an element::
28
29         elt.getName()
30         
31 Print the name of an element::
32
33         elt.printName()
34         
35 Dump an element::
36
37         elt.dump()
38         
39
40 .. _tuielements2:
41
42 Elements
43 ========
44
45 Remove a set of elements from a document::
46
47         doc.removeElements(elts)
48
49 Number of vertices in a set of elements::
50
51         nb_vertices = elts.countVertex()
52         
53 Number of edges in a set of elements::
54
55         nb_edges = elts.countEdge()
56         
57 Number of quads in a set of elements::
58
59         nb_quads = elts.countQuad()
60         
61 Number of hexahedrons in a set of elements::
62
63         nb_hexas = elts.countHexa()
64         
65 Get the vertex number *i*::
66
67         vertex_i = elts.getVertex(i)
68         
69 Get the edge number *i*::
70
71         edge_i = elts.getEdge(i)
72         
73 Get the quad number *i*::
74
75         quad_i = elts.getQuad(i)
76         
77 Get the hexahedron number *i*::
78
79         hexa_i = elts.getHexa(i)
80         
81 Specialized access to all vertices of a set of elements::
82
83     ve_xyz = elts.getVertexIJK(i, j, k)
84
85 with:
86      0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk+1
87
88 Specialized access to all edges // Vx axis::
89
90     ed_a = elts.getEdgeI(i, j, k)
91     
92 with:
93      0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk+1
94
95 Specialized access to all edges // Vy axis::
96
97     ed_b = elts.getEdgeJ(i, j, k)
98     
99 with:
100      0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk+1
101
102 Specialized access to all edges // Vz axis::
103
104     ed_c = elts.getEdgeK(i, j, k)
105     
106 with:
107      0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk
108
109 Specialized access to all quadrangles // on plane Vx, Vy::
110
111     qu_a = elts.getQuadIJ(i, j, k)
112
113 with:
114      0 <= i < ni, 0 <= j < nj, 0 <= k < nk+1
115
116 Specialized access to all quadrangles // on plane Vx, Vz::
117
118     qu_b = elts.getQuadIK(i, j, k)
119     
120 with:
121      0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk
122
123 Specialized access to all quadrangles // on plane Vy, Vz::
124
125     qu_c = elts.getQuadJK(i, j, k)
126     
127 with:
128      0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk
129
130 Specialized access to all hexahedra::
131
132     he_xyz = elts.getHexaIJK(i, j, k)
133     
134 with:
135      0 <= i < ni, 0 <= j < nj, 0 <= k < nk
136
137
138 .. _tuicrosselements:
139
140
141 Cross Elements
142 ==============
143
144 *CrossElements* inherits *Elements*. So you have all *Elements* functions available to *CrossElements*,
145 plus the following functions:
146
147
148 *part* argument specifies the block of the *cross elements* where to search the vertex, the edge, the quad or the hexa.
149
150 Specialized access to all vertices of a set of elements::
151
152     ve_xyz = elts.getVertexIJK(part, i, j, k)
153
154 with:
155      0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk+1
156      
157
158 Specialized access to all edges // Vx axis::
159
160     ed_a = elts.getEdgeI(part, i, j, k)
161     
162 with:
163      0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk+1
164
165
166 Specialized access to all edges // Vy axis::
167
168     ed_b = elts.getEdgeJ(part, i, j, k)
169     
170 with:
171      0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk+1
172
173
174 Specialized access to all edges // Vz axis::
175
176     ed_c = elts.getEdgeK(part, i, j, k)
177     
178 with:
179      0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk
180
181
182 Specialized access to all quadrangles // on plane Vx, Vy::
183
184     qu_a = elts.getQuadIJ(part, i, j, k)
185
186 with:
187      0 <= i < ni, 0 <= j < nj, 0 <= k < nk+1
188
189
190 Specialized access to all quadrangles // on plane Vx, Vz::
191
192     qu_b = elts.getQuadIK(part, i, j, k)
193     
194 with:
195      0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk
196
197
198 Specialized access to all quadrangles // on plane Vy, Vz::
199
200     qu_c = elts.getQuadJK(part, i, j, k)
201     
202 with:
203      0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk
204
205
206 Specialized access to all hexahedra::
207
208     he_xyz = elts.getHexaIJK(part, i, j, k)
209     
210 with:
211      0 <= i < ni, 0 <= j < nj, 0 <= k < nk
212
213