Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / doc / salome / gui / SMESH / input / smoothing.rst
1 .. _smoothing_page:
2
3 *********
4 Smoothing
5 *********
6
7 Smoothing is used to improve quality of 2D mesh by adjusting the
8 locations of element corners (nodes). 
9
10 .. note:: Depending on the chosen method and mesh geometry the smoothing can actually decrease the quality of elements and even make some elements inverted.
11
12 *To apply smoothing to the elements of your mesh:*
13
14 .. |img| image:: ../images/image84.png
15
16 #. In the **Modification** menu select the **Smoothing** item or click *"Smoothing"* button |img| in the toolbar.
17
18    The following dialog will appear:
19
20         .. image:: ../images/smoothing.png
21                 :align: center
22
23 #. In this dialog:
24
25         * specify the IDs of the elements which will be smoothed:
26                 * **Select the whole mesh, sub-mesh or group** activating this   check-box; or
27                 * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or 
28                 * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or
29                 * apply Filters. **Set filters** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page.
30
31         * define the **Fixed nodes ids** that should remain at their location during smoothing. If a mesh is built on a shape, the nodes built on its geometric edges are always fixed. If the smoothing is applied to a part of the mesh (a set of element), the nodes on boundary of the element set are also fixed. It is possible to additionally fix any other nodes. The fixed nodes can be selected manually or by filters, just as the smoothed elements.
32         * choose the **Smoothing Method:**
33                 * **Laplacian** smoothing pulls a node toward the center of surrounding nodes directly connected to that node along an element edge. 
34                 * **Centroidal** smoothing pulls a node toward the element-area-weighted centroid of the surrounding elements. 
35
36                 Laplacian method will produce the mesh with the least element edge length. It is also the fastest method. Centroidal smoothing produces a mesh with more uniform element sizes.
37
38
39                 .. image:: ../images/image83.gif
40                         :align: center
41
42
43         * specify the **Iteration limit**. Both smoothing methods iterate through a number of steps to produce the resulting smoothed mesh. At each new step the smoothing is reevaluated with the updated nodal locations. This process continues till the limit of iterations has been exceeded, or till the aspect ratio of all element is less than or equal to the specified one.
44         * specify the  **Max. aspect ratio** - the target mesh quality at which the smoothing algorithm should stop the iterations.
45         * activate **in parametric space** check-box if it is necessary to improve the shape of faces in the parametric space of geometrical surfaces on which they are generated, else the shape of faces in the 3D space is improved that is suitable for **planar meshes only**. 
46
47 #. Click **Apply** or **Apply and Close** button to confirm the operation.
48
49
50 .. image:: ../images/smoothing1.png 
51         :align: center
52
53 .. centered:: 
54         The initial mesh
55
56 .. image:: ../images/smoothing2.png 
57         :align: center
58
59 .. centered:: 
60         The smoothed mesh: mesh quality improved
61
62 **See Also** a sample TUI Script of a :ref:`tui_smoothing` operation.  
63
64