mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
Some improvements on Scaled Jacobian:
- add math to sphinx to generate the formulas - change the icon to deformed hexahedrons - add a test on deformed hexahedrons - update the example use case on the doc to deformed hexahedrons
This commit is contained in:
parent
9ac965c0e3
commit
0dbcca5093
@ -186,6 +186,7 @@ html_use_index = True
|
|||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'smeshdoc'
|
htmlhelp_basename = 'smeshdoc'
|
||||||
|
|
||||||
|
extensions += ['sphinx.ext.mathjax']
|
||||||
|
|
||||||
# Options for LaTeX output
|
# Options for LaTeX output
|
||||||
# ------------------------
|
# ------------------------
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
doc/gui/images/scaled_jacobian_mesh_hexa.png
Normal file
BIN
doc/gui/images/scaled_jacobian_mesh_hexa.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB |
@ -4,12 +4,19 @@
|
|||||||
Scaled Jacobian
|
Scaled Jacobian
|
||||||
***************
|
***************
|
||||||
|
|
||||||
The **Scaled Jacobian** mesh quality criteria, is a scalar measure of the deviation from the perfect element in the geometrical sense, this measure normalize the range of reported values
|
The **Scaled Jacobian** mesh quality criteria is a scalar measure of the deviation from the perfect element in the geometrical sense. This measure normalizes the range of reported values between [0,1] for a normal element, the value of 1 is considered a perfect element and 0 a element with a collapsed side. Negative values are also accepted for invalid elements.
|
||||||
between [0,1] for a normal element, the value of 1 is considered a perfect element and 0 a element with a collapsed side. Negative values are also accepted for invalid elements.
|
|
||||||
|
|
||||||
The **Scaled Jacobian** is implemented for volumetric elements returning 0 for polyhedrons. For tetrahedron and hexahedron the close form
|
The **Scaled Jacobian** is implemented for all volumetric elements (except for polyhedrons, returning 0).
|
||||||
is defined in `[1] <https://gitlab.kitware.com/third-party/verdict/-/blob/master/SAND2007-2853p.pdf>`_, for pyramids the minimum scaled jacobian of the four tetrahedrons formed
|
|
||||||
in the four vertices of the pyramid base is reported, for pentahedrons a decomposition into tetrahedron is also done and finally for hexahedron prisms the minimum scaled jacobian between two pentahedrons and one hexahedron is reported.
|
For tetrahedrons and hexahedrons, the formulas are
|
||||||
|
defined in `The Verdict Library Reference Manual [1] <https://gitlab.kitware.com/third-party/verdict/-/blob/master/SAND2007-2853p.pdf>`_.
|
||||||
|
|
||||||
|
For pyramid, the minimum scaled jacobian of the four tetrahedrons formed
|
||||||
|
in the four vertices of the pyramid base is reported.
|
||||||
|
|
||||||
|
For pentahedron, a decomposition into tetrahedron is also done.
|
||||||
|
|
||||||
|
For hexahedron prisms, the minimum scaled jacobian between two pentahedrons and one hexahedron is reported.
|
||||||
|
|
||||||
* Geometrically the Scaled Jacobian of a **tetrahedron** can be understood by the follow figure:
|
* Geometrically the Scaled Jacobian of a **tetrahedron** can be understood by the follow figure:
|
||||||
|
|
||||||
@ -35,7 +42,7 @@ in the four vertices of the pyramid base is reported, for pentahedrons a decompo
|
|||||||
|
|
||||||
Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion:
|
Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion:
|
||||||
|
|
||||||
.. image:: ../images/scaled_jacobian_mesh_tetra.png
|
.. image:: ../images/scaled_jacobian_mesh_hexa.png
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,6 +168,7 @@ SET(SMESH_RESOURCES_FILES
|
|||||||
mesh_renumbering_nodes.png
|
mesh_renumbering_nodes.png
|
||||||
mesh_revolution.png
|
mesh_revolution.png
|
||||||
mesh_rotation.png
|
mesh_rotation.png
|
||||||
|
mesh_scaled_jacobian.png
|
||||||
mesh_sew_bordertoside.png
|
mesh_sew_bordertoside.png
|
||||||
mesh_sew_conform_freeborders.png
|
mesh_sew_conform_freeborders.png
|
||||||
mesh_sew_freeborders.png
|
mesh_sew_freeborders.png
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 2.1 KiB |
@ -136,9 +136,47 @@ if not Done:
|
|||||||
|
|
||||||
pentahedrons = 0.6
|
pentahedrons = 0.6
|
||||||
pentasAndPolys = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_ScaledJacobian, SMESH.FT_LessThan, pentahedrons )
|
pentasAndPolys = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_ScaledJacobian, SMESH.FT_LessThan, pentahedrons )
|
||||||
#Distorted hexas
|
|
||||||
|
|
||||||
polysIds = Mesh_4.GetIdsFromFilter(polysElements)
|
polysIds = Mesh_4.GetIdsFromFilter(polysElements)
|
||||||
pentasAndPolysIds = Mesh_4.GetIdsFromFilter(pentasAndPolys)
|
pentasAndPolysIds = Mesh_4.GetIdsFromFilter(pentasAndPolys)
|
||||||
|
|
||||||
assert( len(pentasAndPolysIds) - len(polysIds) == 10 )
|
assert( len(pentasAndPolysIds) - len(polysIds) == 10 )
|
||||||
|
|
||||||
|
#Test distorded hexahedrons scaled jacobian values
|
||||||
|
Mesh_5 = smesh.Mesh(Box_1,'Mesh_5')
|
||||||
|
Regular_1D = Mesh_5.Segment()
|
||||||
|
Number_of_Segments_1 = Regular_1D.NumberOfSegments(2)
|
||||||
|
Quadrangle_2D = Mesh_5.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||||
|
Hexa_3D = Mesh_5.Hexahedron(algo=smeshBuilder.Hexa)
|
||||||
|
isDone = Mesh_5.Compute()
|
||||||
|
|
||||||
|
if not Done:
|
||||||
|
raise Exception("Error when computing hexaedrons Mesh for quality control test")
|
||||||
|
|
||||||
|
#move some nodes to make scaled jacobian lesser than 1
|
||||||
|
node_id_1 = Mesh_5.FindNodeClosestTo(0, 0, 10)
|
||||||
|
node_id_5 = Mesh_5.FindNodeClosestTo(10, 0, 10)
|
||||||
|
node_id_14 = Mesh_5.FindNodeClosestTo(10, 5, 10)
|
||||||
|
node_id_13 = Mesh_5.FindNodeClosestTo(10, 0, 5)
|
||||||
|
node_id_6 = Mesh_5.FindNodeClosestTo(10, 0, 0)
|
||||||
|
Mesh_5.MoveNode( node_id_1, 1, 1, 9 )
|
||||||
|
Mesh_5.MoveNode( node_id_5, 9, 1, 9 )
|
||||||
|
Mesh_5.MoveNode( node_id_14, 10, 5, 9 )
|
||||||
|
Mesh_5.MoveNode( node_id_13, 9, 0, 5 )
|
||||||
|
Mesh_5.MoveNode( node_id_6, 8, 0, 0 )
|
||||||
|
|
||||||
|
yellow_element = Mesh_5.FindElementsByPoint(7.5, 2.5, 2.5)[0]
|
||||||
|
green_element = Mesh_5.FindElementsByPoint(7.5, 2.5, 7.5)[0]
|
||||||
|
blue_element = Mesh_5.FindElementsByPoint(2.5, 2.5, 7.5)[0]
|
||||||
|
|
||||||
|
yellow_SJ = Mesh_5.GetScaledJacobian(yellow_element)
|
||||||
|
green_SJ = Mesh_5.GetScaledJacobian(green_element)
|
||||||
|
blue_SJ = Mesh_5.GetScaledJacobian(blue_element)
|
||||||
|
|
||||||
|
yellow_SJ_ref = 0.910446300912
|
||||||
|
green_SJ_ref = 0.818025491961
|
||||||
|
blue_SJ_ref = 0.654728501099
|
||||||
|
|
||||||
|
assert assertWithDelta( yellow_SJ_ref, yellow_SJ, 1e-10 )
|
||||||
|
assert assertWithDelta( green_SJ_ref, green_SJ, 1e-10 )
|
||||||
|
assert assertWithDelta( blue_SJ_ref, blue_SJ, 1e-10 )
|
||||||
|
Loading…
Reference in New Issue
Block a user