Salome HOME
Fix bos #40700 Only test volume of pyramids (min and max) to not be dependant of... cbr/improve_test_import_1D2D_with_tetras_and_pyras 32/head
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 25 Jan 2024 13:23:41 +0000 (14:23 +0100)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 19 Feb 2024 08:24:34 +0000 (09:24 +0100)
test/test_import_1D2D_with_tetras_and_pyras.py

index e1b4d07ddd0f0b0c4fb78082b8e0d6d7e20a0445..94298e34a8b6275c646d0c2347c22195feac1d8a 100644 (file)
@@ -161,7 +161,7 @@ Face_to_enforce_1 = Mesh_2.GroupOnGeom(Face_to_enforce,'Face_to_enforce',SMESH.F
 
 isDone = Mesh_2.Compute()
 
-Mesh_2.MakeGroup("pyramids", SMESH.VOLUME, CritType=SMESH.FT_ElemGeomType, Threshold=SMESH.Geom_PYRAMID)
+gr_pyramids = Mesh_2.MakeGroup("pyramids", SMESH.VOLUME, CritType=SMESH.FT_ElemGeomType, Threshold=SMESH.Geom_PYRAMID)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser()
@@ -175,5 +175,8 @@ assert abs(mesh_volume-geom_volume)/geom_volume < 1e-7, "Wrong mesh volume"
 min_aspect_ratio, max_aspect_ratio = Mesh_2.GetMinMax(SMESH.FT_AspectRatio3D)
 assert max_aspect_ratio < 200, "Bad aspect ratio 3D: %.1f"%max_aspect_ratio
 
-min_volume, max_volume = Mesh_2.GetMinMax(SMESH.FT_Volume3D)
+# Check min and max volume of pyramids
+min_volume, max_volume = Mesh_2.GetMinMax(SMESH.FT_Volume3D, gr_pyramids)
 assert min_volume > 1e-10, "Bad min volume: %s"%min_volume
+expected_max_volume = 6.829e-8
+assert max_volume < 1.5*expected_max_volume, "Bad max volume: %s"%max_volume