def testUMeshComputeEnlargedNeighborsOfNodes(self):
m=MEDCouplingCMesh() ; arr=DataArrayDouble(4) ; arr.iota() ; m.setCoords(arr,arr) ; m=m.buildUnstructured()
a,b=m.computeEnlargedNeighborsOfNodes()
- self.assertTrue(a.isEqual(DataArrayInt([1,4,5,0,2,4,5,6,1,3,5,6,7,2,6,7,0,1,5,8,9,0,1,2,4,6,8,9,10,1,2,3,5,7,9,10,11,2,3,6,10,11,4,5,9,12,13,4,5,6,8,10,12,13,14,5,6,7,9,11,13,14,15,6,7,10,14,15,8,9,13,8,9,10,12,14,9,10,11,13,15,10,11,14])))
- self.assertTrue(b.isEqual(DataArrayInt([0,3,8,13,16,21,29,37,42,47,55,63,68,71,76,81,84])))
+ aExp=DataArrayInt([1,4,5,0,2,4,5,6,1,3,5,6,7,2,6,7,0,1,5,8,9,0,1,2,4,6,8,9,10,1,2,3,5,7,9,10,11,2,3,6,10,11,4,5,9,12,13,4,5,6,8,10,12,13,14,5,6,7,9,11,13,14,15,6,7,10,14,15,8,9,13,8,9,10,12,14,9,10,11,13,15,10,11,14])
+ bExp=DataArrayInt([0,3,8,13,16,21,29,37,42,47,55,63,68,71,76,81,84])
+ self.assertTrue(a.isEqual(aExp))
+ self.assertTrue(b.isEqual(bExp))
+ m2=m[[1,2,3]]
+ c,d=m2.computeEnlargedNeighborsOfNodes()
+ cExp=DataArrayInt([2,5,6,1,3,5,6,7,2,6,7,5,8,9,1,2,4,6,8,9,1,2,3,5,7,2,3,6,4,5,9,4,5,8])
+ dExp=DataArrayInt([0,0,3,8,11,14,20,25,28,31,34,34,34,34,34,34,34])
+ self.assertTrue(c.isEqual(cExp))
+ self.assertTrue(d.isEqual(dExp))
pass
def testDAIfindIdsExt1(self):