]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Updated expected values in python unit tests
authormichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:28:10 +0000 (14:28 +0100)
committermichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:28:10 +0000 (14:28 +0100)
CDMATH/tests/swig/mainTests.py

index 9bad2be9ce3103923323659c827d6dae2f3e04cb..aa8e9381faaf890d57d12aba46a20bfa6479f664 100755 (executable)
@@ -471,15 +471,20 @@ class TestsCDMATHSwig(unittest.TestCase):
         self.assertTrue(y11 == 0.0)
         M1.setGroupAtFaceByCoords(0., 0., 0., 1.E-14, "LeftEdge")
         M1.setGroupAtFaceByCoords(4., 0., 0., 1.E-14, "RightEdge")
+        M1.setGroupAtNodeByCoords(0., 0., 0., 1.E-14, "LeftEdge")
+        M1.setGroupAtNodeByCoords(4., 0., 0., 1.E-14, "RightEdge")
         self.assertTrue(M1.getFace(0).isBorder() == True)
         self.assertTrue(M1.getFace(1).isBorder() == False)
         self.assertTrue(M1.getFace(2).isBorder() == False)
         self.assertTrue(M1.getFace(3).isBorder() == False)
         self.assertTrue(M1.getFace(4).isBorder() == True)
         self.assertTrue(len(M1.getNameOfFaceGroups()) ==3)
-        self.assertTrue(M1.getNameOfFaceGroups()[0] == "RightEdge")
+        self.assertTrue(M1.getNameOfFaceGroups()[2] == "RightEdge")
         self.assertTrue(M1.getNameOfFaceGroups()[1] == "LeftEdge")
-        self.assertTrue(M1.getNameOfFaceGroups()[2] == "Boundary")
+        self.assertTrue(M1.getNameOfFaceGroups()[0] == "Boundary")
+        self.assertTrue(M1.getNameOfNodeGroups()[2] == "RightEdge")
+        self.assertTrue(M1.getNameOfNodeGroups()[1] == "LeftEdge")
+        self.assertTrue(M1.getNameOfNodeGroups()[0] == "Boundary")
 
         M1 = Mesh(0.0, 1.0, 4)
         self.assertTrue(1 == M1.getSpaceDimension())
@@ -514,7 +519,11 @@ class TestsCDMATHSwig(unittest.TestCase):
         M2.setGroupAtPlan(yinf, 1, eps, "BottomEdge")
         M2.setGroupAtPlan(ysup, 1, eps, "TopEdge")
         self.assertTrue(len(M2.getNameOfFaceGroups()) == 5)
-        self.assertTrue(M2.getNameOfFaceGroups()[1] == "BottomEdge")
+        self.assertTrue(M2.getNameOfFaceGroups()[0] == "Boundary")
+        self.assertTrue(M2.getNameOfFaceGroups()[1] == "RightEdge")
+        self.assertTrue(M2.getNameOfFaceGroups()[2] == "LeftEdge")
+        self.assertTrue(M2.getNameOfFaceGroups()[3] == "BottomEdge")
+        self.assertTrue(M2.getNameOfFaceGroups()[4] == "TopEdge")
         nbFaces = M2.getNumberOfFaces()
         M2.setPeriodicFaces()
         indexFaces = M2.getIndexFacePeriodic()
@@ -544,10 +553,11 @@ class TestsCDMATHSwig(unittest.TestCase):
         M23 = Mesh("meshSquare.med")
         self.assertTrue(len(M23.getNameOfFaceGroups()) == 5)
         print( M23.getNameOfFaceGroups() )
-        self.assertTrue(M23.getNameOfFaceGroups()[3] == "Bottom")
+        self.assertTrue(M23.getNameOfFaceGroups()[1] == "Bottom")
         self.assertTrue(M23.getNameOfFaceGroups()[2] == "Left")
-        self.assertTrue(M23.getNameOfFaceGroups()[1] == "Right")
-        self.assertTrue(M23.getNameOfFaceGroups()[0] == "Top")
+        self.assertTrue(M23.getNameOfFaceGroups()[3] == "Right")
+        self.assertTrue(M23.getNameOfFaceGroups()[4] == "Top")
+        self.assertTrue(M23.getNameOfFaceGroups()[0] == "Boundary")
 
         M3 = M1
         self.assertTrue(1 == M3.getSpaceDimension())