]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
distance to mesh end of implementation
authorageay <ageay>
Fri, 1 Feb 2013 08:06:14 +0000 (08:06 +0000)
committerageay <ageay>
Fri, 1 Feb 2013 08:06:14 +0000 (08:06 +0000)
src/MEDCoupling_Swig/MEDCouplingBasicsTest.py

index 10ad6a3f742458167dbdf52fc3b1e2d2a0fe9c0e..79f1a5e9d1188a951f748a32dd0d59c44fdefa16 100644 (file)
@@ -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.])