Salome HOME
Fix Redesign of SMESH documentation
[modules/smesh.git] / doc / salome / gui / SMESH / input / prism_3d_algo.rst
1 .. _prism_3d_algo_page:
2
3 ******************************
4 Extrusion 3D meshing algorithm
5 ******************************
6
7 Extrusion 3D algorithm can be used for meshing prisms, i.e. 3D shapes
8 defined by two opposing faces having the same number of vertices and
9 edges. These two faces should be connected by quadrangle "side" faces.
10
11 .. image:: ../images/prism_mesh.png 
12         :align: center
13
14 .. centered::
15         Clipping view of a mesh of a prism with non-planar base and top faces
16
17 The prism is allowed to have sides composed of several faces. (A prism
18 side is a row of faces (or one face) connecting the corresponding edges of
19 the top and base faces). However, a prism 
20 side can be split only vertically as indicated in the
21 picture below. 
22
23 .. image:: ../images/prism_ok_ko.png 
24         :align: center
25
26 .. centered::
27         A suitable and an unsuitable prism
28
29 In this picture, the left prism is suitable for meshing with 3D
30 extrusion algorithm: it has six sides, two of which are split
31 vertically. The right prism cannot be meshed with this
32 algorithm because one of the prism sides is split horizontally (the
33 splitting edge is highlighted).
34
35 The algorithm can propagate 2D mesh not only between horizontal
36 (i.e. base and top) faces of one prism but also between faces of prisms
37 organized in a stack and between stacks sharing prism sides.
38
39 .. _prism_stacks:
40
41 .. image:: ../images/prism_stack.png 
42         :align: center
43
44 .. centered::
45         Prism stacks
46
47 This picture shows four neighboring prism stacks, each comprising two prisms.
48 The shown sub-mesh is used by the algorithm to mesh
49 all eight prisms in the stacks.
50
51 To use *Extrusion 3D* algorithm you need to assign algorithms
52 and hypotheses of lower dimensions as follows.
53 (A sample picture below shows algorithms and hypotheses used to
54 mesh a cylinder with prismatic volumes).
55
56 .. image:: ../images/prism_needs_hyps.png 
57         :align: center
58
59 The **Global** algorithms and hypotheses to be chosen at 
60 :ref:`create_mesh_anchor` are:
61
62 * 1D algorithm and hypothesis that will be applied for meshing (logically) vertical edges of the prism (which connect the top and the base faces of the prism). In the sample picture above these are "Regular_1D" algorithm and "Number of Segments" hypothesis named "Vertical Nb. Segments".
63
64
65 The **Local** algorithms and hypotheses to be chosen at 
66 :ref:`constructing_submeshes_page` are:
67
68 * 1D and 2D algorithms and hypotheses that will be applied for meshing the top and the base prism :ref:`faces <submesh_shape_section>`. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base face. In the sample picture above, "NETGEN_1D2D" algorithm meshes "bottom disk" face with triangles. (1D algorithm is not assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.)
69   
70 * Optionally you can define a 1D sub-mesh on some vertical :ref:`edges <submesh_shape_section>` of stacked prisms, which will override the global 1D hypothesis mentioned above. In the :ref:`Prism stacks <prism_stacks>` picture, the vertical division is not equidistant on the whole length because a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to the highlighted edge.
71
72
73 If *Extrusion 3D* algorithm is assigned to a sub-mesh in a mesh
74 with multiple sub-meshes, the described above approach may not work as
75 expected. For example the bottom face may be meshed by other algorithm
76 before *Extrusion 3D* have a chance to project a mesh from the
77 base face. This thing can happen with vertical edges as well. All
78 these can lead to either a meshing failure or to an incorrect meshing.
79 In such a case, it's necessary to explicitly define algorithms
80 that *Extrusion 3D* implicitly applies in a simple case:
81
82 * assign :ref:`projection_1D2D` algorithm to the top face and
83 * assign a 1D algorithm to a group of all vertical edges.
84
85 .. image:: ../images/image157.gif
86         :align: center
87
88 .. centered::
89         Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned
90
91 **See Also** a sample TUI Script of :ref:`tui_prism_3d_algo`.
92
93