]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Correct the the values of the plane test because of the modification of the mesh
authorEl Hadi Moussi <moussi@phimeca.com>
Tue, 6 Aug 2024 08:56:24 +0000 (10:56 +0200)
committerEl Hadi Moussi <moussi@phimeca.com>
Tue, 6 Aug 2024 08:59:56 +0000 (10:59 +0200)
src/ShapeRecogn/Test/PlaneTest.cxx

index ea09ed1ce60a2842446d0b5b40d1e578387a21ca..4b9744fbc242f01350f85811658a1ad599af31e9 100644 (file)
@@ -22,21 +22,21 @@ void PlaneTest::tearDown()
 
 void PlaneTest::testArea()
 {
-    CPPUNIT_ASSERT_EQUAL(46, (int)areas->getNumberOfNodes());
+    CPPUNIT_ASSERT_EQUAL(36, (int)areas->getNumberOfNodes(0));
     CPPUNIT_ASSERT_EQUAL(1, (int)areas->getNumberOfAreas());
     // Normal
     std::array<double, 3> normal = areas->getNormal(0);
-    std::array<double, 3> normalRef = {0.78152546, 0.31060627, -0.54105609};
+    std::array<double, 3> normalRef = {0.781525, 0.310606, -0.541056};
     std::array<double, 3> affinePoint = areas->getAffinePoint(0);
     double proportion0 = normal[0] / normalRef[0];
     double proportion1 = normal[1] / normalRef[1];
     double proportion2 = normal[2] / normalRef[2];
     double proportion3 = MathOps::dot(normal, affinePoint) / MathOps::dot(normalRef, affinePoint);
     // Check proportions between the normal vectors of the two planes
-    CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion1, 1E-2);
-    CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion2, 1E-2);
-    CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion3, 1E-1);
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion1, 1E-6);
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion1, proportion2, 1E-6);
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion2, proportion3, 1E-6);
     // Check the angle
     double angle = MathOps::computeAngle(normal, normalRef);
-    CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, angle, 1E-2);
-}
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, angle, 1E-6);
+}
\ No newline at end of file