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.])