]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Fix Hybrid tests with new ids of sub-shapes cbr/fix_hybrid_tests
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 9 Apr 2018 14:44:59 +0000 (16:44 +0200)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 9 Apr 2018 14:44:59 +0000 (16:44 +0200)
tests/layers_imprinting.py
tests/layers_imprinting_hexa_core.py

index bb198496ac62bfa86b10c58e5accd449d1bf0fdb..4dec793738e2e90dd8797e26c927f91887262e6a 100644 (file)
@@ -28,14 +28,14 @@ Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0)
 Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, 1.5)
 piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True)
 [Outlet] = geompy.SubShapes(piquage, [15])
-[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [3, 22])
+[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [13, 22])
 [corner] = geompy.SubShapes(piquage, [14])
 geomObj_1 = geompy.MakeVertex(0, 0, 0)
 geomObj_2 = geompy.MakeVectorDXDYDZ(1, 0, 0)
 geomObj_3 = geompy.MakeVectorDXDYDZ(0, 1, 0)
 geomObj_4 = geompy.MakeVectorDXDYDZ(0, 0, 1)
 Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Wall, [7, 17])
+geompy.UnionIDs(Wall, [3, 17])
 geompy.addToStudy( O, 'O' )
 geompy.addToStudy( OX, 'OX' )
 geompy.addToStudy( OY, 'OY' )
@@ -88,7 +88,7 @@ MG_Hybrid_Parameters_1.SetElementGeneration( HYBRIDPluginBuilder.Generation_Tetr
 MG_Hybrid_Parameters_1.SetHeightFirstLayer( 0.01 )
 MG_Hybrid_Parameters_1.SetBoundaryLayersProgression( 1.1 )
 MG_Hybrid_Parameters_1.SetNbOfBoundaryLayers( 3 )
-MG_Hybrid_Parameters_1.SetFacesWithLayers( [ 7, 17 ] )
+MG_Hybrid_Parameters_1.SetFacesWithLayers( [ 3, 17 ] )
 
 
 isDone = Mesh_1.Compute()
@@ -128,8 +128,8 @@ MG_Hybrid_Parameters_2.SetElementGeneration( HYBRIDPluginBuilder.Generation_Tetr
 MG_Hybrid_Parameters_2.SetHeightFirstLayer( 0.01 )
 MG_Hybrid_Parameters_2.SetBoundaryLayersProgression( 1.1 )
 MG_Hybrid_Parameters_2.SetNbOfBoundaryLayers( 3 )
-MG_Hybrid_Parameters_2.SetFacesWithLayers( [ 7, 17 ] )
-MG_Hybrid_Parameters_2.SetFacesWithImprinting( [ 22, 15, 3 ] )
+MG_Hybrid_Parameters_2.SetFacesWithLayers( [ 3, 17 ] )
+MG_Hybrid_Parameters_2.SetFacesWithImprinting( [ 22, 15, 13 ] )
 
 isDone = Mesh_2.Compute()
 
@@ -168,7 +168,7 @@ for name in faces_imprinted:
 mesh_2_volume = Mesh_2.GetVolume()
 volume_error_2 = abs(shape_volume-mesh_2_volume)/shape_volume
 
-assert volume_error_2 < 0.015
+assert volume_error_2 < 0.02
 
 # Viscous layers with imprinting set by groups
 # ============================================
index e4947859b6bcb385bcc86e33f4ab2bac5e2be1b6..2cd92cb03bfb8486ff884cb8cbb2f381689d4f14 100644 (file)
@@ -30,14 +30,14 @@ Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0)
 Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, 1.5)
 piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True)
 [Outlet] = geompy.SubShapes(piquage, [15])
-[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [3, 22])
+[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [13, 22])
 [corner] = geompy.SubShapes(piquage, [14])
 geomObj_1 = geompy.MakeVertex(0, 0, 0)
 geomObj_2 = geompy.MakeVectorDXDYDZ(1, 0, 0)
 geomObj_3 = geompy.MakeVectorDXDYDZ(0, 1, 0)
 geomObj_4 = geompy.MakeVectorDXDYDZ(0, 0, 1)
 Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Wall, [7, 17])
+geompy.UnionIDs(Wall, [3, 17])
 geompy.addToStudy( O, 'O' )
 geompy.addToStudy( OX, 'OX' )
 geompy.addToStudy( OY, 'OY' )
@@ -90,8 +90,8 @@ MG_Hybrid_Parameters_4.SetElementGeneration( HYBRIDPluginBuilder.Generation_Hexa
 MG_Hybrid_Parameters_4.SetHeightFirstLayer( 0.01 )
 MG_Hybrid_Parameters_4.SetBoundaryLayersProgression( 1.1 )
 MG_Hybrid_Parameters_4.SetNbOfBoundaryLayers( 3 )
-MG_Hybrid_Parameters_4.SetFacesWithLayers( [ 7, 17 ] )
-MG_Hybrid_Parameters_4.SetFacesWithImprinting( [ 22, 15, 3 ] )
+MG_Hybrid_Parameters_4.SetFacesWithLayers( [ 3, 17 ] )
+MG_Hybrid_Parameters_4.SetFacesWithImprinting( [ 22, 15, 13 ] )
 
 isDone = Mesh_4.Compute()
 
@@ -114,7 +114,7 @@ mesh_4_volume = Mesh_4.GetVolume()
 shape_volume = geompy.BasicProperties(piquage)[2]
 volume_error_4 = abs(shape_volume-mesh_4_volume)/shape_volume
 
-assert volume_error_4 < 0.015
+assert volume_error_4 < 0.02
 
 # Check viscous layers with imprinting
 faces_imprinted = ["Inlet_x", "Inlet_z", "Outlet"]