self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,67,70,73,76,80,84,88,92,96])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,100,104,108,112,117,122,127,132])))
self.assertTrue(a3.isEqual(DataArrayInt([2,0,1,2,1,2,2,2,0,2,3,4,2,4,5,2,5,3,2,6,7,2,7,8,2,8,6,2,9,10,2,10,11,2,11,9,2,12,13,2,13,14,2,14,15,2,15,12,2,16,17,2,17,18,2,18,19,2,19,16,2,20,21,2,21,22,2,22,23,2,23,20,2,24,25,2,25,26,2,26,27,2,27,24,2,28,29,2,29,30,2,30,31,2,31,28,3,0,1,2,3,3,4,5,3,6,7,8,3,9,10,11,4,12,13,14,15,4,16,17,18,19,4,20,21,22,23,4,24,25,26,27,4,28,29,30,31])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,67,70,73,76,80,84,88,92,96])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,100,104,108,112,117,122,127,132])))
self.assertTrue(a3.isEqual(DataArrayInt([2,0,1,2,1,2,2,2,0,2,3,4,2,4,5,2,5,3,2,6,7,2,7,8,2,8,6,2,9,10,2,10,11,2,11,9,2,12,13,2,13,14,2,14,15,2,15,12,2,16,17,2,17,18,2,18,19,2,19,16,2,20,21,2,21,22,2,22,23,2,23,20,2,24,25,2,25,26,2,26,27,2,27,24,2,28,29,2,29,30,2,30,31,2,31,28,3,0,1,2,3,3,4,5,3,6,7,8,3,9,10,11,4,12,13,14,15,4,16,17,18,19,4,20,21,22,23,4,24,25,26,27,4,28,29,30,31])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,67,70,73,76,80,84,88,92,96])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,100,104,108,112,117,122,127,132])))
self.assertTrue(a3.isEqual(DataArrayInt([2,0,1,2,1,2,2,2,0,2,3,4,2,4,5,2,5,3,2,6,7,2,7,8,2,8,6,2,9,10,2,10,11,2,11,9,2,12,13,2,13,14,2,14,15,2,15,12,2,16,17,2,17,18,2,18,19,2,19,16,2,20,21,2,21,22,2,22,23,2,23,20,2,24,25,2,25,26,2,26,27,2,27,24,2,28,29,2,29,30,2,30,31,2,31,28,3,0,1,2,3,3,4,5,3,6,7,8,3,9,10,11,4,12,13,14,15,4,16,17,18,19,4,20,21,22,23,4,24,25,26,27,4,28,29,30,31])))
assert a4 is None
assert a5 is None
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,5,5,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,9,12,16,20,24,28,32])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,12,16,21,26,31,36])))
self.assertTrue(a3.isEqual(DataArrayInt([3,0,1,2,3,3,4,5,3,6,7,8,3,9,10,11,4,12,13,14,15,4,16,17,18,19,4,20,21,22,23,4,24,25,26,27,4,28,29,30,31])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,5,5,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,9,12,16,20,24,28,32])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,12,16,21,26,31,36])))
self.assertTrue(a3.isEqual(DataArrayInt([3,0,1,2,3,3,4,5,3,6,7,8,3,9,10,11,4,12,13,14,15,4,16,17,18,19,4,20,21,22,23,4,24,25,26,27,4,28,29,30,31])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp[pfl2].changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,5,5,5,5])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,9,12,15,18])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,12,16,20])))
self.assertTrue(a3.isEqual(DataArrayInt([3,0,3,1,3,3,4,1,3,1,4,2,3,4,5,2,3,6,5,4,3,6,7,5])))
assert a4 is None
assert a5 is None
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,5,5,5,5,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,9,12,15,18,22,26])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,12,16,20,24,29])))
self.assertTrue(a3.isEqual(DataArrayInt([3,2,7,3,3,7,8,3,3,3,8,4,3,8,9,4,3,13,9,8,3,13,14,9,4,6,11,12,7,4,12,13,8,7])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
a0Exp.setInfoOnComponents(["XX [m]","YYY [km]"])
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([4,8,12,16])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,5,10,15])))
self.assertTrue(a3.isEqual(DataArrayInt([4,3,2,7,8,4,4,3,8,9,4,7,6,11,12,4,9,8,13,14])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
a0Exp.setInfoOnComponents(["XX [m]","YYY [km]"])
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([4,8,12,16])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,5,10,15])))
self.assertTrue(a3.isEqual(DataArrayInt([4,3,2,7,8,4,4,3,8,9,4,7,6,11,12,4,9,8,13,14])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,5,5,5,5,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,9,12,15,18,22,26,30,34,38])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,12,16,20,24,29,34,39,44])))
self.assertTrue(a3.isEqual(DataArrayInt([3,2,7,3,3,7,8,3,3,3,8,4,3,8,9,4,3,13,9,8,3,13,14,9,4,0,5,6,1,4,1,6,7,2,4,5,10,11,6,4,6,11,12,7,4,12,13,8,7])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp[pfl2].changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,10,14,18])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,13,18])))
self.assertTrue(a3.isEqual(DataArrayInt([3,1,4,2,3,4,5,2,4,0,3,4,1,4,3,6,7,4,4,7,8,5,4])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp[pfl1].changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([5,5,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([3,6,10,14,18])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,4,8,13,18])))
self.assertTrue(a3.isEqual(DataArrayInt([3,1,4,2,3,4,5,2,4,0,3,4,1,4,3,6,7,4,4,7,8,5,4])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75])))
self.assertTrue(a3.isEqual(DataArrayInt([4,1,0,5,6,4,3,2,7,8,4,4,3,8,9,4,6,5,10,11,4,9,8,13,14,4,19,18,23,24,4,2,1,6,7,4,7,6,11,12,4,11,10,15,16,4,12,11,16,17,4,8,7,12,13,4,13,12,17,18,4,17,16,21,22,4,14,13,18,19,4,16,15,20,21,4,18,17,22,23]))) # <- here the mesh is renumbered : the mesh is equal to m[[0,2,3,4,7,15, 1,5,8,9, 6,10,13, 11,12,14]]
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(not ncc)
self.assertTrue(a0.isEqual(a0Exp.changeNbOfComponents(3,0.),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9])))
- self.assertTrue(a2.isEqual(DataArrayInt([4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75])))
self.assertTrue(a3.isEqual(DataArrayInt([4,1,0,5,6,4,2,1,6,7,4,3,2,7,8,4,4,3,8,9,4,6,5,10,11,4,7,6,11,12,4,8,7,12,13,4,9,8,13,14,4,11,10,15,16,4,12,11,16,17,4,13,12,17,18,4,14,13,18,19,4,16,15,20,21,4,17,16,21,22,4,18,17,22,23,4,19,18,23,24]))) # <- here the mesh is NOT renumbered : the mesh is equal to m
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)
self.assertTrue(ncc)
self.assertTrue(a0.isEqual(a0Exp,1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([12,12,42,42,42])))
- self.assertTrue(a2.isEqual(DataArrayInt([8,16,24,32,40])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,9,26,34,42])))#[8,16,24,32,40] tony
self.assertTrue(a3.isEqual(DataArrayInt([8,1,0,6,7,13,12,18,19,8,2,1,7,8,14,13,19,20,8,2,3,8,9,14,15,20,21,8,3,4,9,10,15,16,21,22,8,4,5,10,11,16,17,22,23])))
self.assertTrue(a4.isEqual(DataArrayInt([-1,-1,0,31,62])))
self.assertTrue(a5.isEqual(DataArrayInt([6,4,3,2,8,9,4,15,21,20,14,4,3,15,14,2,4,2,14,20,8,4,8,20,21,9,4,9,21,15,3,6,4,4,3,9,10,4,16,22,21,15,4,4,16,15,3,4,3,15,21,9,4,9,21,22,10,4,10,22,16,4,6,4,5,4,10,11,4,17,23,22,16,4,5,17,16,4,4,4,16,22,10,4,10,22,23,11,4,11,23,17,5])))
self.assertTrue(ncc)
self.assertTrue(a0.isEqual(DataArrayDouble([0.,0.,0.,1.,0.,0.,2.,0.,0.,0.,1.,0.,1.,1.,0.,2.,1.,0.,0.,2.,0.,1.,2.,0.,2.,2.,0.,0.,0.,1.,1.,0.,1.,2.,0.,1.,0.,1.,1.,1.,1.,1.,2.,1.,1.,0.,2.,1.,1.,2.,1.,2.,2.,1.,0.,0.,2.,1.,0.,2.,2.,0.,2.,0.,1.,2.,1.,1.,2.,2.,1.,2.,0.,2.,2.,1.,2.,2.,2.,2.,2.0],27,3),1e-12))
self.assertTrue(a1.isEqual(DataArrayByte([12,12,12,12,12,12,12,12])))
- self.assertTrue(a2.isEqual(DataArrayInt([8,16,24,32,40,48,56,64])))
+ self.assertTrue(a2.isEqual(DataArrayInt([0,9,18,27,36,45,54,63])))
self.assertTrue(a3.isEqual(DataArrayInt([8,1,0,3,4,10,9,12,13,8,2,1,4,5,11,10,13,14,8,4,3,6,7,13,12,15,16,8,5,4,7,8,14,13,16,17,8,10,9,12,13,19,18,21,22,8,11,10,13,14,20,19,22,23,8,13,12,15,16,22,21,24,25,8,14,13,16,17,23,22,25,26])))
self.assertTrue(a4 is None)
self.assertTrue(a5 is None)