From 92d86c3c19d1957657fb0e39091396bd3fcefccf Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Thu, 25 Jan 2024 14:23:41 +0100 Subject: [PATCH] Fix bos #40700 Only test volume of pyramids (min and max) to not be dependant of MG-Tetra mesh --- test/test_import_1D2D_with_tetras_and_pyras.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_import_1D2D_with_tetras_and_pyras.py b/test/test_import_1D2D_with_tetras_and_pyras.py index e1b4d07dd..94298e34a 100644 --- a/test/test_import_1D2D_with_tetras_and_pyras.py +++ b/test/test_import_1D2D_with_tetras_and_pyras.py @@ -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 -- 2.39.2