Salome HOME
On the road of ParaMEDReader for fields.
[modules/med.git] / src / MEDCoupling_Swig / MEDCouplingBasicsTest.py
index 914dfdb22e2e2948e5fa0cb6e701524ac4dea1fc..e0334fbea7971a79fe7571746056984eb350bb1d 100644 (file)
@@ -2770,6 +2770,18 @@ class MEDCouplingBasicsTest(unittest.TestCase):
             self.assertEqual(expected1[i],nodeCor.getIJ(i,0));
             pass
         pass
+      
+    def testSwig2CheckDeepEquivalWith1(self):
+        eps = 1.0e-8
+        mcart = MEDCouplingCMesh()
+        mcart.setCoordsAt(0, DataArrayDouble([0.0,1.5,2.0]))
+        mcart.setCoordsAt(1, DataArrayDouble([1.0,2.5,3.0,4.0]))
+        m = mcart.buildUnstructured()
+        m2 = m[1:m.getNumberOfCells()]
+        self.assertRaises(InterpKernelException, m.checkDeepEquivalWith, m2, 0, eps)
+        self.assertRaises(InterpKernelException, m.checkDeepEquivalWith, m2, 1, eps)
+        self.assertRaises(InterpKernelException, m.checkDeepEquivalWith, m2, 2, eps)
+        pass
 
     def testCopyTinyStringsFromOnFields(self):
         m=MEDCouplingDataForTest.build3DSurfTargetMesh_1();
@@ -14635,7 +14647,6 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         self.assertTrue(mu.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,10,15,20,25,30])))
         coo0=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,3,0),(1,3,0),(2,3,0)])
         self.assertTrue(mu.getCoords().isEqual(coo0,1e-12))
-        mu.writeVTK("tutu.vtu")
         #
         m=MEDCouplingCMesh()
         arrX=DataArrayDouble(3) ; arrX.iota()
@@ -14775,7 +14786,7 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         r=it.next()
         self.assertEqual(len(r),3)
         j,k,l=r
-        assert(inp.isEqual(DataArrayDouble([a,b,c,d,e,f,g,h,i,j,k,l],4,3),1e-12))
+        self.assertTrue(inp.isEqual(DataArrayDouble([a,b,c,d,e,f,g,h,i,j,k,l],4,3),1e-12))
         ########
         inp=DataArrayInt([(1,2,3),(4,5,6),(7,8,9),(10,11,12)])
         it=inp.__iter__()
@@ -14792,7 +14803,7 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         r=it.next()
         self.assertEqual(len(r),3)
         j,k,l=r
-        assert(inp.isEqual(DataArrayInt([a,b,c,d,e,f,g,h,i,j,k,l],4,3)))
+        self.assertTrue(inp.isEqual(DataArrayInt([a,b,c,d,e,f,g,h,i,j,k,l],4,3)))
         pass
 
     def testSwig2IMesh1(self):
@@ -14936,6 +14947,21 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         self.assertTrue(mu.getNodalConnectivity().isEqual(DataArrayInt([1,0,3,4,2,1,4,5,4,3,6,7,5,4,7,8,7,6,9,10,8,7,10,11])))
         pass
 
+    def testSwig1GetValuesAsTuple1(self):
+        d=DataArrayDouble()
+        self.assertEqual(d.getValues(),[])
+        self.assertEqual(d.getValuesAsTuple(),[])
+        d=DataArrayDouble(24) ; d.iota() ; d.rearrange(3)
+        self.assertEqual(d.getValues(),[0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.,17.,18.,19.,20.,21.,22.,23.])
+        self.assertEqual(d.getValuesAsTuple(),[(0.,1.,2.0),(3.,4.,5.0),(6.,7.,8.0),(9.,10.,11.0),(12.,13.,14.0),(15.,16.,17.0),(18.,19.,20.0),(21.,22.,23.)]) 
+        d=DataArrayInt()
+        self.assertEqual(d.getValues(),[])
+        self.assertEqual(d.getValuesAsTuple(),[])
+        d=DataArrayInt(24) ; d.iota() ; d.rearrange(3)
+        self.assertEqual(d.getValues(),[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])
+        self.assertEqual(d.getValuesAsTuple(),[(0,1,2),(3,4,5),(6,7,8),(9,10,11),(12,13,14),(15,16,17),(18,19,20),(21,22,23)])
+        pass
+
     def testSwig2AMR1(self):
         self.assertEqual((1,3,12),MEDCouplingStructuredMesh.GetSplitVectFromStruct([3,4,5]))
         self.assertEqual((3,2),MEDCouplingStructuredMesh.GetDimensionsFromCompactFrmt([(1,4),(2,4)]))
@@ -15122,18 +15148,17 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         ids=b.getIdsInRange(0.4,0.7)
         f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(im) ; f.setName("toto") ; arr=DataArrayDouble(im.getNumberOfCells()) ; arr[:]=0. ; arr[ids]=1. ; f.setArray(arr)
         # f.write("test.vti")
-        amr=MEDCouplingCartesianAMRMesh("mesh",2,[51,51],[0.,0.],[0.04,0.04])
+        amr=MEDCouplingCartesianAMRMesh(MEDCouplingIMesh("mesh",2,[51,51],[0.,0.],[0.04,0.04]))
         arr2=DataArrayByte(im.getNumberOfCells()) ; arr2[:]=0 ; arr2[ids]=1
-        bso=BoxSplittingOptions() ; bso.setEffeciency(0.8) ; bso.setEffeciencySnd(0.8) ; bso.setMaxCells(1000) ; bso.setMinCellDirection(3)
+        bso=BoxSplittingOptions() ; bso.setEfficiencyGoal(0.5); bso.setEfficiencyThreshold(0.8) ; bso.setMaximumNbOfCellsInPatch(3000) ; bso.setMinimumPatchLength(6) ; bso.setMaximumPatchLength(11)
         amr.createPatchesFromCriterion(bso,arr2,[2,2])
-        self.assertEqual(18,amr.getNumberOfPatches())
-        exp0=[[(8,14),(19,38)],[(19,31),(8,17)],[(19,31),(33,42)],[(10,14),(12,16)],[(9,14),(16,19)],[(14,19),(9,19)],[(14,17),(19,22)],[(14,19),(31,41)],[(36,42),(19,38)],[(14,15),(22,28)],[(14,17),(28,31)],[(31,36),(9,19)],[(33,36),(19,22)],[(31,36),(31,41)],[(36,40),(12,16)],[(36,41),(16,19)],[(35,36),(22,28)],[(33,36),(28,31)]]
+        m=amr.getImageMesh() ; m=m.buildUnstructured() ; m.changeSpaceDimension(3,1.)
+        self.assertEqual(12,amr.getNumberOfPatches())
+        exp0=[[(9,19),(9,19)],[(9,19),(31,41)],[(31,41),(9,19)],[(8,17),(19,25)],[(8,17),(25,31)],[(19,25),(8,17)],[(25,31),(8,17)],[(19,25),(33,42)],[(25,31),(33,42)],[(31,41),(31,41)],[(33,42),(19,25)],[(33,42),(25,31)]]
         for i,bltr in enumerate(exp0):
             self.assertEqual(amr[i].getBLTRRange(),bltr)
             pass
-        m=amr.buildMeshFromPatchEnvelop()
-        self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([1,0,2,3,5,4,6,7,9,8,10,11,13,12,14,15,17,16,18,19,21,20,22,23,25,24,26,27,29,28,30,31,33,32,34,35,37,36,38,39,41,40,42,43,45,44,46,47,49,48,50,51,53,52,54,55,57,56,58,59,61,60,62,63,65,64,66,67,69,68,70,71])))
-        self.assertTrue(m.getCoords().isEqualWithoutConsideringStr(DataArrayDouble([0.32,0.76,0.56,0.76,0.32,1.52,0.56,1.52,0.76,0.32,1.24,0.32,0.76,0.68,1.24,0.68,0.76,1.32,1.24,1.32,0.76,1.68,1.24,1.68,0.4,0.48,0.56,0.48,0.4,0.64,0.56,0.64,0.36,0.64,0.56,0.64,0.36,0.76,0.56,0.76,0.56,0.36,0.76,0.36,0.56,0.76,0.76,0.76,0.56,0.76,0.68,0.76,0.56,0.88,0.68,0.88,0.56,1.24,0.76,1.24,0.56,1.64,0.76,1.64,1.44,0.76,1.68,0.76,1.44,1.52,1.68,1.52,0.56,0.88,0.6,0.88,0.56,1.12,0.6,1.12,0.56,1.12,0.68,1.12,0.56,1.24,0.68,1.24,1.24,0.36,1.44,0.36,1.24,0.76,1.44,0.76,1.32,0.76,1.44,0.76,1.32,0.88,1.44,0.88,1.24,1.24,1.44,1.24,1.24,1.64,1.44,1.64,1.44,0.48,1.6,0.48,1.44,0.64,1.6,0.64,1.44,0.64,1.64,0.64,1.44,0.76,1.64,0.76,1.4,0.88,1.44,0.88,1.4,1.12,1.44,1.12,1.32,1.12,1.44,1.12,1.32,1.24,1.44,1.24],72,2),1e-12))
+        self.assertAlmostEqual(0.666666666667,amr[3].getMesh().getImageMesh().computeSquareness(),12)
         #
         self.assertEqual(MEDCouplingStructuredMesh.ChangeReferenceToGlobalOfCompactFrmt([(8,32),(4,17)],[(0,24),(2,12)]),[(8,32),(6,16)])
         self.assertEqual(MEDCouplingStructuredMesh.ChangeReferenceFromGlobalOfCompactFrmt([(8,32),(4,17)],[(8,32),(6,16)]),[(0,24),(2,12)])
@@ -15158,12 +15183,12 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         fine=DataArrayDouble((3*4+2*1)*(2*4+2*1)) ; fine.iota(1000) #X=3,Y=2 refined by 4
         MEDCouplingIMesh.SpreadCoarseToFineGhost(coarse,[5,7],fine,[(1,4),(2,4)],[4,4],1)
         self.assertTrue(fine.isEqual(DataArrayDouble([15.,16.,16.,16.,16.,17.,17.,17.,17.,18.,18.,18.,18.,19.,22.,23.,23.,23.,23.,24.,24.,24.,24.,25.,25.,25.,25.,26.,22.,23.,23.,23.,23.,24.,24.,24.,24.,25.,25.,25.,25.,26.,22.,23.,23.,23.,23.,24.,24.,24.,24.,25.,25.,25.,25.,26.,22.,23.,23.,23.,23.,24.,24.,24.,24.,25.,25.,25.,25.,26.,29.,30.,30.,30.,30.,31.,31.,31.,31.,32.,32.,32.,32.,33.,29.,30.,30.,30.,30.,31.,31.,31.,31.,32.,32.,32.,32.,33.,29.,30.,30.,30.,30.,31.,31.,31.,31.,32.,32.,32.,32.,33.,29.,30.,30.,30.,30.,31.,31.,31.,31.,32.,32.,32.,32.,33.,36.,37.,37.,37.,37.,38.,38.,38.,38.,39.,39.,39.,39.,40.]),1e-12))
-        f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(MEDCouplingIMesh("",2,DataArrayInt([8,10]),[0.,0.],DataArrayDouble((1.,1.)))) ; f.setArray(coarse) ; f.setName("tutu") ; f.checkCoherency() ; f.writeVTK("coarse.vti")
+        f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(MEDCouplingIMesh("",2,DataArrayInt([8,10]),[0.,0.],DataArrayDouble((1.,1.)))) ; f.setArray(coarse) ; f.setName("tutu") ; f.checkCoherency()
         coarse.iota(-1000)
         fine2=DataArrayDouble.Meld(fine,3*fine) ; coarse2=DataArrayDouble.Meld(coarse,3*coarse)
         MEDCouplingIMesh.CondenseFineToCoarseGhost([5,7],fine,[(1,4),(2,4)],[4,4],coarse,1)
         MEDCouplingIMesh.CondenseFineToCoarseGhost([5,7],fine2,[(1,4),(2,4)],[4,4],coarse2,1)
-        f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(MEDCouplingIMesh("",2,DataArrayInt([8,10]),[0.,0.],DataArrayDouble((1.,1.)))) ; f.setArray(coarse) ; f.setName("tutu") ; f.checkCoherency() ; f.writeVTK("coarse.vti")
+        f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(MEDCouplingIMesh("",2,DataArrayInt([8,10]),[0.,0.],DataArrayDouble((1.,1.)))) ; f.setArray(coarse) ; f.setName("tutu") ; f.checkCoherency()
         coarseExp=DataArrayDouble([-1000.,-999.,-998.,-997.,-996.,-995.,-994.,-993.,-992.,-991.,-990.,-989.,-988.,-987.,-986.,-985.,-984.,-983.,-982.,-981.,-980.,-979.,-978.,368.,384.,400.,-974.,-973.,-972.,-971.,480.,496.,512.,-967.,-966.,-965.,-964.,-963.,-962.,-961.,-960.,-959.,-958.,-957.,-956.,-955.,-954.,-953.,-952.,-951.,-950.,-949.,-948.,-947.,-946.,-945.,-944.,-943.,-942.,-941.,-940.,-939.,-938.])
         self.assertTrue(coarse.isEqual(coarseExp,1e-12))
         self.assertTrue(coarse2[:,0].isEqual(coarseExp,1e-12))
@@ -15254,6 +15279,9 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         amr[0].addPatch([(10,12),(5,8)],[2,2])
         amr[1].addPatch([(0,1),(0,5)],[2,2])
         amr[2].addPatch([(3,4),(0,3)],[2,2])
+        m=amr.buildMeshFromPatchEnvelop()
+        self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([1,0,2,3,5,4,6,7,9,8,10,11])))
+        self.assertTrue(m.getCoords().isEqualWithoutConsideringStr(DataArrayDouble([1.,2.,4.,2.,1.,4.,4.,4.,4.,3.,5.,3.,4.,5.,5.,5.,0.,4.,1.,4.,0.,6.,1.,6.],12,2),1e-12))
         self.assertEqual(3,amr.getMaxNumberOfLevelsRelativeToThis())
         att=MEDCouplingAMRAttribute(amr,[("Field",["X"])],ghostSz)
         att.alloc()
@@ -15295,7 +15323,7 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         # the test is here ! To be called after iteration with no remesh
         att.synchronizeAllGhostZones()
         f=att.buildCellFieldOnWithGhost(amr,"Field") ; f.checkCoherency()
-        ftmp=att.buildCellFieldOnWithoutGhost(amr,"Field") ; ftmp.checkCoherency() ; self.assertTrue(ftmp.getArray().isEqualWithoutConsideringStr(DataArrayDouble([8.1,9.1,10.1,11.1,12.1,15.1,16.1,17.1,18.1,19.1,22.1,23.1,24.1,25.1,26.1,29.1,30.1,31.1,32.1,33.1,36.1,37.1,38.1,39.1,40.1,43.1,44.1,45.1,46.1,47.1]),1e-12)) ; ftmp.writeVTK("ftmp.vti")
+        ftmp=att.buildCellFieldOnWithoutGhost(amr,"Field") ; ftmp.checkCoherency() ; self.assertTrue(ftmp.getArray().isEqualWithoutConsideringStr(DataArrayDouble([8.1,9.1,10.1,11.1,12.1,15.1,16.1,17.1,18.1,19.1,22.1,23.1,24.1,25.1,26.1,29.1,30.1,31.1,32.1,33.1,36.1,37.1,38.1,39.1,40.1,43.1,44.1,45.1,46.1,47.1]),1e-12))
         f0=att.buildCellFieldOnWithGhost(amr[0].getMesh(),"Field")
         f1=att.buildCellFieldOnWithGhost(amr[1].getMesh(),"Field")
         f2=att.buildCellFieldOnWithGhost(amr[2].getMesh(),"Field")
@@ -15354,13 +15382,13 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         d20.iota() ; d20+=0.7
         # the test is here ! To be called after iteration with no remesh
         att.synchronizeAllGhostZones()
-        f=att.buildCellFieldOnWithGhost(amr,"Field") ; f.writeVTK("ff.vti")
-        f0=att.buildCellFieldOnWithGhost(amr[0].getMesh(),"Field") ; f0.writeVTK("f0.vti")
-        f1=att.buildCellFieldOnWithGhost(amr[1].getMesh(),"Field") ; f1.writeVTK("f1.vti")
-        f2=att.buildCellFieldOnWithGhost(amr[2].getMesh(),"Field") ; f2.writeVTK("f2.vti")
-        f00=att.buildCellFieldOnWithGhost(amr[0][0].getMesh(),"Field") ; f00.writeVTK("f00.vti")
-        f10=att.buildCellFieldOnWithGhost(amr[1][0].getMesh(),"Field") ; f10.writeVTK("f10.vti")
-        f20=att.buildCellFieldOnWithGhost(amr[2][0].getMesh(),"Field") ; f20.writeVTK("f20.vti")
+        f=att.buildCellFieldOnWithGhost(amr,"Field")
+        f0=att.buildCellFieldOnWithGhost(amr[0].getMesh(),"Field")
+        f1=att.buildCellFieldOnWithGhost(amr[1].getMesh(),"Field")
+        f2=att.buildCellFieldOnWithGhost(amr[2].getMesh(),"Field")
+        f00=att.buildCellFieldOnWithGhost(amr[0][0].getMesh(),"Field")
+        f10=att.buildCellFieldOnWithGhost(amr[1][0].getMesh(),"Field")
+        f20=att.buildCellFieldOnWithGhost(amr[2][0].getMesh(),"Field")
         self.assertTrue(f0.getArray().isEqualWithoutConsideringStr(DataArrayDouble([29.1,29.1,30.1,30.1,30.1,30.1,31.1,31.1,31.1,31.1,32.1,32.1,32.1,32.1,33.1,33.1,29.1,29.1,30.1,30.1,30.1,30.1,31.1,31.1,31.1,31.1,32.1,32.1,32.1,32.1,33.1,33.1,38.1,38.1,34.2,35.2,36.2,37.2,38.2,39.2,40.2,41.2,42.2,43.2,44.2,45.2,42.1,42.1,38.1,38.1,50.2,51.2,52.2,53.2,54.2,55.2,56.2,57.2,58.2,59.2,60.2,61.2,42.1,42.1,38.1,38.1,66.2,67.2,68.2,69.2,70.2,71.2,72.2,73.2,74.2,75.2,76.2,77.2,42.1,42.1,38.1,38.1,82.2,83.2,84.2,85.2,86.2,87.2,88.2,89.2,90.2,91.2,92.2,93.2,42.1,42.1,47.1,47.1,98.2,99.2,100.2,101.2,102.2,103.2,104.2,105.2,106.2,107.2,108.2,109.2,18.3,19.3,47.1,47.1,114.2,115.2,116.2,117.2,118.2,119.2,120.2,121.2,122.2,123.2,124.2,125.2,26.3,27.3,47.1,47.1,130.2,131.2,132.2,133.2,134.2,135.2,136.2,137.2,138.2,139.2,140.2,141.2,34.3,35.3,47.1,47.1,146.2,147.2,148.2,149.2,150.2,151.2,152.2,153.2,154.2,155.2,156.2,157.2,42.3,43.3,20.4,21.4,57.1,57.1,57.1,57.1,58.1,58.1,58.1,58.1,59.1,59.1,59.1,59.1,50.3,51.3,28.4,29.4,57.1,57.1,57.1,57.1,58.1,58.1,58.1,58.1,59.1,59.1,59.1,59.1,58.3,59.3]),1e-12))
         self.assertTrue(f1.getArray().isEqualWithoutConsideringStr(DataArrayDouble([76.2,77.2,42.1,42.1,42.1,42.1,43.1,43.1,92.2,93.2,42.1,42.1,42.1,42.1,43.1,43.1,108.2,109.2,18.3,19.3,20.3,21.3,52.1,52.1,124.2,125.2,26.3,27.3,28.3,29.3,52.1,52.1,140.2,141.2,34.3,35.3,36.3,37.3,52.1,52.1,156.2,157.2,42.3,43.3,44.3,45.3,52.1,52.1,59.1,59.1,50.3,51.3,52.3,53.3,61.1,61.1,59.1,59.1,58.3,59.3,60.3,61.3,61.1,61.1,59.1,59.1,66.3,67.3,68.3,69.3,61.1,61.1,59.1,59.1,74.3,75.3,76.3,77.3,61.1,61.1,68.1,68.1,69.1,69.1,69.1,69.1,70.1,70.1,68.1,68.1,69.1,69.1,69.1,69.1,70.1,70.1]),1e-12))
         self.assertTrue(f2.getArray().isEqualWithoutConsideringStr(DataArrayDouble([46.1,46.1,47.1,47.1,47.1,47.1,130.2,131.2,46.1,46.1,47.1,47.1,47.1,47.1,146.2,147.2,55.1,55.1,18.4,19.4,20.4,21.4,57.1,57.1,55.1,55.1,26.4,27.4,28.4,29.4,57.1,57.1,55.1,55.1,34.4,35.4,36.4,37.4,57.1,57.1,55.1,55.1,42.4,43.4,44.4,45.4,57.1,57.1,64.1,64.1,50.4,51.4,52.4,53.4,66.1,66.1,64.1,64.1,58.4,59.4,60.4,61.4,66.1,66.1,64.1,64.1,66.4,67.4,68.4,69.4,66.1,66.1,64.1,64.1,74.4,75.4,76.4,77.4,66.1,66.1,73.1,73.1,74.1,74.1,74.1,74.1,75.1,75.1,73.1,73.1,74.1,74.1,74.1,74.1,75.1,75.1]),1e-12))
@@ -15375,6 +15403,561 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         self.assertTrue(MEDCouplingStructuredMesh.ComputeCornersGhost([5,6,3],2).isEqual(DataArrayInt([0,8,81,89,100,106,163,169,460,466,523,529,540,548,621,629])))
         pass
 
+    def testSwig2AMR10(self):
+        """ This test, focuses on basic operations of coarse to fine and fine to coarse and ghost zone update with a ghost size set to 2 and dimension equal to 2."""
+        szGhost=2
+        amr=MEDCouplingCartesianAMRMesh("",2,[11,11],[0,0],[0.1,0.1])
+        amr.addPatch([(3,8),(0,3)],[2,2])
+        amr[0].addPatch([(0,10),(3,6)],[3,3])
+        amr[0].addPatch([(2,6),(0,3)],[3,3])
+        amr[0].addPatch([(6,10),(2,3)],[3,3])
+        amr.addPatch([(3,8),(3,6)],[2,2])
+        amr[1].addPatch([(0,4),(0,6)],[3,3])
+        amr[1].addPatch([(7,10),(0,4)],[3,3])
+        amr[1].addPatch([(4,7),(0,3)],[3,3])
+        amr[1].addPatch([(4,7),(3,6)],[3,3])
+        amr.addPatch([(0,3),(6,10)],[2,2])
+        self.assertEqual(([(30,39),(27,36)],[6,6]),amr[1][3].getMesh().positionRelativeToGodFather())
+        self.assertEqual(([(6,16),(6,12)],[2,2]),amr[1].getMesh().positionRelativeToGodFather())
+        self.assertTrue(not MEDCouplingStructuredMesh.AreRangesIntersect([(30,39),(27,36)],[(6,16),(6,12)]))
+        self.assertTrue(MEDCouplingStructuredMesh.AreRangesIntersect([(30,39),(27,36)],[(28,32),(35,37)]))
+        da=DataArrayDouble([0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.])
+        MEDCouplingStructuredMesh.AssignPartOfFieldOfDoubleUsing([3,4],da,[(1,3),(2,3)],DataArrayDouble([7.7,8.8]))
+        self.assertTrue(da.isEqual(DataArrayDouble([0.,1.,2.,3.,4.,5.,6.,7.7,8.8,9.,10.,11.]),1e-12))
+        att=MEDCouplingAMRAttribute(amr,[("YY",1)],szGhost)
+        att.spillNatures([ConservativeVolumic])
+        att.alloc()
+        yy=att.getFieldOn(amr,"YY") ; yy.iota(0.01)
+        yy=att.getFieldOn(amr[0].getMesh(),"YY") ; yy.iota(0.02)
+        yy=att.getFieldOn(amr[1].getMesh(),"YY") ; yy.iota(0.03)
+        yy=att.getFieldOn(amr[0][0].getMesh(),"YY") ; yy.iota(0.04)
+        yy=att.getFieldOn(amr[0][1].getMesh(),"YY") ; yy.iota(0.05)
+        yy=att.getFieldOn(amr[0][2].getMesh(),"YY") ; yy.iota(0.06)
+        yy=att.getFieldOn(amr[1][0].getMesh(),"YY") ; yy.iota(0.07)
+        yy=att.getFieldOn(amr[1][1].getMesh(),"YY") ; yy.iota(0.08)
+        yy=att.getFieldOn(amr[1][2].getMesh(),"YY") ; yy.iota(0.09)
+        yy=att.getFieldOn(amr[1][3].getMesh(),"YY") ; yy.iota(0.10)
+        yy=att.getFieldOn(amr[2].getMesh(),"YY") ; yy.iota(0.11)
+        att2=att.deepCpy() ; att3=att2.deepCpy() ; att4=att3.deepCpy() ; att5=att4.deepCpy() ; att6=att5.deepCpy()
+        ###
+        att.synchronizeFineToCoarseBetween(2,1)
+        ###
+        for pos in [(),(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(1,3)]:
+            self.assertTrue(att.getFieldOn(att.getMyGodFather().getMeshAtPosition(pos),"YY").isEqual(att2.getFieldOn(att2.getMyGodFather().getMeshAtPosition(pos),"YY"),1e-12))
+            pass
+        for pos in [(0,),(1,)]:
+            self.assertTrue(not att.getFieldOn(att.getMyGodFather().getMeshAtPosition(pos),"YY").isEqual(att2.getFieldOn(att2.getMyGodFather().getMeshAtPosition(pos),"YY"),1e-12))
+            pass
+        self.assertTrue(att.getFieldOn(amr[0].getMesh(),"YY").isEqualWithoutConsideringStr(DataArrayDouble([0.02,1.02,2.02,3.02,4.02,5.02,6.02,7.02,8.02,9.02,10.02,11.02,12.02,13.02,14.02,15.02,16.02,17.02,18.02,19.02,20.02,21.02,22.02,23.02,24.02,25.02,26.02,27.02,28.02,29.02,30.02,31.02,51.05,54.05,57.05,60.05,36.02,37.02,38.02,39.02,40.02,41.02,42.02,43.02,44.02,45.02,99.05,102.05,105.05,108.05,50.02,51.02,52.02,53.02,54.02,55.02,56.02,57.02,58.02,59.02,147.05,150.05,153.05,156.05,51.06,54.06,57.06,60.06,68.02,69.02,70.02,71.02,105.04,108.04,111.04,114.04,117.04,120.04,123.04,126.04,129.04,132.04,82.02,83.02,84.02,85.02,207.04,210.04,213.04,216.04,219.04,222.04,225.04,228.04,231.04,234.04,96.02,97.02,98.02,99.02,309.04,312.04,315.04,318.04,321.04,324.04,327.04,330.04,333.04,336.04,110.02,111.02,112.02,113.02,114.02,115.02,116.02,117.02,118.02,119.02,120.02,121.02,122.02,123.02,124.02,125.02,126.02,127.02,128.02,129.02,130.02,131.02,132.02,133.02,134.02,135.02,136.02,137.02,138.02,139.02]),1e-12))
+        self.assertTrue(att.getFieldOn(amr[1].getMesh(),"YY").isEqualWithoutConsideringStr(DataArrayDouble([0.03,1.03,2.03,3.03,4.03,5.03,6.03,7.03,8.03,9.03,10.03,11.03,12.03,13.03,14.03,15.03,16.03,17.03,18.03,19.03,20.03,21.03,22.03,23.03,24.03,25.03,26.03,27.03,28.03,29.03,51.07,54.07,57.07,60.07,42.09,45.09,48.09,42.08,45.08,48.08,40.03,41.03,42.03,43.03,99.07,102.07,105.07,108.07,81.09,84.09,87.09,81.08,84.08,87.08,54.03,55.03,56.03,57.03,147.07,150.07,153.07,156.07,120.09,123.09,126.09,120.08,123.08,126.08,68.03,69.03,70.03,71.03,195.07,198.07,201.07,204.07,42.1,45.1,48.1,159.08,162.08,165.08,82.03,83.03,84.03,85.03,243.07,246.07,249.07,252.07,81.1,84.1,87.1,93.03,94.03,95.03,96.03,97.03,98.03,99.03,291.07,294.07,297.07,300.07,120.1,123.1,126.1,107.03,108.03,109.03,110.03,111.03,112.03,113.03,114.03,115.03,116.03,117.03,118.03,119.03,120.03,121.03,122.03,123.03,124.03,125.03,126.03,127.03,128.03,129.03,130.03,131.03,132.03,133.03,134.03,135.03,136.03,137.03,138.03,139.03]),1e-12))
+        del att
+        ####
+        att2.synchronizeAllGhostZonesOfDirectChidrenOf(att2.getMyGodFather())
+        ### Only the 3 (0) (1) and (2) are modified (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (1,3) are not modified.
+        exp2=DataArrayDouble([0.11,1.11,2.11,3.11,4.11,5.11,6.11,7.11,86.03,87.03,10.11,11.11,12.11,13.11,14.11,15.11,16.11,17.11,100.03,101.03,20.11,21.11,22.11,23.11,24.11,25.11,26.11,27.11,28.11,29.11,30.11,31.11,32.11,33.11,34.11,35.11,36.11,37.11,38.11,39.11,40.11,41.11,42.11,43.11,44.11,45.11,46.11,47.11,48.11,49.11,50.11,51.11,52.11,53.11,54.11,55.11,56.11,57.11,58.11,59.11,60.11,61.11,62.11,63.11,64.11,65.11,66.11,67.11,68.11,69.11,70.11,71.11,72.11,73.11,74.11,75.11,76.11,77.11,78.11,79.11,80.11,81.11,82.11,83.11,84.11,85.11,86.11,87.11,88.11,89.11,90.11,91.11,92.11,93.11,94.11,95.11,96.11,97.11,98.11,99.11,100.11,101.11,102.11,103.11,104.11,105.11,106.11,107.11,108.11,109.11,110.11,111.11,112.11,113.11,114.11,115.11,116.11,117.11,118.11,119.11])
+        self.assertTrue(att2.getFieldOn(att2.getMyGodFather().getMeshAtPosition((2,)),"YY").isEqualWithoutConsideringStr(exp2,1e-12))
+        exp3=DataArrayDouble([0.03,1.03,86.02,87.02,88.02,89.02,90.02,91.02,92.02,93.02,94.02,95.02,12.03,13.03,14.03,15.03,100.02,101.02,102.02,103.02,104.02,105.02,106.02,107.02,108.02,109.02,26.03,27.03,28.03,29.03,30.03,31.03,32.03,33.03,34.03,35.03,36.03,37.03,38.03,39.03,40.03,41.03,42.03,43.03,44.03,45.03,46.03,47.03,48.03,49.03,50.03,51.03,52.03,53.03,54.03,55.03,56.03,57.03,58.03,59.03,60.03,61.03,62.03,63.03,64.03,65.03,66.03,67.03,68.03,69.03,70.03,71.03,72.03,73.03,74.03,75.03,76.03,77.03,78.03,79.03,80.03,81.03,82.03,83.03,84.03,85.03,86.03,87.03,88.03,89.03,90.03,91.03,92.03,93.03,94.03,95.03,96.03,97.03,98.03,99.03,100.03,101.03,102.03,103.03,104.03,105.03,106.03,107.03,108.03,109.03,110.03,111.03,26.11,27.11,114.03,115.03,116.03,117.03,118.03,119.03,120.03,121.03,122.03,123.03,124.03,125.03,36.11,37.11,128.03,129.03,130.03,131.03,132.03,133.03,134.03,135.03,136.03,137.03,138.03,139.03])
+        self.assertTrue(att2.getFieldOn(att2.getMyGodFather().getMeshAtPosition((1,)),"YY").isEqualWithoutConsideringStr(exp3,1e-12))
+        exp4=DataArrayDouble([0.02,1.02,2.02,3.02,4.02,5.02,6.02,7.02,8.02,9.02,10.02,11.02,12.02,13.02,14.02,15.02,16.02,17.02,18.02,19.02,20.02,21.02,22.02,23.02,24.02,25.02,26.02,27.02,28.02,29.02,30.02,31.02,32.02,33.02,34.02,35.02,36.02,37.02,38.02,39.02,40.02,41.02,42.02,43.02,44.02,45.02,46.02,47.02,48.02,49.02,50.02,51.02,52.02,53.02,54.02,55.02,56.02,57.02,58.02,59.02,60.02,61.02,62.02,63.02,64.02,65.02,66.02,67.02,68.02,69.02,70.02,71.02,72.02,73.02,74.02,75.02,76.02,77.02,78.02,79.02,80.02,81.02,82.02,83.02,84.02,85.02,86.02,87.02,88.02,89.02,90.02,91.02,92.02,93.02,94.02,95.02,96.02,97.02,98.02,99.02,100.02,101.02,102.02,103.02,104.02,105.02,106.02,107.02,108.02,109.02,110.02,111.02,112.02,113.02,30.03,31.03,32.03,33.03,34.03,35.03,36.03,37.03,38.03,39.03,124.02,125.02,126.02,127.02,44.03,45.03,46.03,47.03,48.03,49.03,50.03,51.03,52.03,53.03,138.02,139.02])
+        self.assertTrue(att2.getFieldOn(att2.getMyGodFather().getMeshAtPosition((0,)),"YY").isEqualWithoutConsideringStr(exp4,1e-12))
+        for pos,iot in [((),0.01),((0,0),0.04),((0,1),0.05),((0,2),0.06),((1,0),0.07),((1,1),0.08),((1,2),0.09),((1,3),0.10)]:
+            vals=att2.getFieldOn(att2.getMyGodFather().getMeshAtPosition(pos),"YY")
+            l=vals.getNumberOfTuples()
+            exps=DataArrayDouble(l) ; exps.iota(iot)
+            self.assertTrue(vals.isEqualWithoutConsideringStr(exps,1e-12))
+            pass
+        del att2
+        ###
+        att3.synchronizeCoarseToFineBetween(1,2)
+        ###
+        for pos in [(),(0,),(1,),(2,)]:
+            self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition(pos),"YY").isEqual(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition(pos),"YY"),1e-12))
+            pass
+        exp5=DataArrayDouble([57.02,57.02,58.02,58.02,58.02,59.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,57.02,57.02,58.02,58.02,58.02,59.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,71.02,71.02,72.02,72.02,72.02,73.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02,71.02,71.02,72.02,72.02,72.02,73.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02,71.02,71.02,72.02,72.02,72.02,73.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02,85.02,85.02,86.02,86.02,86.02,87.02,87.02,87.02,88.02,88.02,88.02,89.02,89.02,89.02,90.02,90.02,90.02,91.02,91.02,91.02,92.02,92.02,92.02,93.02,93.02,93.02,94.02,94.02,94.02,95.02,95.02,95.02,96.02,96.02,85.02,85.02,86.02,86.02,86.02,87.02,87.02,87.02,88.02,88.02,88.02,89.02,89.02,89.02,90.02,90.02,90.02,91.02,91.02,91.02,92.02,92.02,92.02,93.02,93.02,93.02,94.02,94.02,94.02,95.02,95.02,95.02,96.02,96.02,85.02,85.02,86.02,86.02,86.02,87.02,87.02,87.02,88.02,88.02,88.02,89.02,89.02,89.02,90.02,90.02,90.02,91.02,91.02,91.02,92.02,92.02,92.02,93.02,93.02,93.02,94.02,94.02,94.02,95.02,95.02,95.02,96.02,96.02,99.02,99.02,100.02,100.02,100.02,101.02,101.02,101.02,102.02,102.02,102.02,103.02,103.02,103.02,104.02,104.02,104.02,105.02,105.02,105.02,106.02,106.02,106.02,107.02,107.02,107.02,108.02,108.02,108.02,109.02,109.02,109.02,110.02,110.02,99.02,99.02,100.02,100.02,100.02,101.02,101.02,101.02,102.02,102.02,102.02,103.02,103.02,103.02,104.02,104.02,104.02,105.02,105.02,105.02,106.02,106.02,106.02,107.02,107.02,107.02,108.02,108.02,108.02,109.02,109.02,109.02,110.02,110.02,99.02,99.02,100.02,100.02,100.02,101.02,101.02,101.02,102.02,102.02,102.02,103.02,103.02,103.02,104.02,104.02,104.02,105.02,105.02,105.02,106.02,106.02,106.02,107.02,107.02,107.02,108.02,108.02,108.02,109.02,109.02,109.02,110.02,110.02,113.02,113.02,114.02,114.02,114.02,115.02,115.02,115.02,116.02,116.02,116.02,117.02,117.02,117.02,118.02,118.02,118.02,119.02,119.02,119.02,120.02,120.02,120.02,121.02,121.02,121.02,122.02,122.02,122.02,123.02,123.02,123.02,124.02,124.02,113.02,113.02,114.02,114.02,114.02,115.02,115.02,115.02,116.02,116.02,116.02,117.02,117.02,117.02,118.02,118.02,118.02,119.02,119.02,119.02,120.02,120.02,120.02,121.02,121.02,121.02,122.02,122.02,122.02,123.02,123.02,123.02,124.02,124.02])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((0,0)),"YY").isEqualWithoutConsideringStr(exp5,1e-12))
+        exp6=DataArrayDouble([17.02,17.02,18.02,18.02,18.02,19.02,19.02,19.02,20.02,20.02,20.02,21.02,21.02,21.02,22.02,22.02,17.02,17.02,18.02,18.02,18.02,19.02,19.02,19.02,20.02,20.02,20.02,21.02,21.02,21.02,22.02,22.02,31.02,31.02,32.02,32.02,32.02,33.02,33.02,33.02,34.02,34.02,34.02,35.02,35.02,35.02,36.02,36.02,31.02,31.02,32.02,32.02,32.02,33.02,33.02,33.02,34.02,34.02,34.02,35.02,35.02,35.02,36.02,36.02,31.02,31.02,32.02,32.02,32.02,33.02,33.02,33.02,34.02,34.02,34.02,35.02,35.02,35.02,36.02,36.02,45.02,45.02,46.02,46.02,46.02,47.02,47.02,47.02,48.02,48.02,48.02,49.02,49.02,49.02,50.02,50.02,45.02,45.02,46.02,46.02,46.02,47.02,47.02,47.02,48.02,48.02,48.02,49.02,49.02,49.02,50.02,50.02,45.02,45.02,46.02,46.02,46.02,47.02,47.02,47.02,48.02,48.02,48.02,49.02,49.02,49.02,50.02,50.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((0,1)),"YY").isEqualWithoutConsideringStr(exp6,1e-12))
+        exp7=DataArrayDouble([49.02,49.02,50.02,50.02,50.02,51.02,51.02,51.02,52.02,52.02,52.02,53.02,53.02,53.02,54.02,54.02,49.02,49.02,50.02,50.02,50.02,51.02,51.02,51.02,52.02,52.02,52.02,53.02,53.02,53.02,54.02,54.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((0,2)),"YY").isEqualWithoutConsideringStr(exp7,1e-12))
+        exp8=DataArrayDouble([15.03,15.03,16.03,16.03,16.03,17.03,17.03,17.03,18.03,18.03,18.03,19.03,19.03,19.03,20.03,20.03,15.03,15.03,16.03,16.03,16.03,17.03,17.03,17.03,18.03,18.03,18.03,19.03,19.03,19.03,20.03,20.03,29.03,29.03,30.03,30.03,30.03,31.03,31.03,31.03,32.03,32.03,32.03,33.03,33.03,33.03,34.03,34.03,29.03,29.03,30.03,30.03,30.03,31.03,31.03,31.03,32.03,32.03,32.03,33.03,33.03,33.03,34.03,34.03,29.03,29.03,30.03,30.03,30.03,31.03,31.03,31.03,32.03,32.03,32.03,33.03,33.03,33.03,34.03,34.03,43.03,43.03,44.03,44.03,44.03,45.03,45.03,45.03,46.03,46.03,46.03,47.03,47.03,47.03,48.03,48.03,43.03,43.03,44.03,44.03,44.03,45.03,45.03,45.03,46.03,46.03,46.03,47.03,47.03,47.03,48.03,48.03,43.03,43.03,44.03,44.03,44.03,45.03,45.03,45.03,46.03,46.03,46.03,47.03,47.03,47.03,48.03,48.03,57.03,57.03,58.03,58.03,58.03,59.03,59.03,59.03,60.03,60.03,60.03,61.03,61.03,61.03,62.03,62.03,57.03,57.03,58.03,58.03,58.03,59.03,59.03,59.03,60.03,60.03,60.03,61.03,61.03,61.03,62.03,62.03,57.03,57.03,58.03,58.03,58.03,59.03,59.03,59.03,60.03,60.03,60.03,61.03,61.03,61.03,62.03,62.03,71.03,71.03,72.03,72.03,72.03,73.03,73.03,73.03,74.03,74.03,74.03,75.03,75.03,75.03,76.03,76.03,71.03,71.03,72.03,72.03,72.03,73.03,73.03,73.03,74.03,74.03,74.03,75.03,75.03,75.03,76.03,76.03,71.03,71.03,72.03,72.03,72.03,73.03,73.03,73.03,74.03,74.03,74.03,75.03,75.03,75.03,76.03,76.03,85.03,85.03,86.03,86.03,86.03,87.03,87.03,87.03,88.03,88.03,88.03,89.03,89.03,89.03,90.03,90.03,85.03,85.03,86.03,86.03,86.03,87.03,87.03,87.03,88.03,88.03,88.03,89.03,89.03,89.03,90.03,90.03,85.03,85.03,86.03,86.03,86.03,87.03,87.03,87.03,88.03,88.03,88.03,89.03,89.03,89.03,90.03,90.03,99.03,99.03,100.03,100.03,100.03,101.03,101.03,101.03,102.03,102.03,102.03,103.03,103.03,103.03,104.03,104.03,99.03,99.03,100.03,100.03,100.03,101.03,101.03,101.03,102.03,102.03,102.03,103.03,103.03,103.03,104.03,104.03,99.03,99.03,100.03,100.03,100.03,101.03,101.03,101.03,102.03,102.03,102.03,103.03,103.03,103.03,104.03,104.03,113.03,113.03,114.03,114.03,114.03,115.03,115.03,115.03,116.03,116.03,116.03,117.03,117.03,117.03,118.03,118.03,113.03,113.03,114.03,114.03,114.03,115.03,115.03,115.03,116.03,116.03,116.03,117.03,117.03,117.03,118.03,118.03])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((1,0)),"YY").isEqualWithoutConsideringStr(exp8,1e-12))
+        exp9=DataArrayDouble([22.03,22.03,23.03,23.03,23.03,24.03,24.03,24.03,25.03,25.03,25.03,26.03,26.03,22.03,22.03,23.03,23.03,23.03,24.03,24.03,24.03,25.03,25.03,25.03,26.03,26.03,36.03,36.03,37.03,37.03,37.03,38.03,38.03,38.03,39.03,39.03,39.03,40.03,40.03,36.03,36.03,37.03,37.03,37.03,38.03,38.03,38.03,39.03,39.03,39.03,40.03,40.03,36.03,36.03,37.03,37.03,37.03,38.03,38.03,38.03,39.03,39.03,39.03,40.03,40.03,50.03,50.03,51.03,51.03,51.03,52.03,52.03,52.03,53.03,53.03,53.03,54.03,54.03,50.03,50.03,51.03,51.03,51.03,52.03,52.03,52.03,53.03,53.03,53.03,54.03,54.03,50.03,50.03,51.03,51.03,51.03,52.03,52.03,52.03,53.03,53.03,53.03,54.03,54.03,64.03,64.03,65.03,65.03,65.03,66.03,66.03,66.03,67.03,67.03,67.03,68.03,68.03,64.03,64.03,65.03,65.03,65.03,66.03,66.03,66.03,67.03,67.03,67.03,68.03,68.03,64.03,64.03,65.03,65.03,65.03,66.03,66.03,66.03,67.03,67.03,67.03,68.03,68.03,78.03,78.03,79.03,79.03,79.03,80.03,80.03,80.03,81.03,81.03,81.03,82.03,82.03,78.03,78.03,79.03,79.03,79.03,80.03,80.03,80.03,81.03,81.03,81.03,82.03,82.03,78.03,78.03,79.03,79.03,79.03,80.03,80.03,80.03,81.03,81.03,81.03,82.03,82.03,92.03,92.03,93.03,93.03,93.03,94.03,94.03,94.03,95.03,95.03,95.03,96.03,96.03,92.03,92.03,93.03,93.03,93.03,94.03,94.03,94.03,95.03,95.03,95.03,96.03,96.03])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((1,1)),"YY").isEqualWithoutConsideringStr(exp9,1e-12))
+        exp10=DataArrayDouble([19.03,19.03,20.03,20.03,20.03,21.03,21.03,21.03,22.03,22.03,22.03,23.03,23.03,19.03,19.03,20.03,20.03,20.03,21.03,21.03,21.03,22.03,22.03,22.03,23.03,23.03,33.03,33.03,34.03,34.03,34.03,35.03,35.03,35.03,36.03,36.03,36.03,37.03,37.03,33.03,33.03,34.03,34.03,34.03,35.03,35.03,35.03,36.03,36.03,36.03,37.03,37.03,33.03,33.03,34.03,34.03,34.03,35.03,35.03,35.03,36.03,36.03,36.03,37.03,37.03,47.03,47.03,48.03,48.03,48.03,49.03,49.03,49.03,50.03,50.03,50.03,51.03,51.03,47.03,47.03,48.03,48.03,48.03,49.03,49.03,49.03,50.03,50.03,50.03,51.03,51.03,47.03,47.03,48.03,48.03,48.03,49.03,49.03,49.03,50.03,50.03,50.03,51.03,51.03,61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((1,2)),"YY").isEqualWithoutConsideringStr(exp10,1e-12))
+        exp11=DataArrayDouble([61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03,89.03,89.03,90.03,90.03,90.03,91.03,91.03,91.03,92.03,92.03,92.03,93.03,93.03,89.03,89.03,90.03,90.03,90.03,91.03,91.03,91.03,92.03,92.03,92.03,93.03,93.03,89.03,89.03,90.03,90.03,90.03,91.03,91.03,91.03,92.03,92.03,92.03,93.03,93.03,103.03,103.03,104.03,104.03,104.03,105.03,105.03,105.03,106.03,106.03,106.03,107.03,107.03,103.03,103.03,104.03,104.03,104.03,105.03,105.03,105.03,106.03,106.03,106.03,107.03,107.03,103.03,103.03,104.03,104.03,104.03,105.03,105.03,105.03,106.03,106.03,106.03,107.03,107.03,117.03,117.03,118.03,118.03,118.03,119.03,119.03,119.03,120.03,120.03,120.03,121.03,121.03,117.03,117.03,118.03,118.03,118.03,119.03,119.03,119.03,120.03,120.03,120.03,121.03,121.03])
+        self.assertTrue(att3.getFieldOn(att3.getMyGodFather().getMeshAtPosition((1,3)),"YY").isEqualWithoutConsideringStr(exp11,1e-12))
+        del att3
+        ### 
+        att4.synchronizeAllGhostZonesAtASpecifiedLevel(2)
+        for pos in [(),(0,),(1,),(2,)]:
+            self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition(pos),"YY").isEqual(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition(pos),"YY"),1e-12))
+            pass
+        exp12=DataArrayDouble([0.04,1.04,2.04,3.04,4.04,5.04,6.04,7.04,146.05,147.05,148.05,149.05,150.05,151.05,152.05,153.05,154.05,155.05,156.05,157.05,50.06,51.06,52.06,53.06,54.06,55.06,56.06,57.06,58.06,59.06,60.06,61.06,32.04,33.04,34.04,35.04,36.04,37.04,38.04,39.04,40.04,41.04,162.05,163.05,164.05,165.05,166.05,167.05,168.05,169.05,170.05,171.05,172.05,173.05,66.06,67.06,68.06,69.06,70.06,71.06,72.06,73.06,74.06,75.06,76.06,77.06,66.04,67.04,68.04,69.04,70.04,71.04,72.04,73.04,74.04,75.04,76.04,77.04,78.04,79.04,80.04,81.04,82.04,83.04,84.04,85.04,86.04,87.04,88.04,89.04,90.04,91.04,92.04,93.04,94.04,95.04,96.04,97.04,98.04,99.04,100.04,101.04,102.04,103.04,104.04,105.04,106.04,107.04,108.04,109.04,110.04,111.04,112.04,113.04,114.04,115.04,116.04,117.04,118.04,119.04,120.04,121.04,122.04,123.04,124.04,125.04,126.04,127.04,128.04,129.04,130.04,131.04,132.04,133.04,134.04,135.04,136.04,137.04,138.04,139.04,140.04,141.04,142.04,143.04,144.04,145.04,146.04,147.04,148.04,149.04,150.04,151.04,152.04,153.04,154.04,155.04,156.04,157.04,158.04,159.04,160.04,161.04,162.04,163.04,164.04,165.04,166.04,167.04,168.04,169.04,170.04,171.04,172.04,173.04,174.04,175.04,176.04,177.04,178.04,179.04,180.04,181.04,182.04,183.04,184.04,185.04,186.04,187.04,188.04,189.04,190.04,191.04,192.04,193.04,194.04,195.04,196.04,197.04,198.04,199.04,200.04,201.04,202.04,203.04,204.04,205.04,206.04,207.04,208.04,209.04,210.04,211.04,212.04,213.04,214.04,215.04,216.04,217.04,218.04,219.04,220.04,221.04,222.04,223.04,224.04,225.04,226.04,227.04,228.04,229.04,230.04,231.04,232.04,233.04,234.04,235.04,236.04,237.04,238.04,239.04,240.04,241.04,242.04,243.04,244.04,245.04,246.04,247.04,248.04,249.04,250.04,251.04,252.04,253.04,254.04,255.04,256.04,257.04,258.04,259.04,260.04,261.04,262.04,263.04,264.04,265.04,266.04,267.04,268.04,269.04,270.04,271.04,272.04,273.04,274.04,275.04,276.04,277.04,278.04,279.04,280.04,281.04,282.04,283.04,284.04,285.04,286.04,287.04,288.04,289.04,290.04,291.04,292.04,293.04,294.04,295.04,296.04,297.04,298.04,299.04,300.04,301.04,302.04,303.04,304.04,305.04,306.04,307.04,308.04,309.04,310.04,311.04,312.04,313.04,314.04,315.04,316.04,317.04,318.04,319.04,320.04,321.04,322.04,323.04,324.04,325.04,326.04,327.04,328.04,329.04,330.04,331.04,332.04,333.04,334.04,335.04,336.04,337.04,338.04,339.04,340.04,341.04,342.04,343.04,344.04,345.04,346.04,347.04,348.04,349.04,350.04,351.04,352.04,353.04,354.04,355.04,356.04,357.04,358.04,359.04,360.04,361.04,362.04,363.04,364.04,365.04,366.04,367.04,368.04,369.04,370.04,371.04,372.04,373.04,374.04,375.04,34.07,35.07,36.07,37.07,38.07,39.07,40.07,41.07,42.07,43.07,44.07,45.07,28.09,29.09,30.09,31.09,32.09,33.09,34.09,35.09,36.09,28.08,29.08,30.08,31.08,32.08,33.08,34.08,35.08,36.08,406.04,407.04,408.04,409.04,50.07,51.07,52.07,53.07,54.07,55.07,56.07,57.07,58.07,59.07,60.07,61.07,41.09,42.09,43.09,44.09,45.09,46.09,47.09,48.09,49.09,41.08,42.08,43.08,44.08,45.08,46.08,47.08,48.08,49.08,440.04,441.04])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((0,0)),"YY").isEqualWithoutConsideringStr(exp12,1e-12))
+        exp13=DataArrayDouble([[0.05,1.05,2.05,3.05,4.05,5.05,6.05,7.05,8.05,9.05,10.05,11.05,12.05,13.05,14.05,15.05,16.05,17.05,18.05,19.05,20.05,21.05,22.05,23.05,24.05,25.05,26.05,27.05,28.05,29.05,30.05,31.05,32.05,33.05,34.05,35.05,36.05,37.05,38.05,39.05,40.05,41.05,42.05,43.05,44.05,45.05,46.05,47.05,48.05,49.05,50.05,51.05,52.05,53.05,54.05,55.05,56.05,57.05,58.05,59.05,60.05,61.05,62.05,63.05,64.05,65.05,66.05,67.05,68.05,69.05,70.05,71.05,72.05,73.05,74.05,75.05,76.05,77.05,78.05,79.05,80.05,81.05,82.05,83.05,84.05,85.05,86.05,87.05,88.05,89.05,90.05,91.05,92.05,93.05,94.05,95.05,96.05,97.05,98.05,99.05,100.05,101.05,102.05,103.05,104.05,105.05,106.05,107.05,108.05,109.05,110.05,111.05,112.05,113.05,114.05,115.05,116.05,117.05,118.05,119.05,120.05,121.05,122.05,123.05,124.05,125.05,126.05,127.05,128.05,129.05,130.05,131.05,132.05,133.05,134.05,135.05,136.05,137.05,138.05,139.05,140.05,141.05,34.06,35.06,144.05,145.05,146.05,147.05,148.05,149.05,150.05,151.05,152.05,153.05,154.05,155.05,156.05,157.05,50.06,51.06,160.05,161.05,162.05,163.05,164.05,165.05,166.05,167.05,168.05,169.05,170.05,171.05,172.05,173.05,66.06,67.06,74.04,75.04,76.04,77.04,78.04,79.04,80.04,81.04,82.04,83.04,84.04,85.04,86.04,87.04,88.04,89.04,108.04,109.04,110.04,111.04,112.04,113.04,114.04,115.04,116.04,117.04,118.04,119.04,120.04,121.04,122.04,123.04]])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((0,1)),"YY").isEqualWithoutConsideringStr(exp13,1e-12))
+        exp14=DataArrayDouble([108.05,109.05,2.06,3.06,4.06,5.06,6.06,7.06,8.06,9.06,10.06,11.06,12.06,13.06,14.06,15.06,124.05,125.05,18.06,19.06,20.06,21.06,22.06,23.06,24.06,25.06,26.06,27.06,28.06,29.06,30.06,31.06,140.05,141.05,34.06,35.06,36.06,37.06,38.06,39.06,40.06,41.06,42.06,43.06,44.06,45.06,46.06,47.06,156.05,157.05,50.06,51.06,52.06,53.06,54.06,55.06,56.06,57.06,58.06,59.06,60.06,61.06,62.06,63.06,172.05,173.05,66.06,67.06,68.06,69.06,70.06,71.06,72.06,73.06,74.06,75.06,76.06,77.06,78.06,79.06,86.04,87.04,88.04,89.04,90.04,91.04,92.04,93.04,94.04,95.04,96.04,97.04,98.04,99.04,94.06,95.06,120.04,121.04,122.04,123.04,124.04,125.04,126.04,127.04,128.04,129.04,130.04,131.04,132.04,133.04,110.06,111.06])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((0,2)),"YY").isEqualWithoutConsideringStr(exp14,1e-12))
+        exp15=DataArrayDouble([0.07,1.07,308.04,309.04,310.04,311.04,312.04,313.04,314.04,315.04,316.04,317.04,318.04,319.04,320.04,321.04,16.07,17.07,342.04,343.04,344.04,345.04,346.04,347.04,348.04,349.04,350.04,351.04,352.04,353.04,354.04,355.04,32.07,33.07,34.07,35.07,36.07,37.07,38.07,39.07,40.07,41.07,42.07,43.07,44.07,45.07,28.09,29.09,48.07,49.07,50.07,51.07,52.07,53.07,54.07,55.07,56.07,57.07,58.07,59.07,60.07,61.07,41.09,42.09,64.07,65.07,66.07,67.07,68.07,69.07,70.07,71.07,72.07,73.07,74.07,75.07,76.07,77.07,54.09,55.09,80.07,81.07,82.07,83.07,84.07,85.07,86.07,87.07,88.07,89.07,90.07,91.07,92.07,93.07,67.09,68.09,96.07,97.07,98.07,99.07,100.07,101.07,102.07,103.07,104.07,105.07,106.07,107.07,108.07,109.07,80.09,81.09,112.07,113.07,114.07,115.07,116.07,117.07,118.07,119.07,120.07,121.07,122.07,123.07,124.07,125.07,93.09,94.09,128.07,129.07,130.07,131.07,132.07,133.07,134.07,135.07,136.07,137.07,138.07,139.07,140.07,141.07,106.09,107.09,144.07,145.07,146.07,147.07,148.07,149.07,150.07,151.07,152.07,153.07,154.07,155.07,156.07,157.07,119.09,120.09,160.07,161.07,162.07,163.07,164.07,165.07,166.07,167.07,168.07,169.07,170.07,171.07,172.07,173.07,132.09,133.09,176.07,177.07,178.07,179.07,180.07,181.07,182.07,183.07,184.07,185.07,186.07,187.07,188.07,189.07,28.1,29.1,192.07,193.07,194.07,195.07,196.07,197.07,198.07,199.07,200.07,201.07,202.07,203.07,204.07,205.07,41.1,42.1,208.07,209.07,210.07,211.07,212.07,213.07,214.07,215.07,216.07,217.07,218.07,219.07,220.07,221.07,54.1,55.1,224.07,225.07,226.07,227.07,228.07,229.07,230.07,231.07,232.07,233.07,234.07,235.07,236.07,237.07,67.1,68.1,240.07,241.07,242.07,243.07,244.07,245.07,246.07,247.07,248.07,249.07,250.07,251.07,252.07,253.07,80.1,81.1,256.07,257.07,258.07,259.07,260.07,261.07,262.07,263.07,264.07,265.07,266.07,267.07,268.07,269.07,93.1,94.1,272.07,273.07,274.07,275.07,276.07,277.07,278.07,279.07,280.07,281.07,282.07,283.07,284.07,285.07,106.1,107.1,288.07,289.07,290.07,291.07,292.07,293.07,294.07,295.07,296.07,297.07,298.07,299.07,300.07,301.07,119.1,120.1,304.07,305.07,306.07,307.07,308.07,309.07,310.07,311.07,312.07,313.07,314.07,315.07,316.07,317.07,132.1,133.1,320.07,321.07,322.07,323.07,324.07,325.07,326.07,327.07,328.07,329.07,330.07,331.07,332.07,333.07,334.07,335.07,336.07,337.07,338.07,339.07,340.07,341.07,342.07,343.07,344.07,345.07,346.07,347.07,348.07,349.07,350.07,351.07])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((1,0)),"YY").isEqualWithoutConsideringStr(exp15,1e-12))
+        exp16=DataArrayDouble([327.04,328.04,329.04,330.04,331.04,332.04,333.04,334.04,335.04,336.04,337.04,11.08,12.08,361.04,362.04,363.04,364.04,365.04,366.04,367.04,368.04,369.04,370.04,371.04,24.08,25.08,35.09,36.09,28.08,29.08,30.08,31.08,32.08,33.08,34.08,35.08,36.08,37.08,38.08,48.09,49.09,41.08,42.08,43.08,44.08,45.08,46.08,47.08,48.08,49.08,50.08,51.08,61.09,62.09,54.08,55.08,56.08,57.08,58.08,59.08,60.08,61.08,62.08,63.08,64.08,74.09,75.09,67.08,68.08,69.08,70.08,71.08,72.08,73.08,74.08,75.08,76.08,77.08,87.09,88.09,80.08,81.08,82.08,83.08,84.08,85.08,86.08,87.08,88.08,89.08,90.08,100.09,101.09,93.08,94.08,95.08,96.08,97.08,98.08,99.08,100.08,101.08,102.08,103.08,113.09,114.09,106.08,107.08,108.08,109.08,110.08,111.08,112.08,113.08,114.08,115.08,116.08,126.09,127.09,119.08,120.08,121.08,122.08,123.08,124.08,125.08,126.08,127.08,128.08,129.08,139.09,140.09,132.08,133.08,134.08,135.08,136.08,137.08,138.08,139.08,140.08,141.08,142.08,35.1,36.1,145.08,146.08,147.08,148.08,149.08,150.08,151.08,152.08,153.08,154.08,155.08,48.1,49.1,158.08,159.08,160.08,161.08,162.08,163.08,164.08,165.08,166.08,167.08,168.08,61.1,62.1,171.08,172.08,173.08,174.08,175.08,176.08,177.08,178.08,179.08,180.08,181.08,74.1,75.1,184.08,185.08,186.08,187.08,188.08,189.08,190.08,191.08,192.08,193.08,194.08,87.1,88.1,197.08,198.08,199.08,200.08,201.08,202.08,203.08,204.08,205.08,206.08,207.08])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((1,1)),"YY").isEqualWithoutConsideringStr(exp16,1e-12))
+        exp17=DataArrayDouble([318.04,319.04,320.04,321.04,322.04,323.04,324.04,325.04,326.04,327.04,328.04,329.04,330.04,352.04,353.04,354.04,355.04,356.04,357.04,358.04,359.04,360.04,361.04,362.04,363.04,364.04,44.07,45.07,28.09,29.09,30.09,31.09,32.09,33.09,34.09,35.09,36.09,28.08,29.08,60.07,61.07,41.09,42.09,43.09,44.09,45.09,46.09,47.09,48.09,49.09,41.08,42.08,76.07,77.07,54.09,55.09,56.09,57.09,58.09,59.09,60.09,61.09,62.09,54.08,55.08,92.07,93.07,67.09,68.09,69.09,70.09,71.09,72.09,73.09,74.09,75.09,67.08,68.08,108.07,109.07,80.09,81.09,82.09,83.09,84.09,85.09,86.09,87.09,88.09,80.08,81.08,124.07,125.07,93.09,94.09,95.09,96.09,97.09,98.09,99.09,100.09,101.09,93.08,94.08,140.07,141.07,106.09,107.09,108.09,109.09,110.09,111.09,112.09,113.09,114.09,106.08,107.08,156.07,157.07,119.09,120.09,121.09,122.09,123.09,124.09,125.09,126.09,127.09,119.08,120.08,172.07,173.07,132.09,133.09,134.09,135.09,136.09,137.09,138.09,139.09,140.09,132.08,133.08,188.07,189.07,28.1,29.1,30.1,31.1,32.1,33.1,34.1,35.1,36.1,145.08,146.08,204.07,205.07,41.1,42.1,43.1,44.1,45.1,46.1,47.1,48.1,49.1,158.08,159.08])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((1,2)),"YY").isEqualWithoutConsideringStr(exp17,1e-12))
+        exp18=DataArrayDouble([156.07,157.07,119.09,120.09,121.09,122.09,123.09,124.09,125.09,126.09,127.09,119.08,120.08,172.07,173.07,132.09,133.09,134.09,135.09,136.09,137.09,138.09,139.09,140.09,132.08,133.08,188.07,189.07,28.1,29.1,30.1,31.1,32.1,33.1,34.1,35.1,36.1,145.08,146.08,204.07,205.07,41.1,42.1,43.1,44.1,45.1,46.1,47.1,48.1,49.1,158.08,159.08,220.07,221.07,54.1,55.1,56.1,57.1,58.1,59.1,60.1,61.1,62.1,171.08,172.08,236.07,237.07,67.1,68.1,69.1,70.1,71.1,72.1,73.1,74.1,75.1,76.1,77.1,252.07,253.07,80.1,81.1,82.1,83.1,84.1,85.1,86.1,87.1,88.1,89.1,90.1,268.07,269.07,93.1,94.1,95.1,96.1,97.1,98.1,99.1,100.1,101.1,102.1,103.1,284.07,285.07,106.1,107.1,108.1,109.1,110.1,111.1,112.1,113.1,114.1,115.1,116.1,300.07,301.07,119.1,120.1,121.1,122.1,123.1,124.1,125.1,126.1,127.1,128.1,129.1,316.07,317.07,132.1,133.1,134.1,135.1,136.1,137.1,138.1,139.1,140.1,141.1,142.1,143.1,144.1,145.1,146.1,147.1,148.1,149.1,150.1,151.1,152.1,153.1,154.1,155.1,156.1,157.1,158.1,159.1,160.1,161.1,162.1,163.1,164.1,165.1,166.1,167.1,168.1])
+        self.assertTrue(att4.getFieldOn(att4.getMyGodFather().getMeshAtPosition((1,3)),"YY").isEqualWithoutConsideringStr(exp18,1e-12))
+        del att4
+        ###
+        att5.synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(2)
+        for pos in [(),(0,),(1,),(2,)]:
+            self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition(pos),"YY").isEqual(att6.getFieldOn(att6.getMyGodFather().getMeshAtPosition(pos),"YY"),1e-12))
+            pass
+        att5.buildCellFieldOnWithGhost(att5.getMyGodFather().getMeshAtPosition((0,0)),"YY")
+        exp19=DataArrayDouble([57.02,57.02,58.02,58.02,58.02,59.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,57.02,57.02,58.02,58.02,58.02,59.02,59.02,59.02,60.02,60.02,60.02,61.02,61.02,61.02,62.02,62.02,62.02,63.02,63.02,63.02,64.02,64.02,64.02,65.02,65.02,65.02,66.02,66.02,66.02,67.02,67.02,67.02,68.02,68.02,71.02,71.02,70.04,71.04,72.04,73.04,74.04,75.04,76.04,77.04,78.04,79.04,80.04,81.04,82.04,83.04,84.04,85.04,86.04,87.04,88.04,89.04,90.04,91.04,92.04,93.04,94.04,95.04,96.04,97.04,98.04,99.04,82.02,82.02,71.02,71.02,104.04,105.04,106.04,107.04,108.04,109.04,110.04,111.04,112.04,113.04,114.04,115.04,116.04,117.04,118.04,119.04,120.04,121.04,122.04,123.04,124.04,125.04,126.04,127.04,128.04,129.04,130.04,131.04,132.04,133.04,82.02,82.02,71.02,71.02,138.04,139.04,140.04,141.04,142.04,143.04,144.04,145.04,146.04,147.04,148.04,149.04,150.04,151.04,152.04,153.04,154.04,155.04,156.04,157.04,158.04,159.04,160.04,161.04,162.04,163.04,164.04,165.04,166.04,167.04,82.02,82.02,85.02,85.02,172.04,173.04,174.04,175.04,176.04,177.04,178.04,179.04,180.04,181.04,182.04,183.04,184.04,185.04,186.04,187.04,188.04,189.04,190.04,191.04,192.04,193.04,194.04,195.04,196.04,197.04,198.04,199.04,200.04,201.04,96.02,96.02,85.02,85.02,206.04,207.04,208.04,209.04,210.04,211.04,212.04,213.04,214.04,215.04,216.04,217.04,218.04,219.04,220.04,221.04,222.04,223.04,224.04,225.04,226.04,227.04,228.04,229.04,230.04,231.04,232.04,233.04,234.04,235.04,96.02,96.02,85.02,85.02,240.04,241.04,242.04,243.04,244.04,245.04,246.04,247.04,248.04,249.04,250.04,251.04,252.04,253.04,254.04,255.04,256.04,257.04,258.04,259.04,260.04,261.04,262.04,263.04,264.04,265.04,266.04,267.04,268.04,269.04,96.02,96.02,99.02,99.02,274.04,275.04,276.04,277.04,278.04,279.04,280.04,281.04,282.04,283.04,284.04,285.04,286.04,287.04,288.04,289.04,290.04,291.04,292.04,293.04,294.04,295.04,296.04,297.04,298.04,299.04,300.04,301.04,302.04,303.04,110.02,110.02,99.02,99.02,308.04,309.04,310.04,311.04,312.04,313.04,314.04,315.04,316.04,317.04,318.04,319.04,320.04,321.04,322.04,323.04,324.04,325.04,326.04,327.04,328.04,329.04,330.04,331.04,332.04,333.04,334.04,335.04,336.04,337.04,110.02,110.02,99.02,99.02,342.04,343.04,344.04,345.04,346.04,347.04,348.04,349.04,350.04,351.04,352.04,353.04,354.04,355.04,356.04,357.04,358.04,359.04,360.04,361.04,362.04,363.04,364.04,365.04,366.04,367.04,368.04,369.04,370.04,371.04,110.02,110.02,113.02,113.02,114.02,114.02,114.02,115.02,115.02,115.02,116.02,116.02,116.02,117.02,117.02,117.02,118.02,118.02,118.02,119.02,119.02,119.02,120.02,120.02,120.02,121.02,121.02,121.02,122.02,122.02,122.02,123.02,123.02,123.02,124.02,124.02,113.02,113.02,114.02,114.02,114.02,115.02,115.02,115.02,116.02,116.02,116.02,117.02,117.02,117.02,118.02,118.02,118.02,119.02,119.02,119.02,120.02,120.02,120.02,121.02,121.02,121.02,122.02,122.02,122.02,123.02,123.02,123.02,124.02,124.02])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((0,0)),"YY").isEqualWithoutConsideringStr(exp19,1e-12))
+        exp20=DataArrayDouble([17.02,17.02,18.02,18.02,18.02,19.02,19.02,19.02,20.02,20.02,20.02,21.02,21.02,21.02,22.02,22.02,17.02,17.02,18.02,18.02,18.02,19.02,19.02,19.02,20.02,20.02,20.02,21.02,21.02,21.02,22.02,22.02,31.02,31.02,34.05,35.05,36.05,37.05,38.05,39.05,40.05,41.05,42.05,43.05,44.05,45.05,36.02,36.02,31.02,31.02,50.05,51.05,52.05,53.05,54.05,55.05,56.05,57.05,58.05,59.05,60.05,61.05,36.02,36.02,31.02,31.02,66.05,67.05,68.05,69.05,70.05,71.05,72.05,73.05,74.05,75.05,76.05,77.05,36.02,36.02,45.02,45.02,82.05,83.05,84.05,85.05,86.05,87.05,88.05,89.05,90.05,91.05,92.05,93.05,50.02,50.02,45.02,45.02,98.05,99.05,100.05,101.05,102.05,103.05,104.05,105.05,106.05,107.05,108.05,109.05,50.02,50.02,45.02,45.02,114.05,115.05,116.05,117.05,118.05,119.05,120.05,121.05,122.05,123.05,124.05,125.05,50.02,50.02,59.02,59.02,130.05,131.05,132.05,133.05,134.05,135.05,136.05,137.05,138.05,139.05,140.05,141.05,64.02,64.02,59.02,59.02,146.05,147.05,148.05,149.05,150.05,151.05,152.05,153.05,154.05,155.05,156.05,157.05,64.02,64.02,59.02,59.02,162.05,163.05,164.05,165.05,166.05,167.05,168.05,169.05,170.05,171.05,172.05,173.05,64.02,64.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02,73.02,73.02,74.02,74.02,74.02,75.02,75.02,75.02,76.02,76.02,76.02,77.02,77.02,77.02,78.02,78.02])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((0,1)),"YY").isEqualWithoutConsideringStr(exp20,1e-12))
+        exp21=DataArrayDouble([49.02,49.02,50.02,50.02,50.02,51.02,51.02,51.02,52.02,52.02,52.02,53.02,53.02,53.02,54.02,54.02,49.02,49.02,50.02,50.02,50.02,51.02,51.02,51.02,52.02,52.02,52.02,53.02,53.02,53.02,54.02,54.02,63.02,63.02,34.06,35.06,36.06,37.06,38.06,39.06,40.06,41.06,42.06,43.06,44.06,45.06,68.02,68.02,63.02,63.02,50.06,51.06,52.06,53.06,54.06,55.06,56.06,57.06,58.06,59.06,60.06,61.06,68.02,68.02,63.02,63.02,66.06,67.06,68.06,69.06,70.06,71.06,72.06,73.06,74.06,75.06,76.06,77.06,68.02,68.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02,77.02,77.02,78.02,78.02,78.02,79.02,79.02,79.02,80.02,80.02,80.02,81.02,81.02,81.02,82.02,82.02])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((0,2)),"YY").isEqualWithoutConsideringStr(exp21,1e-12))
+        exp22=DataArrayDouble([15.03,15.03,16.03,16.03,16.03,17.03,17.03,17.03,18.03,18.03,18.03,19.03,19.03,19.03,20.03,20.03,15.03,15.03,16.03,16.03,16.03,17.03,17.03,17.03,18.03,18.03,18.03,19.03,19.03,19.03,20.03,20.03,29.03,29.03,34.07,35.07,36.07,37.07,38.07,39.07,40.07,41.07,42.07,43.07,44.07,45.07,34.03,34.03,29.03,29.03,50.07,51.07,52.07,53.07,54.07,55.07,56.07,57.07,58.07,59.07,60.07,61.07,34.03,34.03,29.03,29.03,66.07,67.07,68.07,69.07,70.07,71.07,72.07,73.07,74.07,75.07,76.07,77.07,34.03,34.03,43.03,43.03,82.07,83.07,84.07,85.07,86.07,87.07,88.07,89.07,90.07,91.07,92.07,93.07,48.03,48.03,43.03,43.03,98.07,99.07,100.07,101.07,102.07,103.07,104.07,105.07,106.07,107.07,108.07,109.07,48.03,48.03,43.03,43.03,114.07,115.07,116.07,117.07,118.07,119.07,120.07,121.07,122.07,123.07,124.07,125.07,48.03,48.03,57.03,57.03,130.07,131.07,132.07,133.07,134.07,135.07,136.07,137.07,138.07,139.07,140.07,141.07,62.03,62.03,57.03,57.03,146.07,147.07,148.07,149.07,150.07,151.07,152.07,153.07,154.07,155.07,156.07,157.07,62.03,62.03,57.03,57.03,162.07,163.07,164.07,165.07,166.07,167.07,168.07,169.07,170.07,171.07,172.07,173.07,62.03,62.03,71.03,71.03,178.07,179.07,180.07,181.07,182.07,183.07,184.07,185.07,186.07,187.07,188.07,189.07,76.03,76.03,71.03,71.03,194.07,195.07,196.07,197.07,198.07,199.07,200.07,201.07,202.07,203.07,204.07,205.07,76.03,76.03,71.03,71.03,210.07,211.07,212.07,213.07,214.07,215.07,216.07,217.07,218.07,219.07,220.07,221.07,76.03,76.03,85.03,85.03,226.07,227.07,228.07,229.07,230.07,231.07,232.07,233.07,234.07,235.07,236.07,237.07,90.03,90.03,85.03,85.03,242.07,243.07,244.07,245.07,246.07,247.07,248.07,249.07,250.07,251.07,252.07,253.07,90.03,90.03,85.03,85.03,258.07,259.07,260.07,261.07,262.07,263.07,264.07,265.07,266.07,267.07,268.07,269.07,90.03,90.03,99.03,99.03,274.07,275.07,276.07,277.07,278.07,279.07,280.07,281.07,282.07,283.07,284.07,285.07,104.03,104.03,99.03,99.03,290.07,291.07,292.07,293.07,294.07,295.07,296.07,297.07,298.07,299.07,300.07,301.07,104.03,104.03,99.03,99.03,306.07,307.07,308.07,309.07,310.07,311.07,312.07,313.07,314.07,315.07,316.07,317.07,104.03,104.03,113.03,113.03,114.03,114.03,114.03,115.03,115.03,115.03,116.03,116.03,116.03,117.03,117.03,117.03,118.03,118.03,113.03,113.03,114.03,114.03,114.03,115.03,115.03,115.03,116.03,116.03,116.03,117.03,117.03,117.03,118.03,118.03])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((1,0)),"YY").isEqualWithoutConsideringStr(exp22,1e-12))
+        exp23=DataArrayDouble([22.03,22.03,23.03,23.03,23.03,24.03,24.03,24.03,25.03,25.03,25.03,26.03,26.03,22.03,22.03,23.03,23.03,23.03,24.03,24.03,24.03,25.03,25.03,25.03,26.03,26.03,36.03,36.03,28.08,29.08,30.08,31.08,32.08,33.08,34.08,35.08,36.08,40.03,40.03,36.03,36.03,41.08,42.08,43.08,44.08,45.08,46.08,47.08,48.08,49.08,40.03,40.03,36.03,36.03,54.08,55.08,56.08,57.08,58.08,59.08,60.08,61.08,62.08,40.03,40.03,50.03,50.03,67.08,68.08,69.08,70.08,71.08,72.08,73.08,74.08,75.08,54.03,54.03,50.03,50.03,80.08,81.08,82.08,83.08,84.08,85.08,86.08,87.08,88.08,54.03,54.03,50.03,50.03,93.08,94.08,95.08,96.08,97.08,98.08,99.08,100.08,101.08,54.03,54.03,64.03,64.03,106.08,107.08,108.08,109.08,110.08,111.08,112.08,113.08,114.08,68.03,68.03,64.03,64.03,119.08,120.08,121.08,122.08,123.08,124.08,125.08,126.08,127.08,68.03,68.03,64.03,64.03,132.08,133.08,134.08,135.08,136.08,137.08,138.08,139.08,140.08,68.03,68.03,78.03,78.03,145.08,146.08,147.08,148.08,149.08,150.08,151.08,152.08,153.08,82.03,82.03,78.03,78.03,158.08,159.08,160.08,161.08,162.08,163.08,164.08,165.08,166.08,82.03,82.03,78.03,78.03,171.08,172.08,173.08,174.08,175.08,176.08,177.08,178.08,179.08,82.03,82.03,92.03,92.03,93.03,93.03,93.03,94.03,94.03,94.03,95.03,95.03,95.03,96.03,96.03,92.03,92.03,93.03,93.03,93.03,94.03,94.03,94.03,95.03,95.03,95.03,96.03,96.03])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((1,1)),"YY").isEqualWithoutConsideringStr(exp23,1e-12))
+        exp24=DataArrayDouble([19.03,19.03,20.03,20.03,20.03,21.03,21.03,21.03,22.03,22.03,22.03,23.03,23.03,19.03,19.03,20.03,20.03,20.03,21.03,21.03,21.03,22.03,22.03,22.03,23.03,23.03,33.03,33.03,28.09,29.09,30.09,31.09,32.09,33.09,34.09,35.09,36.09,37.03,37.03,33.03,33.03,41.09,42.09,43.09,44.09,45.09,46.09,47.09,48.09,49.09,37.03,37.03,33.03,33.03,54.09,55.09,56.09,57.09,58.09,59.09,60.09,61.09,62.09,37.03,37.03,47.03,47.03,67.09,68.09,69.09,70.09,71.09,72.09,73.09,74.09,75.09,51.03,51.03,47.03,47.03,80.09,81.09,82.09,83.09,84.09,85.09,86.09,87.09,88.09,51.03,51.03,47.03,47.03,93.09,94.09,95.09,96.09,97.09,98.09,99.09,100.09,101.09,51.03,51.03,61.03,61.03,106.09,107.09,108.09,109.09,110.09,111.09,112.09,113.09,114.09,65.03,65.03,61.03,61.03,119.09,120.09,121.09,122.09,123.09,124.09,125.09,126.09,127.09,65.03,65.03,61.03,61.03,132.09,133.09,134.09,135.09,136.09,137.09,138.09,139.09,140.09,65.03,65.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03,75.03,75.03,76.03,76.03,76.03,77.03,77.03,77.03,78.03,78.03,78.03,79.03,79.03])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((1,2)),"YY").isEqualWithoutConsideringStr(exp24,1e-12))
+        exp25=DataArrayDouble([61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,61.03,61.03,62.03,62.03,62.03,63.03,63.03,63.03,64.03,64.03,64.03,65.03,65.03,75.03,75.03,28.1,29.1,30.1,31.1,32.1,33.1,34.1,35.1,36.1,79.03,79.03,75.03,75.03,41.1,42.1,43.1,44.1,45.1,46.1,47.1,48.1,49.1,79.03,79.03,75.03,75.03,54.1,55.1,56.1,57.1,58.1,59.1,60.1,61.1,62.1,79.03,79.03,89.03,89.03,67.1,68.1,69.1,70.1,71.1,72.1,73.1,74.1,75.1,93.03,93.03,89.03,89.03,80.1,81.1,82.1,83.1,84.1,85.1,86.1,87.1,88.1,93.03,93.03,89.03,89.03,93.1,94.1,95.1,96.1,97.1,98.1,99.1,100.1,101.1,93.03,93.03,103.03,103.03,106.1,107.1,108.1,109.1,110.1,111.1,112.1,113.1,114.1,107.03,107.03,103.03,103.03,119.1,120.1,121.1,122.1,123.1,124.1,125.1,126.1,127.1,107.03,107.03,103.03,103.03,132.1,133.1,134.1,135.1,136.1,137.1,138.1,139.1,140.1,107.03,107.03,117.03,117.03,118.03,118.03,118.03,119.03,119.03,119.03,120.03,120.03,120.03,121.03,121.03,117.03,117.03,118.03,118.03,118.03,119.03,119.03,119.03,120.03,120.03,120.03,121.03,121.03])
+        self.assertTrue(att5.getFieldOn(att5.getMyGodFather().getMeshAtPosition((1,3)),"YY").isEqualWithoutConsideringStr(exp25,1e-12))
+        pass
+
+    def testSwig2AMR11(self):
+        """ Some tests in 3D with CondenseFineToCoarseGhost and SpreadCoarseToFineGhost"""
+        coarse=DataArrayDouble((6+4)*(7+4)*(5+4)) ; coarse.iota()
+        fine=DataArrayDouble((4*2+4)*(2*3+4)*(3*4+4))
+        MEDCouplingIMesh.SpreadCoarseToFineGhost(coarse,[6,7,5],fine,[(1,5),(2,4),(1,4)],[2,3,4],2)
+        exp0=DataArrayDouble([252.,252.,253.,253.,254.,254.,255.,255.,256.,256.,257.,257.,252.,252.,253.,253.,254.,254.,255.,255.,256.,256.,257.,257.,262.,262.,263.,263.,264.,264.,265.,265.,266.,266.,267.,267.,262.,262.,263.,263.,264.,264.,265.,265.,266.,266.,267.,267.,262.,262.,263.,263.,264.,264.,265.,265.,266.,266.,267.,267.,272.,272.,273.,273.,274.,274.,275.,275.,276.,276.,277.,277.,272.,272.,273.,273.,274.,274.,275.,275.,276.,276.,277.,277.,272.,272.,273.,273.,274.,274.,275.,275.,276.,276.,277.,277.,282.,282.,283.,283.,284.,284.,285.,285.,286.,286.,287.,287.,282.,282.,283.,283.,284.,284.,285.,285.,286.,286.,287.,287.])
+        exp1=DataArrayDouble([362.,362.,363.,363.,364.,364.,365.,365.,366.,366.,367.,367.,362.,362.,363.,363.,364.,364.,365.,365.,366.,366.,367.,367.,372.,372.,373.,373.,374.,374.,375.,375.,376.,376.,377.,377.,372.,372.,373.,373.,374.,374.,375.,375.,376.,376.,377.,377.,372.,372.,373.,373.,374.,374.,375.,375.,376.,376.,377.,377.,382.,382.,383.,383.,384.,384.,385.,385.,386.,386.,387.,387.,382.,382.,383.,383.,384.,384.,385.,385.,386.,386.,387.,387.,382.,382.,383.,383.,384.,384.,385.,385.,386.,386.,387.,387.,392.,392.,393.,393.,394.,394.,395.,395.,396.,396.,397.,397.,392.,392.,393.,393.,394.,394.,395.,395.,396.,396.,397.,397.])
+        exp2=DataArrayDouble([472.,472.,473.,473.,474.,474.,475.,475.,476.,476.,477.,477.,472.,472.,473.,473.,474.,474.,475.,475.,476.,476.,477.,477.,482.,482.,483.,483.,484.,484.,485.,485.,486.,486.,487.,487.,482.,482.,483.,483.,484.,484.,485.,485.,486.,486.,487.,487.,482.,482.,483.,483.,484.,484.,485.,485.,486.,486.,487.,487.,492.,492.,493.,493.,494.,494.,495.,495.,496.,496.,497.,497.,492.,492.,493.,493.,494.,494.,495.,495.,496.,496.,497.,497.,492.,492.,493.,493.,494.,494.,495.,495.,496.,496.,497.,497.,502.,502.,503.,503.,504.,504.,505.,505.,506.,506.,507.,507.,502.,502.,503.,503.,504.,504.,505.,505.,506.,506.,507.,507.])
+        exp3=DataArrayDouble([582.,582.,583.,583.,584.,584.,585.,585.,586.,586.,587.,587.,582.,582.,583.,583.,584.,584.,585.,585.,586.,586.,587.,587.,592.,592.,593.,593.,594.,594.,595.,595.,596.,596.,597.,597.,592.,592.,593.,593.,594.,594.,595.,595.,596.,596.,597.,597.,592.,592.,593.,593.,594.,594.,595.,595.,596.,596.,597.,597.,602.,602.,603.,603.,604.,604.,605.,605.,606.,606.,607.,607.,602.,602.,603.,603.,604.,604.,605.,605.,606.,606.,607.,607.,602.,602.,603.,603.,604.,604.,605.,605.,606.,606.,607.,607.,612.,612.,613.,613.,614.,614.,615.,615.,616.,616.,617.,617.,612.,612.,613.,613.,614.,614.,615.,615.,616.,616.,617.,617.])
+        exp4=DataArrayDouble([692.,692.,693.,693.,694.,694.,695.,695.,696.,696.,697.,697.,692.,692.,693.,693.,694.,694.,695.,695.,696.,696.,697.,697.,702.,702.,703.,703.,704.,704.,705.,705.,706.,706.,707.,707.,702.,702.,703.,703.,704.,704.,705.,705.,706.,706.,707.,707.,702.,702.,703.,703.,704.,704.,705.,705.,706.,706.,707.,707.,712.,712.,713.,713.,714.,714.,715.,715.,716.,716.,717.,717.,712.,712.,713.,713.,714.,714.,715.,715.,716.,716.,717.,717.,712.,712.,713.,713.,714.,714.,715.,715.,716.,716.,717.,717.,722.,722.,723.,723.,724.,724.,725.,725.,726.,726.,727.,727.,722.,722.,723.,723.,724.,724.,725.,725.,726.,726.,727.,727.])
+        exp=DataArrayDouble.Aggregate([exp0,exp0,exp1,exp1,exp1,exp1,exp2,exp2,exp2,exp2,exp3,exp3,exp3,exp3,exp4,exp4])
+        self.assertTrue(fine.isEqual(exp,1e-12))
+        #
+        fine.iota()
+        coarse.iota(0.5)
+        MEDCouplingIMesh.CondenseFineToCoarseGhost([6,7,5],fine,[(1,5),(2,4),(1,4)],[2,3,4],coarse,2)
+        amr=MEDCouplingCartesianAMRMesh("mesh",3,[7,8,6],[0.,0.,0.],[1.,1.,1.])
+        amr.addPatch([(1,5),(2,4),(1,4)],[2,3,4])
+        att=MEDCouplingAMRAttribute(amr,[("YY",1)],2)
+        att.alloc()
+        exp1=DataArrayDouble(990) ; exp1.iota(0.5)
+        ids=DataArrayInt([373,374,375,376,383,384,385,386,483,484,485,486,493,494,495,496,593,594,595,596,603,604,605,606])
+        vals=DataArrayDouble([11004.,11052.,11100.,11148.,11868.,11916.,11964.,12012.,22524.,22572.,22620.,22668.,23388.,23436.,23484.,23532.,34044.,34092.,34140.,34188.,34908.,34956.,35004.,35052.])
+        exp1[ids]=vals
+        self.assertTrue(coarse.isEqual(exp1,1e-12))
+        #
+        MEDCouplingStructuredMesh.MultiplyPartOf([10,11,9],[(3,7),(4,6),(3,6)],1/24.,coarse)
+        exp2=DataArrayDouble(990) ; exp2.iota(0.5)
+        exp2[ids]=vals/24.
+        self.assertTrue(coarse.isEqual(exp2,1e-12))
+        #
+        coarse.iota(0.5) ; fine.iota(0.1)
+        MEDCouplingIMesh.SpreadCoarseToFineGhostZone(coarse,[6,7,5],fine,[(1,5),(2,4),(1,4)],[2,3,4],2)
+        #
+        coarse.iota(0.5) ; fine.iota(0.1)
+        MEDCouplingIMesh.SpreadCoarseToFineGhostZone(coarse,[6,7,5],fine,[(1,5),(2,4),(1,4)],[2,3,4],2)
+        exp00=DataArrayDouble.Aggregate([exp0,exp0]) ; exp00+=0.5
+        self.assertTrue(fine[:240].isEqual(exp00,1e-12))
+        exp44=DataArrayDouble.Aggregate([exp4,exp4]) ; exp44+=0.5
+        self.assertTrue(fine[-240:].isEqual(exp44,1e-12))
+        self.assertTrue(fine[240:-240].isEqual(DataArrayDouble([362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,372.5,372.5,266.1,267.1,268.1,269.1,270.1,271.1,272.1,273.1,377.5,377.5,372.5,372.5,278.1,279.1,280.1,281.1,282.1,283.1,284.1,285.1,377.5,377.5,372.5,372.5,290.1,291.1,292.1,293.1,294.1,295.1,296.1,297.1,377.5,377.5,382.5,382.5,302.1,303.1,304.1,305.1,306.1,307.1,308.1,309.1,387.5,387.5,382.5,382.5,314.1,315.1,316.1,317.1,318.1,319.1,320.1,321.1,387.5,387.5,382.5,382.5,326.1,327.1,328.1,329.1,330.1,331.1,332.1,333.1,387.5,387.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,372.5,372.5,386.1,387.1,388.1,389.1,390.1,391.1,392.1,393.1,377.5,377.5,372.5,372.5,398.1,399.1,400.1,401.1,402.1,403.1,404.1,405.1,377.5,377.5,372.5,372.5,410.1,411.1,412.1,413.1,414.1,415.1,416.1,417.1,377.5,377.5,382.5,382.5,422.1,423.1,424.1,425.1,426.1,427.1,428.1,429.1,387.5,387.5,382.5,382.5,434.1,435.1,436.1,437.1,438.1,439.1,440.1,441.1,387.5,387.5,382.5,382.5,446.1,447.1,448.1,449.1,450.1,451.1,452.1,453.1,387.5,387.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,372.5,372.5,506.1,507.1,508.1,509.1,510.1,511.1,512.1,513.1,377.5,377.5,372.5,372.5,518.1,519.1,520.1,521.1,522.1,523.1,524.1,525.1,377.5,377.5,372.5,372.5,530.1,531.1,532.1,533.1,534.1,535.1,536.1,537.1,377.5,377.5,382.5,382.5,542.1,543.1,544.1,545.1,546.1,547.1,548.1,549.1,387.5,387.5,382.5,382.5,554.1,555.1,556.1,557.1,558.1,559.1,560.1,561.1,387.5,387.5,382.5,382.5,566.1,567.1,568.1,569.1,570.1,571.1,572.1,573.1,387.5,387.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,362.5,362.5,363.5,363.5,364.5,364.5,365.5,365.5,366.5,366.5,367.5,367.5,372.5,372.5,626.1,627.1,628.1,629.1,630.1,631.1,632.1,633.1,377.5,377.5,372.5,372.5,638.1,639.1,640.1,641.1,642.1,643.1,644.1,645.1,377.5,377.5,372.5,372.5,650.1,651.1,652.1,653.1,654.1,655.1,656.1,657.1,377.5,377.5,382.5,382.5,662.1,663.1,664.1,665.1,666.1,667.1,668.1,669.1,387.5,387.5,382.5,382.5,674.1,675.1,676.1,677.1,678.1,679.1,680.1,681.1,387.5,387.5,382.5,382.5,686.1,687.1,688.1,689.1,690.1,691.1,692.1,693.1,387.5,387.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,392.5,392.5,393.5,393.5,394.5,394.5,395.5,395.5,396.5,396.5,397.5,397.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,482.5,482.5,746.1,747.1,748.1,749.1,750.1,751.1,752.1,753.1,487.5,487.5,482.5,482.5,758.1,759.1,760.1,761.1,762.1,763.1,764.1,765.1,487.5,487.5,482.5,482.5,770.1,771.1,772.1,773.1,774.1,775.1,776.1,777.1,487.5,487.5,492.5,492.5,782.1,783.1,784.1,785.1,786.1,787.1,788.1,789.1,497.5,497.5,492.5,492.5,794.1,795.1,796.1,797.1,798.1,799.1,800.1,801.1,497.5,497.5,492.5,492.5,806.1,807.1,808.1,809.1,810.1,811.1,812.1,813.1,497.5,497.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,482.5,482.5,866.1,867.1,868.1,869.1,870.1,871.1,872.1,873.1,487.5,487.5,482.5,482.5,878.1,879.1,880.1,881.1,882.1,883.1,884.1,885.1,487.5,487.5,482.5,482.5,890.1,891.1,892.1,893.1,894.1,895.1,896.1,897.1,487.5,487.5,492.5,492.5,902.1,903.1,904.1,905.1,906.1,907.1,908.1,909.1,497.5,497.5,492.5,492.5,914.1,915.1,916.1,917.1,918.1,919.1,920.1,921.1,497.5,497.5,492.5,492.5,926.1,927.1,928.1,929.1,930.1,931.1,932.1,933.1,497.5,497.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,482.5,482.5,986.1,987.1,988.1,989.1,990.1,991.1,992.1,993.1,487.5,487.5,482.5,482.5,998.1,999.1,1000.1,1001.1,1002.1,1003.1,1004.1,1005.1,487.5,487.5,482.5,482.5,1010.1,1011.1,1012.1,1013.1,1014.1,1015.1,1016.1,1017.1,487.5,487.5,492.5,492.5,1022.1,1023.1,1024.1,1025.1,1026.1,1027.1,1028.1,1029.1,497.5,497.5,492.5,492.5,1034.1,1035.1,1036.1,1037.1,1038.1,1039.1,1040.1,1041.1,497.5,497.5,492.5,492.5,1046.1,1047.1,1048.1,1049.1,1050.1,1051.1,1052.1,1053.1,497.5,497.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,472.5,472.5,473.5,473.5,474.5,474.5,475.5,475.5,476.5,476.5,477.5,477.5,482.5,482.5,1106.1,1107.1,1108.1,1109.1,1110.1,1111.1,1112.1,1113.1,487.5,487.5,482.5,482.5,1118.1,1119.1,1120.1,1121.1,1122.1,1123.1,1124.1,1125.1,487.5,487.5,482.5,482.5,1130.1,1131.1,1132.1,1133.1,1134.1,1135.1,1136.1,1137.1,487.5,487.5,492.5,492.5,1142.1,1143.1,1144.1,1145.1,1146.1,1147.1,1148.1,1149.1,497.5,497.5,492.5,492.5,1154.1,1155.1,1156.1,1157.1,1158.1,1159.1,1160.1,1161.1,497.5,497.5,492.5,492.5,1166.1,1167.1,1168.1,1169.1,1170.1,1171.1,1172.1,1173.1,497.5,497.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,502.5,502.5,503.5,503.5,504.5,504.5,505.5,505.5,506.5,506.5,507.5,507.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,592.5,592.5,1226.1,1227.1,1228.1,1229.1,1230.1,1231.1,1232.1,1233.1,597.5,597.5,592.5,592.5,1238.1,1239.1,1240.1,1241.1,1242.1,1243.1,1244.1,1245.1,597.5,597.5,592.5,592.5,1250.1,1251.1,1252.1,1253.1,1254.1,1255.1,1256.1,1257.1,597.5,597.5,602.5,602.5,1262.1,1263.1,1264.1,1265.1,1266.1,1267.1,1268.1,1269.1,607.5,607.5,602.5,602.5,1274.1,1275.1,1276.1,1277.1,1278.1,1279.1,1280.1,1281.1,607.5,607.5,602.5,602.5,1286.1,1287.1,1288.1,1289.1,1290.1,1291.1,1292.1,1293.1,607.5,607.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,592.5,592.5,1346.1,1347.1,1348.1,1349.1,1350.1,1351.1,1352.1,1353.1,597.5,597.5,592.5,592.5,1358.1,1359.1,1360.1,1361.1,1362.1,1363.1,1364.1,1365.1,597.5,597.5,592.5,592.5,1370.1,1371.1,1372.1,1373.1,1374.1,1375.1,1376.1,1377.1,597.5,597.5,602.5,602.5,1382.1,1383.1,1384.1,1385.1,1386.1,1387.1,1388.1,1389.1,607.5,607.5,602.5,602.5,1394.1,1395.1,1396.1,1397.1,1398.1,1399.1,1400.1,1401.1,607.5,607.5,602.5,602.5,1406.1,1407.1,1408.1,1409.1,1410.1,1411.1,1412.1,1413.1,607.5,607.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,592.5,592.5,1466.1,1467.1,1468.1,1469.1,1470.1,1471.1,1472.1,1473.1,597.5,597.5,592.5,592.5,1478.1,1479.1,1480.1,1481.1,1482.1,1483.1,1484.1,1485.1,597.5,597.5,592.5,592.5,1490.1,1491.1,1492.1,1493.1,1494.1,1495.1,1496.1,1497.1,597.5,597.5,602.5,602.5,1502.1,1503.1,1504.1,1505.1,1506.1,1507.1,1508.1,1509.1,607.5,607.5,602.5,602.5,1514.1,1515.1,1516.1,1517.1,1518.1,1519.1,1520.1,1521.1,607.5,607.5,602.5,602.5,1526.1,1527.1,1528.1,1529.1,1530.1,1531.1,1532.1,1533.1,607.5,607.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,582.5,582.5,583.5,583.5,584.5,584.5,585.5,585.5,586.5,586.5,587.5,587.5,592.5,592.5,1586.1,1587.1,1588.1,1589.1,1590.1,1591.1,1592.1,1593.1,597.5,597.5,592.5,592.5,1598.1,1599.1,1600.1,1601.1,1602.1,1603.1,1604.1,1605.1,597.5,597.5,592.5,592.5,1610.1,1611.1,1612.1,1613.1,1614.1,1615.1,1616.1,1617.1,597.5,597.5,602.5,602.5,1622.1,1623.1,1624.1,1625.1,1626.1,1627.1,1628.1,1629.1,607.5,607.5,602.5,602.5,1634.1,1635.1,1636.1,1637.1,1638.1,1639.1,1640.1,1641.1,607.5,607.5,602.5,602.5,1646.1,1647.1,1648.1,1649.1,1650.1,1651.1,1652.1,1653.1,607.5,607.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5,612.5,612.5,613.5,613.5,614.5,614.5,615.5,615.5,616.5,616.5,617.5,617.5]),1e-12))
+        pass
+
+    def testSwig2AMR12(self):
+        """ This test check the MEDCouplingAMRAttribute.projectTo method."""
+        amr0=MEDCouplingCartesianAMRMesh("mesh",2,[11,11],[0.,0.],[1.,1.])
+        amr0.addPatch([(3,8),(0,3)],[2,2])
+        amr0.addPatch([(3,8),(3,6)],[2,2])
+        att0=MEDCouplingAMRAttribute(amr0,[("YY",1)],2)
+        att0.alloc()
+        att0.getFieldOn(amr0,"YY").iota(0.01)
+        att0.getFieldOn(amr0[0].getMesh(),"YY").iota(0.02)
+        att0.getFieldOn(amr0[1].getMesh(),"YY").iota(0.03)
+        amr1=MEDCouplingCartesianAMRMesh("mesh",2,[11,11],[0.,0.],[1.,1.])
+        amr1.addPatch([(2,5),(1,4)],[2,2])
+        att1=att0.projectTo(amr1)
+        self.assertTrue(att1.getFieldOn(amr1,"YY").isEqualWithoutConsideringStr(att0.getFieldOn(amr0,"YY"),1e-12))
+        self.assertTrue(att1.getFieldOn(amr1[0].getMesh(),"YY").isEqualWithoutConsideringStr(DataArrayDouble([31.01,31.01,32.01,32.01,33.01,33.01,34.01,34.01,35.01,35.01,31.01,31.01,32.01,32.01,33.01,33.01,34.01,34.01,35.01,35.01,45.01,45.01,46.01,46.01,58.02,59.02,60.02,61.02,49.01,49.01,45.01,45.01,46.01,46.01,72.02,73.02,74.02,75.02,49.01,49.01,59.01,59.01,60.01,60.01,86.02,87.02,88.02,89.02,63.01,63.01,59.01,59.01,60.01,60.01,100.02,101.02,102.02,103.02,63.01,63.01,73.01,73.01,74.01,74.01,30.03,31.03,32.03,33.03,77.01,77.01,73.01,73.01,74.01,74.01,44.03,45.03,46.03,47.03,77.01,77.01,87.01,87.01,88.01,88.01,89.01,89.01,90.01,90.01,91.01,91.01,87.01,87.01,88.01,88.01,89.01,89.01,90.01,90.01,91.01,91.01]),1e-12))
+        #
+        amr0=MEDCouplingCartesianAMRMesh("mesh",2,[11,11],[0.,0.],[1.,1.])
+        amr0.addPatch([(2,5),(2,7)],[2,2])
+        amr0.addPatch([(5,8),(2,7)],[2,2])
+        att0=MEDCouplingAMRAttribute(amr0,[("YY",1)],2)
+        att0.alloc()
+        att0.getFieldOn(amr0,"YY").iota(0.01)
+        att0.getFieldOn(amr0[0].getMesh(),"YY").iota(0.02)
+        att0.getFieldOn(amr0[1].getMesh(),"YY").iota(0.03)
+        amr1=MEDCouplingCartesianAMRMesh("mesh",2,[11,11],[0.,0.],[1.,1.])
+        amr1.addPatch([(3,6),(2,7)],[2,2])
+        amr1.addPatch([(6,9),(2,7)],[2,2])
+        att1=att0.projectTo(amr1)
+        self.assertTrue(att1.getFieldOn(amr1,"YY").isEqual(att0.getFieldOn(amr0,"YY"),1e-12))
+        self.assertTrue(att1.getFieldOn(amr1[0].getMesh(),"YY").isEqualWithoutConsideringStr(DataArrayDouble([46.01,46.01,47.01,47.01,48.01,48.01,49.01,49.01,50.01,50.01,46.01,46.01,47.01,47.01,48.01,48.01,49.01,49.01,50.01,50.01,60.01,60.01,24.02,25.02,26.02,27.02,22.03,23.03,64.01,64.01,60.01,60.01,34.02,35.02,36.02,37.02,32.03,33.03,64.01,64.01,74.01,74.01,44.02,45.02,46.02,47.02,42.03,43.03,78.01,78.01,74.01,74.01,54.02,55.02,56.02,57.02,52.03,53.03,78.01,78.01,88.01,88.01,64.02,65.02,66.02,67.02,62.03,63.03,92.01,92.01,88.01,88.01,74.02,75.02,76.02,77.02,72.03,73.03,92.01,92.01,102.01,102.01,84.02,85.02,86.02,87.02,82.03,83.03,106.01,106.01,102.01,102.01,94.02,95.02,96.02,97.02,92.03,93.03,106.01,106.01,116.01,116.01,104.02,105.02,106.02,107.02,102.03,103.03,120.01,120.01,116.01,116.01,114.02,115.02,116.02,117.02,112.03,113.03,120.01,120.01,130.01,130.01,131.01,131.01,132.01,132.01,133.01,133.01,134.01,134.01,130.01,130.01,131.01,131.01,132.01,132.01,133.01,133.01,134.01,134.01]),1e-12))
+        self.assertTrue(att1.getFieldOn(amr1[1].getMesh(),"YY").isEqualWithoutConsideringStr(DataArrayDouble([49.01,49.01,50.01,50.01,51.01,51.01,52.01,52.01,53.01,53.01,49.01,49.01,50.01,50.01,51.01,51.01,52.01,52.01,53.01,53.01,63.01,63.01,24.03,25.03,26.03,27.03,66.01,66.01,67.01,67.01,63.01,63.01,34.03,35.03,36.03,37.03,66.01,66.01,67.01,67.01,77.01,77.01,44.03,45.03,46.03,47.03,80.01,80.01,81.01,81.01,77.01,77.01,54.03,55.03,56.03,57.03,80.01,80.01,81.01,81.01,91.01,91.01,64.03,65.03,66.03,67.03,94.01,94.01,95.01,95.01,91.01,91.01,74.03,75.03,76.03,77.03,94.01,94.01,95.01,95.01,105.01,105.01,84.03,85.03,86.03,87.03,108.01,108.01,109.01,109.01,105.01,105.01,94.03,95.03,96.03,97.03,108.01,108.01,109.01,109.01,119.01,119.01,104.03,105.03,106.03,107.03,122.01,122.01,123.01,123.01,119.01,119.01,114.03,115.03,116.03,117.03,122.01,122.01,123.01,123.01,133.01,133.01,134.01,134.01,135.01,135.01,136.01,136.01,137.01,137.01,133.01,133.01,134.01,134.01,135.01,135.01,136.01,136.01,137.01,137.01]),1e-12))
+        pass
+
+    def testSwig2AMR13(self):
+        """ non regression test"""
+        for fact,len1,len2 in [([2,2],64,48),([3,3],100,70),([4,4],144,96)]:
+            amr=MEDCouplingCartesianAMRMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+            amr.addPatch([(1,3),(0,2)],fact)
+            amr.addPatch([(1,3),(3,4)],fact)
+            att=MEDCouplingAMRAttribute(amr,[("YY",1)],2)
+            att.alloc()
+            att.getFieldOn(amr,"YY").iota(0.1)
+            att.getFieldOn(amr[0].getMesh(),"YY").iota(0.2)
+            att.getFieldOn(amr[1].getMesh(),"YY").iota(0.3)
+            att.synchronizeAllGhostZonesOfDirectChidrenOf(amr)
+            exp=DataArrayDouble(64) ; exp.iota(0.1)
+            self.assertTrue(att.getFieldOn(amr,"YY").isEqualWithoutConsideringStr(exp,1e-12))
+            exp0=DataArrayDouble(len1) ; exp0.iota(0.2)
+            self.assertTrue(att.getFieldOn(amr[0].getMesh(),"YY").isEqualWithoutConsideringStr(exp0,1e-12))
+            exp1=DataArrayDouble(len2) ; exp1.iota(0.3)
+            self.assertTrue(att.getFieldOn(amr[1].getMesh(),"YY").isEqualWithoutConsideringStr(exp1,1e-12))
+            pass
+        pass
+    
+    def testSwig2AMR14(self):
+        """ non regression linked to VTHB write."""
+        fact=[2,2] ; fact2=[3,3]
+        amr=MEDCouplingCartesianAMRMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+        amr.addPatch([(1,3),(0,2)],fact)
+        amr.addPatch([(1,3),(3,4)],fact)
+        amr[0].addPatch([(1,3),(1,3)],fact2)
+        amr[1].addPatch([(1,3),(1,2)],fact2)
+        att=MEDCouplingAMRAttribute(amr,[("YY",1)],2)
+        att.alloc()
+        att.getFieldOn(amr,"YY").iota(0.1)
+        att.getFieldOn(amr[0].getMesh(),"YY").iota(0.2)
+        att.getFieldOn(amr[1].getMesh(),"YY").iota(0.3)
+        att.getFieldOn(amr[0][0].getMesh(),"YY").iota(0.4)
+        att.getFieldOn(amr[1][0].getMesh(),"YY").iota(0.5)
+        self.assertEqual(amr[0].getBLTRRangeRelativeToGF(),[(2,6),(0,4)])
+        self.assertEqual(amr[1].getBLTRRangeRelativeToGF(),[(2,6),(6,8)])
+        self.assertEqual(amr[0][0].getBLTRRangeRelativeToGF(),[(9,15),(3,9)])
+        self.assertEqual(amr[1][0].getBLTRRangeRelativeToGF(),[(9,15),(21,24)])
+        pass
+
+    def testSwig2Intersect2DMeshWith1DLine1(self):
+        """A basic test with no colinearity between m1 and m2."""
+        i=MEDCouplingIMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+        m1=i.buildUnstructured()
+        m2=MEDCouplingUMesh("mesh",1) ; m2.setCoords(DataArrayDouble([0.75,3.5,3.75,1.75],2,2)) ; m2.allocateCells() ; m2.insertNextCell(NORM_SEG2,[0,1])
+        a,b,c,d=MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1,m2,1e-12)
+        self.assertTrue(a.getNodalConnectivity().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,11,10,15,16,4,18,17,22,23,4,19,18,23,24,5,16,15,20,21,31,5,21,22,17,28,31,5,16,31,28,5,17,29,28,5,12,11,16,28,29,5,17,18,30,29,5,13,12,29,30,5,18,19,14,27,30,5,13,30,27,5,9,8,13,27,14])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,25,31,1,31,28,1,28,29,1,29,30,1,30,27,1,27,26])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,45,50,56,62,66,70,76,81,86,92,96,102])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,9,12,15,18])))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(a.getCoords()[:25].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[25:25+2].isEqualWithoutConsideringStr(m2.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[27:].isEqualWithoutConsideringStr(DataArrayDouble([(3.3214285714285716,2.),(1.6071428571428572,3.),(2.,2.7708333333333335),(3.,2.1875),(1.,3.354166666666667)]),1e-12))
+        self.assertTrue(c.isEqual(DataArrayInt([0,1,2,3,4,5,6,8,14,15,12,13,13,9,9,10,10,11,11,7])))
+        self.assertTrue(d.isEqual(DataArrayInt([(10,10),(11,12),(13,14),(15,16),(17,18),(19,19)])))
+        pass
+
+    def testSwig2Intersect2DMeshWith1DLine2(self):
+         """A basic test with colinearity between m1 and m2 and the last cell of m2 outside m1."""
+         i=MEDCouplingIMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+         m1=i.buildUnstructured()
+         m2=MEDCouplingUMesh("mesh",1) ; m2.setCoords(DataArrayDouble([0.5,2.,2.25,2.,2.5,2.,2.75,2.,3.,2.,4.,2.,5.,2.],7,2)) ; m2.allocateCells()
+         for i in xrange(6):
+             m2.insertNextCell(NORM_SEG2,[i,i+1])
+             pass
+         a,b,c,d=MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1,m2,1e-12)
+         self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([4,1,0,5,6,4,2,1,6,7,4,3,2,7,8,4,4,3,8,9,4,16,15,20,21,4,17,16,21,22,4,18,17,22,23,4,19,18,23,24,5,6,5,10,25,11,5,7,6,11,12,5,8,7,12,26,27,28,13,5,9,8,13,14,5,11,25,10,15,16,5,12,11,16,17,5,13,28,27,26,12,17,18,5,14,13,18,19])))
+         self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,46,51,59,64,70,75,83,88])))
+         self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,25,11,1,11,12,1,12,26,1,26,27,1,27,28,1,28,13,1,13,14,1,14,31])))
+         self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24])))
+         self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+         self.assertTrue(a.getCoords()[:25].isEqual(m1.getCoords(),1e-12))
+         self.assertTrue(a.getCoords()[25:].isEqualWithoutConsideringStr(m2.getCoords(),1e-12))
+         self.assertTrue(c.isEqual(DataArrayInt([0,1,2,3,12,13,14,15,4,5,6,7,8,9,10,11])))
+         self.assertTrue(d.isEqual(DataArrayInt([(12,8),(13,9),(14,10),(14,10),(14,10),(14,10),(15,11),(-1,-1)])))
+         pass
+
+    def testSwig2Intersect2DMeshWith1DLine3(self):
+        """m2 fully included in cell #12. of m1"""
+        i=MEDCouplingIMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+        m1=i.buildUnstructured()
+        m2=MEDCouplingUMesh("mesh",1) ; m2.setCoords(DataArrayDouble([(0.75,3.25),(0.5,3.5),(0.25,3.25)])) ; m2.allocateCells()
+        for i in xrange(2):
+            m2.insertNextCell(NORM_SEG2,[i,i+1])
+            pass
+        a,b,c,d=MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1,m2,1e-12)
+        self.assertTrue(a.getNodalConnectivity().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,17,16,21,22,4,18,17,22,23,4,19,18,23,24,5,16,15,20,21])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,25,26,1,26,27])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6])))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(a.getCoords()[:25].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[25:].isEqualWithoutConsideringStr(m2.getCoords(),1e-12))
+        self.assertTrue(c.isEqual(DataArrayInt([0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,12])))
+        self.assertTrue(d.isEqual(DataArrayInt([(15,15),(15,15)])))
+        pass
+
+    def testSwig2Intersect2DMeshWith1DLine4(self):
+        """A special case where an edge is simultaneously a cut and colinear. This tests also checks negative values in descending edges of m1."""
+        i=MEDCouplingIMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+        m1=i.buildUnstructured()
+        part=DataArrayInt([0,1,2,3,4,7,8,11,12,13,14,15])
+        m1_1=m1[part]
+        m1_2=m1[part.buildComplement(m1.getNumberOfCells())]
+        m1=MEDCouplingUMesh.MergeUMeshesOnSameCoords(m1_1,m1_2.buildSpreadZonesWithPoly())
+        m1.zipCoords()
+        m2=MEDCouplingUMesh("mesh",1) ; m2.setCoords(DataArrayDouble([(3.5,2.),(0.5,2.)])) ; m2.allocateCells()
+        m2.insertNextCell(NORM_SEG2,[0,1])
+        a,b,c,d=MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1,m2,1e-12)
+        self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([4,1,0,5,6,4,2,1,6,7,4,3,2,7,8,4,4,3,8,9,4,15,14,19,20,4,16,15,20,21,4,17,16,21,22,4,18,17,22,23,5,6,5,10,25,11,5,9,8,12,24,13,5,11,25,10,14,15,5,13,24,12,17,18,5,8,7,6,11,12,5,15,16,17,12,11])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,46,52,58,64,70,76])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,24,12,1,12,11,1,11,25])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,9])))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(a.getCoords()[:24].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[24:].isEqualWithoutConsideringStr(m2.getCoords(),1e-12))
+        self.assertTrue(c.isEqual(DataArrayInt([0,1,2,3,8,9,10,11,4,5,6,7,12,12])))
+        self.assertTrue(d.isEqual(DataArrayInt([(9,11),(12,13),(8,10)])))
+        pass
+
+    def testSwig2Intersect2DMeshWith1DLine5(self):
+        """A test focusing on a special case for cut."""
+        i=MEDCouplingIMesh("mesh",2,[5,5],[0.,0.],[1.,1.])
+        m1=i.buildUnstructured()
+        m2=MEDCouplingUMesh("mesh",1) ; m2.setCoords(DataArrayDouble([(1.,0.),(3.,2.),(1.,4.)])) ; m2.allocateCells()
+        for i in xrange(2):
+            m2.insertNextCell(NORM_SEG2,[i,i+1])
+            pass
+        a,b,c,d=MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1,m2,1e-12)
+        self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([4,1,0,5,6,4,3,2,7,8,4,4,3,8,9,4,6,5,10,11,4,7,6,11,12,4,9,8,13,14,4,11,10,15,16,4,12,11,16,17,4,14,13,18,19,4,16,15,20,21,4,18,17,22,23,4,19,18,23,24,5,6,7,1,5,2,1,7,5,12,13,7,5,8,7,13,5,12,17,13,5,18,13,17,5,16,21,17,5,22,17,21])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,10,15,20,25,30,35,40,45,50,55,60,64,68,72,76,80,84,88,92])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,1,7,1,7,13,1,13,17,1,17,21])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,9,12])))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(a.getCoords()[:25].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[25:].isEqualWithoutConsideringStr(m2.getCoords(),1e-12))
+        self.assertTrue(c.isEqual(DataArrayInt([0,2,3,4,5,7,8,9,11,12,14,15,1,1,6,6,10,10,13,13])))
+        self.assertTrue(d.isEqual(DataArrayInt([(12,13),(14,15),(16,17),(18,19)])))
+        pass
+
+    def testIntersect2DMeshWith1DLine6(self):
+        """ Basic test for Intersect2DMeshWith1DLine: a vertical line intersecting a square. """
+        m1c = MEDCouplingCMesh()
+        coordX = DataArrayDouble([-1., 1., 2])
+        m1c.setCoordsAt(0,coordX)
+        coordY = DataArrayDouble([0., 2.])
+        m1c.setCoordsAt(1,coordY);
+        m1 = m1c.buildUnstructured()
+
+        # A simple line:
+        m2 = MEDCouplingUMesh("bla", 1)
+        coord2 = DataArrayDouble([0.,-1.0,  0.,1.,  0.,3.,  0.5,2.2], 4, 2)
+        conn2 = DataArrayInt([NORM_SEG2,0,1,NORM_SEG3,1,2,3])
+        connI2 = DataArrayInt([0,3,7])
+        m2.setCoords(coord2)
+        m2.setConnectivity(conn2, connI2)
+
+        # End of construction of input meshes m1bis and m2 -> start of specific part of the test
+        a,b,c,d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1, m2, 1e-10)        
+        self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([4,2,1,4,5,32,0,3,11,7,10,14,15,16,17,18,32,4,1,10,7,11,19,20,21,22,23])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,16,27])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,6,10,1,10,7,2,7,11,12,2,11,8,13])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,10,14])))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(a.getCoords()[:6].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[6:10].isEqual(m2.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[10:].isEqual(DataArrayDouble([(0.,0.),(0.5164175471673584,2.),(0.3796918047064557,1.43726403104512),(0.3796918047064557,2.56273596895488),(-1.,1.),(-0.24179122641632078,2.),(0.3796918047064558,1.4372640310451201),(0.,0.5),(-0.5,0.),(1.,1.),(0.5,0.),(0.,0.5),(0.3796918047064558,1.4372640310451201),(0.7582087735836792,2.)]),1e-12))
+        self.assertTrue(c.isEqual(DataArrayInt([1,0,0])))
+        self.assertTrue(d.isEqual(DataArrayInt([(-1,-1),(1,2),(1,2),(-1,-1)])))
+        pass
+
+    def testSwig2Intersect2DMeshWith1DLine7(self):
+        """ Star pattern (a triangle intersecting another one upside down) """
+        coords1 = DataArrayDouble([-2.,1.,   2.,1.,  0.,-2.], 3,2)
+        coords2 = DataArrayDouble([0.,2.,   2.,-1.,  -2.,-1.,  0.,3.], 4,2)
+        m1 = MEDCouplingUMesh("triangle", 2)
+        m2 = MEDCouplingUMesh("tri_line", 1)
+        m1.setCoords(coords1)
+        m2.setCoords(coords2)
+        m1.setConnectivity(DataArrayInt([NORM_TRI3, 0,1,2]), DataArrayInt([0,4]))
+        m2.setConnectivity(DataArrayInt([NORM_SEG2,0,1,NORM_SEG2,1,2,NORM_SEG2,2,3]), DataArrayInt([0,3,6,9]))
+    # End of construction of input meshes m1bis and m2 -> start of specific part of the test
+        a,b,c,d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1, m2, 1e-10)
+        self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([5,1,9,7,5,2,11,10,5,0,8,12,5,7,9,10,11,12,8])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,4,8,12,19])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,3,7,1,7,9,1,9,4,1,4,10,1,10,11,1,11,5,1,5,12,1,12,8,1,8,6])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24,27])))
+        self.assertTrue(a.getCoords()[:3].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[3:7].isEqual(m2.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[7:].isEqual(DataArrayDouble([(0.6666666666666666,1.),(-1.,1.),(1.3333333333333333,1.1102230246251565e-16),(0.6666666666666665,-0.9999999999999996),(-0.6666666666666667,-1.),(-1.4285714285714284,0.14285714285714302)]),1e-12))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(c.isEqual(DataArrayInt([0,0,0,0])))
+        self.assertTrue(d.isEqual(DataArrayInt([(-1,-1),(0,3),(-1,-1),(-1,-1),(1,3),(-1,-1),(-1,-1),(2,3),(-1,-1)])))
+        pass
+    
+    def testSwig2Intersect2DMeshWith1DLine8(self):
+        """ Line pieces ending (or fully located) in the middle of a cell """
+        m1c = MEDCouplingCMesh()
+        m1c.setCoordsAt(0,DataArrayDouble([-1., 1.]))
+        m1c.setCoordsAt(1,DataArrayDouble([-1., 1.]));
+        m1 = m1c.buildUnstructured()
+        coords2 = DataArrayDouble([0.,0.,  0.,1.5, -1.5,0.,  0.5,0.0,  0.0,-0.5, 1.1,-0.6], 6,2)
+        m2 = MEDCouplingUMesh("piecewise_line", 1)
+        m2.setCoords(coords2)
+        c = DataArrayInt([NORM_SEG2,2,1, NORM_SEG2,1,4, NORM_SEG2,4,3,  NORM_SEG2,3,5])
+        cI = DataArrayInt([0,3,6,9,12])
+        m2.setConnectivity(c, cI)
+        a,b,c,d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1, m2, 1e-10)
+        self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([5,2,11,10,5,3,13,7,8,12,5,1,0,10,11,12,8,7,13])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,4,10,19])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,6,10,1,10,11,1,11,5,1,5,12,1,12,8,1,8,7,1,7,13,1,13,9])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24])))
+        self.assertTrue(a.getCoords()[:4].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[4:10].isEqual(m2.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[10:].isEqual(DataArrayDouble([(-1.,0.5),(-0.5,1.),(0.,1.),(1.,-0.5)]),1e-12))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(c.isEqual(DataArrayInt([0,0,0])))
+        self.assertTrue(d.isEqual(DataArrayInt([(-1,-1),(0,2),(-1,-1),(-1,-1),(1,2),(1,2),(1,2),(-1,-1)])))
+        pass
+
+    def testSwig2Intersect2DMeshWith1DLine9(self):
+        """ Intersection with a line whose connectivity is not consecutive """
+        m1c = MEDCouplingCMesh()
+        coordX = DataArrayDouble([-1., 1., 2])
+        m1c.setCoordsAt(0,coordX)
+        coordY = DataArrayDouble([0., 2.])
+        m1c.setCoordsAt(1,coordY);
+        m1 = m1c.buildUnstructured()
+        # A simple line:
+        m2 = MEDCouplingUMesh("bla", 1)
+        coord2 = DataArrayDouble([0.,1.5,  0.5,1.,  0.0,0.5,  0.0,3.0,  0.0,-1.0], 5, 2)
+        conn2 = DataArrayInt([NORM_SEG2,3,0,NORM_SEG3,0,2,1,NORM_SEG2,2,4])
+        connI2 = DataArrayInt([0,3,7,10])
+        m2.setCoords(coord2)
+        m2.setConnectivity(conn2, connI2)
+        # End of construction of input meshes m1bis and m2 -> start of specific part of the test
+        a,b,c,d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m1, m2, 1e-10)
+        self.assertTrue(a.getNodalConnectivity().isEqual(DataArrayInt([4,2,1,4,5,32,4,1,11,8,6,12,14,15,16,17,18,19,32,0,3,12,6,8,11,20,21,22,23,24,25])))
+        self.assertTrue(a.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,18,31])))
+        self.assertTrue(b.getNodalConnectivity().isEqual(DataArrayInt([1,9,12,1,12,6,2,6,8,13,1,8,11,1,11,10])))
+        self.assertTrue(b.getNodalConnectivityIndex().isEqual(DataArrayInt([0,3,6,10,13,16])))
+        self.assertTrue(a.getCoords()[:6].isEqual(m1.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[6:11].isEqual(m2.getCoords(),1e-12))
+        self.assertTrue(a.getCoords()[11:].isEqual(DataArrayDouble([(0.,0.),(0.,2.),(0.5,1.),(1.,1.),(0.5,0.),(0.,0.25),(0.5,1.),(0.,1.75),(0.5,2.),(-1.,1.),(-0.5,2.),(0.,1.75),(0.5,1.),(0.,0.25),(-0.5,0.)]),1e-12))
+        self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
+        self.assertTrue(c.isEqual(DataArrayInt([1,0,0])))
+        self.assertTrue(d.isEqual(DataArrayInt([(-1,-1),(1,2),(1,2),(1,2),(-1,-1)])))
+        pass
+
+    def testOrderConsecutiveCells1D1(self):
+        """A line in several unconnected pieces:"""
+        m2 = MEDCouplingUMesh.New("bla", 1)
+        c = DataArrayInt([NORM_SEG2,0,1,NORM_SEG3,1,3,2, NORM_SEG2,3,4,
+                               NORM_SEG3,5,7,6, NORM_SEG3,7,9,8, NORM_SEG2,9,10,
+                               NORM_SEG2,11,12,NORM_SEG2,12,13,
+                               NORM_SEG2,14,15])
+        cI = DataArrayInt([0,3,7,10,14,18,21,24,27,30])
+        coords2 = DataArrayDouble([float(i) for i in range(32)], 16,2)
+        m2.setCoords(coords2);
+        m2.setConnectivity(c, cI);
+        m2.checkCoherency2(1.0e-8);
+      
+        # Shuffle a bit :-)
+        m2.renumberCells(DataArrayInt([0,3,6,8,1,4,7,5,2]), True);
+        res = m2.orderConsecutiveCells1D()
+        expRes = [0,3,6,8,1,4,2,7,5]
+        self.assertEqual(m2.getNumberOfCells(),res.getNumberOfTuples())
+        self.assertEqual(expRes, res.getValues())
+      
+        # A closed line (should also work)
+        m3 = MEDCouplingUMesh.New("bla3", 1)
+        conn3A = DataArrayInt([NORM_SEG2,0,1,NORM_SEG3,1,3,2, NORM_SEG2,3,0])
+        coord3 = coords2[0:5]
+        c.reAlloc(10)
+        cI.reAlloc(4)
+        
+        m3.setCoords(coord3)
+        m3.setConnectivity(conn3A, cI)
+        m3.checkCoherency2(1.0e-8)
+        res2 = m3.orderConsecutiveCells1D()
+        expRes2 = [0,1,2]
+        self.assertEqual(m3.getNumberOfCells(),res2.getNumberOfTuples())
+        self.assertEqual(expRes2, res2.getValues())
+        pass
+
+    def testDADApplyFuncOnThis1(self):
+        d=DataArrayDouble(5) ; d.iota(0.)
+        d.applyFuncOnThis("2*x+1")
+        self.assertTrue(d.isEqual(DataArrayDouble([1.,3.,5.,7.,9.]),1e-12))
+        d=DataArrayDouble(6) ; d.iota(0.) ; d.rearrange(2)
+        d.applyFuncOnThis("2*x+1")
+        self.assertTrue(d.isEqual(DataArrayDouble([1.,3.,5.,7.,9.,11.],3,2),1e-12))
+        d.applyFuncOnThis("1+2*3")
+        self.assertTrue(d.isEqual(DataArrayDouble([(7.,7.),(7.,7.),(7.,7.)]),1e-12))
+        pass
+
+    def testSwig2PointSetComputeFetchedNodeIds1(self):
+        arr=DataArrayDouble(6) ; arr.iota()
+        m=MEDCouplingCMesh() ; m.setCoords(arr,arr,arr)
+        m=m.buildUnstructured()
+        m0=m[[0,1,5,6,25,26,30,31,124]]
+        ref=DataArrayInt([0,1,2,6,7,8,12,13,14,36,37,38,42,43,44,48,49,50,72,73,74,78,79,80,84,85,86,172,173,178,179,208,209,214,215])
+        self.assertTrue(m0.computeFetchedNodeIds().isEqual(ref))
+        self.assertTrue(MEDCoupling1SGTUMesh(m0).computeFetchedNodeIds().isEqual(ref))
+        self.assertEqual(m0.getAllGeoTypes(),[NORM_HEXA8])
+        m0.convertAllToPoly()
+        self.assertEqual(m0.getAllGeoTypes(),[NORM_POLYHED])
+        self.assertTrue(MEDCoupling1DGTUMesh(m0).computeFetchedNodeIds().isEqual(ref))
+        pass
+
+    def testSwig2PartDefinition1(self):
+        pd=PartDefinition.New(5,22,3)
+        self.assertTrue(isinstance(pd,SlicePartDefinition))
+        self.assertTrue(pd.toDAI().isEqual(DataArrayInt([5,8,11,14,17,20])))
+        self.assertEqual(pd.getNumberOfElems(),6)
+        self.assertEqual(pd.getEffectiveStop(),23)
+        pd=PartDefinition.New(5,23,3)
+        self.assertTrue(isinstance(pd,SlicePartDefinition))
+        self.assertTrue(pd.toDAI().isEqual(DataArrayInt([5,8,11,14,17,20])))
+        self.assertEqual(pd.getNumberOfElems(),6)
+        self.assertEqual(pd.getEffectiveStop(),23)
+        self.assertEqual(pd.getSlice(),slice(5,23,3))
+        pd=PartDefinition.New(5,22,1)
+        self.assertTrue(isinstance(pd,SlicePartDefinition))
+        self.assertTrue(pd.toDAI().isEqual(DataArrayInt([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])))
+        self.assertEqual(pd.getNumberOfElems(),17)
+        self.assertEqual(pd.getEffectiveStop(),22)
+        pd=PartDefinition.New(5,23,3)+PartDefinition.New(23,27,3)
+        self.assertTrue(isinstance(pd,SlicePartDefinition))
+        self.assertEqual(pd.getNumberOfElems(),8)
+        self.assertTrue(pd.toDAI().isEqual(DataArrayInt([5,8,11,14,17,20,23,26])))
+        self.assertEqual(pd.getEffectiveStop(),29)
+        pd=SlicePartDefinition(5,22,1)
+        self.assertTrue(isinstance(pd,SlicePartDefinition))
+        self.assertTrue(pd.toDAI().isEqual(DataArrayInt([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])))
+        self.assertEqual(pd.getNumberOfElems(),17)
+        self.assertEqual(pd.getEffectiveStop(),22)
+        d=DataArrayInt([2,4,5,6,10])
+        pd=PartDefinition.New(d)
+        self.assertTrue(isinstance(pd,DataArrayPartDefinition))
+        self.assertEqual(pd.toDAI().getHiddenCppPointer(),d.getHiddenCppPointer())
+        pd=DataArrayPartDefinition(d)
+        self.assertEqual(pd.toDAI().getHiddenCppPointer(),d.getHiddenCppPointer())
+        pd=DataArrayPartDefinition(d)+DataArrayPartDefinition(DataArrayInt([12,14,20]))
+        self.assertTrue(isinstance(pd,DataArrayPartDefinition))
+        self.assertEqual(pd.getNumberOfElems(),8)
+        self.assertTrue(pd.toDAI().isEqual(DataArrayInt([2,4,5,6,10,12,14,20])))
+        pass
+
     pass
 
 if __name__ == '__main__':