From 0b164a9b3110c804ac840e410a1e491f9bf5ada6 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 1 Feb 2013 08:06:14 +0000 Subject: [PATCH] distance to mesh end of implementation --- src/MEDCoupling_Swig/MEDCouplingBasicsTest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index 10ad6a3f7..79f1a5e9d 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -10893,10 +10893,16 @@ class MEDCouplingBasicsTest(unittest.TestCase): m.setCoords(coords) m.allocateCells(0) m.insertNextCell(NORM_QUAD4,[0,1,2,3]) + m.checkCoherency2() + self.assertEqual([4,0,1,2,3],m.getNodalConnectivity().getValues()) a,b,c=m.distanceToPoint([5.,2.,0.1]) self.assertAlmostEqual(0.1,a,14) ; self.assertEqual(0,b) ; self.assertEqual(1,c) a,b,c=m.distanceToPoint([5.,-2.,4.]) self.assertAlmostEqual(sqrt(2*2+4*4),a,14) ; self.assertEqual(0,b) ; self.assertEqual(1,c) + m.allocateCells(0) + m.insertNextCell(NORM_POLYGON,[0,1,2,3]) + m.checkCoherency2() + self.assertEqual([5,0,1,2,3],m.getNodalConnectivity().getValues()) a,b,c=m.distanceToPoint([11.,3.,4.]) self.assertAlmostEqual(sqrt(3*3+4*4),a,14) ; self.assertEqual(0,b) ; self.assertEqual(1,c) a,b,c=m.distanceToPoint([4.,12.,5.]) -- 2.39.2