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 .. _modifying_meshes_split_vol:
212 Split Volumes into Tetrahedra
213 =============================
215 .. literalinclude:: ../../../examples/modifying_meshes_split_vol.py
218 :download:`Download this script <../../../examples/modifying_meshes_split_vol.py>`
225 .. literalinclude:: ../../../examples/modifying_meshes_ex21.py
228 :download:`Download this script <../../../examples/modifying_meshes_ex21.py>`
235 .. literalinclude:: ../../../examples/modifying_meshes_ex22.py
238 :download:`Download this script <../../../examples/modifying_meshes_ex22.py>`
240 .. _tui_extrusion_along_path:
242 Extrusion along a Path
243 ======================
245 .. literalinclude:: ../../../examples/modifying_meshes_ex23.py
248 :download:`Download this script <../../../examples/modifying_meshes_ex23.py>`
255 .. literalinclude:: ../../../examples/modifying_meshes_ex24.py
258 :download:`Download this script <../../../examples/modifying_meshes_ex24.py>`
260 .. _tui_pattern_mapping:
265 .. literalinclude:: ../../../examples/modifying_meshes_ex25.py
268 :download:`Download this script <../../../examples/modifying_meshes_ex25.py>`
272 Convert mesh to/from quadratic
273 ==============================
275 .. literalinclude:: ../../../examples/modifying_meshes_ex26.py
278 :download:`Download this script <../../../examples/modifying_meshes_ex26.py>`
280 .. _tui_split_biquad:
282 Split bi-quadratic into linear
283 ==============================
285 .. literalinclude:: ../../../examples/split_biquad.py
288 :download:`Download this script <../../../examples/split_biquad.py>`
290 .. _tui_double_nodes_on_group_boundaries:
292 Double nodes on groups boundaries
293 =================================
295 Double nodes on shared faces between groups of volumes and create flat elements on demand.
297 The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups.
299 The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements.
301 Triangles are transformed into prisms, and quadrangles into hexahedrons.
303 The flat elements are stored in groups of volumes.
305 These groups are named according to the position of the group in the list:
306 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.
307 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.
308 All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
309 The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
311 This example represents an iron cable (a thin cylinder) in a concrete block (a big cylinder).
312 The big cylinder is defined by two geometric volumes.
314 .. literalinclude:: ../../../examples/generate_flat_elements.py
317 :download:`Download this script <../../../examples/generate_flat_elements.py>`
319 Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
320 The flat elements on group boundaries and on faces are built with the
321 2 last lines of the code above.
323 If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1,
324 the flat elements are built, otherwise, there is only a duplication of the nodes.
326 To observe flat element groups, save the resulting mesh on a MED file and reload it.