Salome HOME
Intersection: renaming some variables and refactor to make the algo easier to read.
[tools/medcoupling.git] / doc / tutorial / medcoupling_dataarray1_en.rst
index 841627062e52461abfde524b231cd80857d7a28d..befd97778c054c5660668a4f28f6bf93e3e90b53 100644 (file)
@@ -122,7 +122,7 @@ Create the len(translationToPerform) copies of d and apply the corresponding tra
 
 An alternative (and more compact) way to do it : ::
 
-        ds=[d.deepCpy() for i in xrange(len(translationToPerform))]
+        ds=[d.deepCopy() for i in xrange(len(translationToPerform))]
         for (elt,t) in zip(ds,translationToPerform) : elt+=t
 
 Aggregating DataArrayDouble
@@ -190,10 +190,10 @@ This storage method takes the form of a DataArrayInt 'o2n' made of Card(X) tuple
 
 The format 'old-2-new' is systematically used for all renumbering operations (one-to-one correspondence).
 
-The static method DataArrayInt.BuildOld2NewArrayFromSurjectiveFormat2() performs the conversion from one storage mode to the other (c, cI to o2n).
+The static method DataArrayInt.ConvertIndexArrayToO2N() performs the conversion from one storage mode to the other (c, cI to o2n).
 We get for free the number of elements in Y, i.e. the variable newNbOfTuples. ::
 
-       o2n,newNbOfTuples=DataArrayInt.BuildOld2NewArrayFromSurjectiveFormat2(oldNbOfTuples,c,cI)
+       o2n,newNbOfTuples=DataArrayInt.ConvertIndexArrayToO2N(oldNbOfTuples,c,cI)
        print "Have I got the right result? %s"%(str(myNewNbOfTuples==newNbOfTuples))
 
 Using o2n and newNbOfTuples invoke DataArrayDouble.renumberAndReduce() on d2. ::
@@ -237,16 +237,13 @@ Now allocate the number of cells with an upper bound of the actual number of cel
 
 Finally thanks to o2n we know the connectivity of all 7 hexagons using the coordinates stored in d3.
 
-Do not forget to invoke MEDCouplingUMesh.finishInsertingCells() (this last bit should disappear after the release 6.6) ::
-
        for i in xrange(7):
          m.insertNextCell(NORM_POLYGON,o2n[6*i:6*(i+1)].getValues())
          pass
-       m.finishInsertingCells()
 
 Check that m is coherent. ::
 
-        m.checkCoherency()
+        m.checkConsistencyLight()
 
 To visually check m, write it in a VTU file ("My7hexagons.vtu") and display it in ParaVis. ::