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
24 :download:`Download this script <../../../examples/modifying_meshes_ex01.py>`
26 .. _tui_add_0DElement:
31 .. literalinclude:: ../../../examples/modifying_meshes_ex02.py
35 :download:`Download this script <../../../examples/modifying_meshes_ex02.py>`
37 .. _tui_add_0DElement_on_all_nodes:
39 Add 0D Element on Element Nodes
40 *******************************
42 .. literalinclude:: ../../../examples/modifying_meshes_ex03.py
46 :download:`Download this script <../../../examples/modifying_meshes_ex03.py>`
53 .. literalinclude:: ../../../examples/modifying_meshes_ex04.py
57 :download:`Download this script <../../../examples/modifying_meshes_ex04.py>`
64 .. literalinclude:: ../../../examples/modifying_meshes_ex05.py
68 :download:`Download this script <../../../examples/modifying_meshes_ex05.py>`
70 .. _tui_add_quadrangle:
75 .. literalinclude:: ../../../examples/modifying_meshes_ex06.py
79 :download:`Download this script <../../../examples/modifying_meshes_ex06.py>`
81 .. _tui_add_tetrahedron:
86 .. literalinclude:: ../../../examples/modifying_meshes_ex07.py
90 :download:`Download this script <../../../examples/modifying_meshes_ex07.py>`
92 .. _tui_add_hexahedron:
97 .. literalinclude:: ../../../examples/modifying_meshes_ex08.py
101 :download:`Download this script <../../../examples/modifying_meshes_ex08.py>`
108 .. literalinclude:: ../../../examples/modifying_meshes_ex09.py
112 :download:`Download this script <../../../examples/modifying_meshes_ex09.py>`
114 .. _tui_add_polyhedron:
119 .. literalinclude:: ../../../examples/modifying_meshes_ex10.py
123 :download:`Download this script <../../../examples/modifying_meshes_ex10.py>`
125 .. _tui_removing_nodes_and_elements:
127 Removing Nodes and Elements
128 ===========================
130 .. _tui_removing_nodes:
135 .. literalinclude:: ../../../examples/modifying_meshes_ex11.py
139 :download:`Download this script <../../../examples/modifying_meshes_ex11.py>`
141 .. _tui_removing_elements:
146 .. literalinclude:: ../../../examples/modifying_meshes_ex12.py
150 :download:`Download this script <../../../examples/modifying_meshes_ex12.py>`
152 .. _tui_removing_orphan_nodes:
154 Removing Orphan Nodes
155 *********************
157 .. literalinclude:: ../../../examples/modifying_meshes_ex13.py
161 :download:`Download this script <../../../examples/modifying_meshes_ex13.py>`
163 .. _tui_moving_nodes:
168 .. literalinclude:: ../../../examples/modifying_meshes_ex15.py
172 :download:`Download this script <../../../examples/modifying_meshes_ex15.py>`
174 .. _tui_diagonal_inversion:
179 .. literalinclude:: ../../../examples/modifying_meshes_ex16.py
183 :download:`Download this script <../../../examples/modifying_meshes_ex16.py>`
185 .. _tui_uniting_two_triangles:
187 Uniting two Triangles
188 =====================
190 .. literalinclude:: ../../../examples/modifying_meshes_ex17.py
194 :download:`Download this script <../../../examples/modifying_meshes_ex17.py>`
196 .. _tui_uniting_set_of_triangles:
198 Uniting a Set of Triangles
199 ==========================
201 .. literalinclude:: ../../../examples/modifying_meshes_ex18.py
205 :download:`Download this script <../../../examples/modifying_meshes_ex18.py>`
212 .. literalinclude:: ../../../examples/modifying_meshes_ex19.py
216 :download:`Download this script <../../../examples/modifying_meshes_ex19.py>`
218 .. _tui_cutting_quadrangles:
223 .. literalinclude:: ../../../examples/modifying_meshes_ex20.py
227 :download:`Download this script <../../../examples/modifying_meshes_ex20.py>`
229 .. _modifying_meshes_split_vol:
231 Split Volumes into Tetrahedra
232 =============================
234 .. literalinclude:: ../../../examples/modifying_meshes_split_vol.py
238 :download:`Download this script <../../../examples/modifying_meshes_split_vol.py>`
245 .. literalinclude:: ../../../examples/modifying_meshes_ex21.py
249 :download:`Download this script <../../../examples/modifying_meshes_ex21.py>`
256 .. literalinclude:: ../../../examples/modifying_meshes_ex22.py
260 :download:`Download this script <../../../examples/modifying_meshes_ex22.py>`
262 .. _tui_extrusion_along_path:
264 Extrusion along a Path
265 ======================
267 .. literalinclude:: ../../../examples/modifying_meshes_ex23.py
271 :download:`Download this script <../../../examples/modifying_meshes_ex23.py>`
278 .. literalinclude:: ../../../examples/modifying_meshes_ex24.py
282 :download:`Download this script <../../../examples/modifying_meshes_ex24.py>`
284 .. _tui_pattern_mapping:
289 .. literalinclude:: ../../../examples/modifying_meshes_ex25.py
293 :download:`Download this script <../../../examples/modifying_meshes_ex25.py>`
297 Convert mesh to/from quadratic
298 ==============================
300 .. literalinclude:: ../../../examples/modifying_meshes_ex26.py
304 :download:`Download this script <../../../examples/modifying_meshes_ex26.py>`
306 .. _tui_split_biquad:
308 Split bi-quadratic into linear
309 ==============================
311 .. literalinclude:: ../../../examples/split_biquad.py
315 :download:`Download this script <../../../examples/split_biquad.py>`
317 .. _tui_double_nodes_on_group_boundaries:
319 Double nodes on groups boundaries
320 =================================
322 Double nodes on shared faces between groups of volumes and create flat elements on demand.
324 The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups.
326 The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements.
328 Triangles are transformed into prisms, and quadrangles into hexahedrons.
330 The flat elements are stored in groups of volumes.
332 These groups are named according to the position of the group in the list:
333 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.
334 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.
335 All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
336 The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
338 This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder).
339 The big cylinder is defined by two geometric volumes.
341 .. literalinclude:: ../../../examples/generate_flat_elements.py
345 :download:`Download this script <../../../examples/generate_flat_elements.py>`
347 Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
348 The flat elements on group boundaries and on faces are built with the
349 2 last lines of the code above.
351 If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1,
352 the flat elements are built, otherwise, there is only a duplication of the nodes.
354 To observe flat element groups, save the resulting mesh on a MED file and reload it.