1 .. _tui_modifying_meshes_page:
7 .. contents:: `Table of contents`
10 .. _tui_adding_nodes_and_elements:
12 Adding Nodes and Elements
13 =========================
20 .. literalinclude:: ../../examples/modifying_meshes_ex01.py
23 :download:`Download this script <../../examples/modifying_meshes_ex01.py>`
25 .. _tui_add_0DElement:
30 .. literalinclude:: ../../examples/modifying_meshes_ex02.py
33 :download:`Download this script <../../examples/modifying_meshes_ex02.py>`
35 .. _tui_add_0DElement_on_all_nodes:
37 Add 0D Element on Element Nodes
38 *******************************
40 .. literalinclude:: ../../examples/modifying_meshes_ex03.py
43 :download:`Download this script <../../examples/modifying_meshes_ex03.py>`
50 .. literalinclude:: ../../examples/modifying_meshes_ex04.py
53 :download:`Download this script <../../examples/modifying_meshes_ex04.py>`
60 .. literalinclude:: ../../examples/modifying_meshes_ex05.py
63 :download:`Download this script <../../examples/modifying_meshes_ex05.py>`
65 .. _tui_add_quadrangle:
70 .. literalinclude:: ../../examples/modifying_meshes_ex06.py
73 :download:`Download this script <../../examples/modifying_meshes_ex06.py>`
75 .. _tui_add_tetrahedron:
80 .. literalinclude:: ../../examples/modifying_meshes_ex07.py
83 :download:`Download this script <../../examples/modifying_meshes_ex07.py>`
85 .. _tui_add_hexahedron:
90 .. literalinclude:: ../../examples/modifying_meshes_ex08.py
93 :download:`Download this script <../../examples/modifying_meshes_ex08.py>`
100 .. literalinclude:: ../../examples/modifying_meshes_ex09.py
103 :download:`Download this script <../../examples/modifying_meshes_ex09.py>`
105 .. _tui_add_polyhedron:
110 .. literalinclude:: ../../examples/modifying_meshes_ex10.py
113 :download:`Download this script <../../examples/modifying_meshes_ex10.py>`
115 .. _tui_removing_nodes_and_elements:
117 Removing Nodes and Elements
118 ===========================
120 .. _tui_removing_nodes:
125 .. literalinclude:: ../../examples/modifying_meshes_ex11.py
128 :download:`Download this script <../../examples/modifying_meshes_ex11.py>`
130 .. _tui_removing_elements:
135 .. literalinclude:: ../../examples/modifying_meshes_ex12.py
138 :download:`Download this script <../../examples/modifying_meshes_ex12.py>`
140 .. _tui_removing_orphan_nodes:
142 Removing Orphan Nodes
143 *********************
145 .. literalinclude:: ../../examples/modifying_meshes_ex13.py
148 :download:`Download this script <../../examples/modifying_meshes_ex13.py>`
150 .. _tui_moving_nodes:
155 .. literalinclude:: ../../examples/modifying_meshes_ex15.py
158 :download:`Download this script <../../examples/modifying_meshes_ex15.py>`
160 .. _tui_diagonal_inversion:
165 .. literalinclude:: ../../examples/modifying_meshes_ex16.py
168 :download:`Download this script <../../examples/modifying_meshes_ex16.py>`
170 .. _tui_uniting_two_triangles:
172 Uniting two Triangles
173 =====================
175 .. literalinclude:: ../../examples/modifying_meshes_ex17.py
178 :download:`Download this script <../../examples/modifying_meshes_ex17.py>`
180 .. _tui_uniting_set_of_triangles:
182 Uniting a Set of Triangles
183 ==========================
185 .. literalinclude:: ../../examples/modifying_meshes_ex18.py
188 :download:`Download this script <../../examples/modifying_meshes_ex18.py>`
195 .. literalinclude:: ../../examples/modifying_meshes_ex19.py
198 :download:`Download this script <../../examples/modifying_meshes_ex19.py>`
200 .. _tui_cutting_quadrangles:
205 .. literalinclude:: ../../examples/modifying_meshes_ex20.py
208 :download:`Download this script <../../examples/modifying_meshes_ex20.py>`
210 .. _tui_cutting_triangles:
215 .. literalinclude:: ../../examples/modifying_meshes_cut_triangles.py
218 :download:`Download this script <../../examples/modifying_meshes_cut_triangles.py>`
220 .. _modifying_meshes_split_vol:
222 Split Volumes into Tetrahedra
223 =============================
225 .. literalinclude:: ../../examples/modifying_meshes_split_vol.py
228 :download:`Download this script <../../examples/modifying_meshes_split_vol.py>`
235 .. literalinclude:: ../../examples/modifying_meshes_ex21.py
238 :download:`Download this script <../../examples/modifying_meshes_ex21.py>`
245 .. literalinclude:: ../../examples/modifying_meshes_ex22.py
248 :download:`Download this script <../../examples/modifying_meshes_ex22.py>`
250 .. _tui_extrusion_along_path:
252 Extrusion along a Path
253 ======================
255 .. literalinclude:: ../../examples/modifying_meshes_ex23.py
258 :download:`Download this script <../../examples/modifying_meshes_ex23.py>`
265 .. literalinclude:: ../../examples/modifying_meshes_ex24.py
268 :download:`Download this script <../../examples/modifying_meshes_ex24.py>`
270 .. _tui_pattern_mapping:
275 .. literalinclude:: ../../examples/modifying_meshes_ex25.py
278 :download:`Download this script <../../examples/modifying_meshes_ex25.py>`
282 Convert mesh to/from quadratic
283 ==============================
285 .. literalinclude:: ../../examples/modifying_meshes_ex26.py
288 :download:`Download this script <../../examples/modifying_meshes_ex26.py>`
290 .. _tui_split_biquad:
292 Split bi-quadratic into linear
293 ==============================
295 .. literalinclude:: ../../examples/split_biquad.py
298 :download:`Download this script <../../examples/split_biquad.py>`
300 .. _tui_double_nodes_on_group_boundaries:
302 Double nodes on groups boundaries
303 =================================
305 Double nodes on shared faces between groups of volumes and create flat elements on demand.
307 The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups.
309 The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements.
311 Triangles are transformed into prisms, and quadrangles into hexahedrons.
313 The flat elements are stored in groups of volumes.
315 These groups are named according to the position of the group in the list:
316 the group j_n_p is the group of the flat elements that are built between the group \#n and the group \#p in the list.
317 If there is no shared faces between the group \#n and the group \#p in the list, the group j_n_p is not created.
318 All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
319 The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
321 This example represents an iron cable (a thin cylinder) in a concrete block (a big cylinder).
322 The big cylinder is defined by two geometric volumes.
324 .. literalinclude:: ../../examples/generate_flat_elements.py
327 :download:`Download this script <../../examples/generate_flat_elements.py>`
329 Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
330 The flat elements on group boundaries and on faces are built with the
331 2 last lines of the code above.
333 If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1,
334 the flat elements are built, otherwise, there is only a duplication of the nodes.
336 To observe flat element groups, save the resulting mesh on a MED file and reload it.