From: ageay Date: Fri, 1 Feb 2013 08:06:14 +0000 (+0000) Subject: distance to mesh end of implementation X-Git-Tag: V6_main_FINAL~402 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b164a9b3110c804ac840e410a1e491f9bf5ada6;p=tools%2Fmedcoupling.git distance to mesh end of implementation --- 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.])