]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Tue, 7 Dec 2010 07:52:03 +0000 (07:52 +0000)
committerageay <ageay>
Tue, 7 Dec 2010 07:52:03 +0000 (07:52 +0000)
src/MEDCoupling/MEDCouplingCMesh.cxx
src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
src/MEDCoupling/MEDCouplingFieldDiscretization.cxx
src/MEDCoupling/MEDCouplingMemArray.cxx
src/MEDCoupling/MEDCouplingMemArray.hxx
src/MEDCoupling/MEDCouplingUMesh.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx
src/MEDCoupling_Swig/MEDCoupling.i
src/MEDCoupling_Swig/MEDCouplingBasicsTest.py

index 7b3141077e42dd0bb4dc494924cf7b042051156d..9ec8bec952fbd9703780ff7760b44e96bb11b184 100644 (file)
@@ -37,11 +37,11 @@ MEDCouplingCMesh::MEDCouplingCMesh(const MEDCouplingCMesh& other, bool deepCpy):
   if(deepCpy)
     {
       if(other._x_array)
-        _x_array=_x_array->deepCopy();
+        _x_array=_x_array->deepCpy();
       if(other._y_array)
-        _y_array=_y_array->deepCopy();
+        _y_array=_y_array->deepCpy();
       if(other._z_array)
-        _z_array=_z_array->deepCopy();
+        _z_array=_z_array->deepCpy();
     }
   else
     {
index 385977e011b9381da31dbc6eb4a114e7599609a6..dc58eb215caae21a71647a5d733dd2e657390c7b 100644 (file)
@@ -104,7 +104,7 @@ MEDCouplingExtrudedMesh::MEDCouplingExtrudedMesh(const MEDCouplingExtrudedMesh&
     {
       _mesh2D=other._mesh2D->clone(true);
       _mesh1D=other._mesh1D->clone(true);
-      _mesh3D_ids=other._mesh3D_ids->deepCopy();
+      _mesh3D_ids=other._mesh3D_ids->deepCpy();
     }
   else
     {
index e5ad06173e7aeb7237f5eca79db95e789ab8c0a7..d5c1a1e8c4d0ac6570fc9ac5f3bf5be45cc81301 100644 (file)
@@ -259,7 +259,7 @@ void MEDCouplingFieldDiscretization::renumberEntitiesFromO2NArr(const int *old2N
   int oldNbOfElems=arr->getNumberOfTuples();
   int nbOfComp=arr->getNumberOfComponents();
   int newNbOfTuples=(*std::max_element(old2NewPtr,old2NewPtr+oldNbOfElems))+1;
-  DataArrayDouble *arrCpy=arr->deepCopy();
+  DataArrayDouble *arrCpy=arr->deepCpy();
   const double *ptSrc=arrCpy->getConstPointer();
   arr->reAlloc(newNbOfTuples);
   double *ptToFill=arr->getPointer();
@@ -291,7 +291,7 @@ void MEDCouplingFieldDiscretization::renumberEntitiesFromO2NArr(const int *old2N
 void MEDCouplingFieldDiscretization::renumberEntitiesFromN2OArr(const int *new2OldPtr, int new2OldSz, DataArrayDouble *arr, const char *msg)
 {
   int nbOfComp=arr->getNumberOfComponents();
-  DataArrayDouble *arrCpy=arr->deepCopy();
+  DataArrayDouble *arrCpy=arr->deepCpy();
   const double *ptSrc=arrCpy->getConstPointer();
   arr->reAlloc(new2OldSz);
   double *ptToFill=arr->getPointer();
@@ -586,7 +586,7 @@ MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(con
 {
   DataArrayInt *arr=other._discr_per_cell;
   if(arr)
-    _discr_per_cell=arr->deepCopy();
+    _discr_per_cell=arr->deepCpy();
 }
 
 void MEDCouplingFieldDiscretizationPerCell::updateTime()
index 3d916ed2ec17d48b38fc1a43c0d673097982dd5a..581b898633c89cb64d953cdcd7610d293e4fca59 100644 (file)
@@ -131,20 +131,15 @@ void DataArrayDouble::checkAllocated() const throw(INTERP_KERNEL::Exception)
     throw INTERP_KERNEL::Exception("DataArrayDouble::checkAllocated : Array is defined but not allocated ! Call alloc or setValues method first !");
 }
 
-DataArrayDouble *DataArrayDouble::deepCopy() const
-{
-  return new DataArrayDouble(*this);
-}
-
 DataArrayDouble *DataArrayDouble::deepCpy() const
 {
   return new DataArrayDouble(*this);
 }
 
-DataArrayDouble *DataArrayDouble::performCpy(bool deepCpy) const
+DataArrayDouble *DataArrayDouble::performCpy(bool dCpy) const
 {
-  if(deepCpy)
-    return deepCopy();
+  if(dCpy)
+    return deepCpy();
   else
     {
       incrRef();
@@ -1405,20 +1400,15 @@ void DataArrayInt::checkAllocated() const throw(INTERP_KERNEL::Exception)
     throw INTERP_KERNEL::Exception("DataArrayInt::checkAllocated : Array is defined but not allocated ! Call alloc or setValues method first !");
 }
 
-DataArrayInt *DataArrayInt::deepCopy() const
-{
-  return new DataArrayInt(*this);
-}
-
 DataArrayInt *DataArrayInt::deepCpy() const
 {
   return new DataArrayInt(*this);
 }
 
-DataArrayInt *DataArrayInt::performCpy(bool deepCpy) const
+DataArrayInt *DataArrayInt::performCpy(bool dCpy) const
 {
-  if(deepCpy)
-    return deepCopy();
+  if(dCpy)
+    return deepCpy();
   else
     {
       incrRef();
index 75d1feef24a0526ec363ca318a69fd192cff4d4a..197b7897416143524d8d7f381646138b4f533b22 100644 (file)
@@ -118,7 +118,6 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT static DataArrayDouble *New();
     MEDCOUPLING_EXPORT bool isAllocated() const;
     MEDCOUPLING_EXPORT void checkAllocated() const throw(INTERP_KERNEL::Exception);
-    MEDCOUPLING_EXPORT DataArrayDouble *deepCopy() const;
     MEDCOUPLING_EXPORT DataArrayDouble *deepCpy() const;
     MEDCOUPLING_EXPORT DataArrayDouble *performCpy(bool deepCpy) const;
     MEDCOUPLING_EXPORT void alloc(int nbOfTuple, int nbOfCompo);
@@ -216,7 +215,6 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT static DataArrayInt *New();
     MEDCOUPLING_EXPORT bool isAllocated() const;
     MEDCOUPLING_EXPORT void checkAllocated() const throw(INTERP_KERNEL::Exception);
-    MEDCOUPLING_EXPORT DataArrayInt *deepCopy() const;
     MEDCOUPLING_EXPORT DataArrayInt *deepCpy() const;
     MEDCOUPLING_EXPORT DataArrayInt *performCpy(bool deepCpy) const;
     MEDCOUPLING_EXPORT void alloc(int nbOfTuple, int nbOfCompo);
index b4b80c5e5c4c855ad733ee6f78ac7e4033f95b8c..868292722439abf45997b191d61b0a78b5456412 100644 (file)
@@ -2172,7 +2172,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D(con
   double *retPtr=ret->getPointer();
   retPtr=std::copy(getCoords()->getConstPointer(),getCoords()->getConstPointer()+getCoords()->getNbOfElems(),retPtr);
   MEDCouplingUMesh *tmp=MEDCouplingUMesh::New();
-  DataArrayDouble *tmp2=getCoords()->deepCopy();
+  DataArrayDouble *tmp2=getCoords()->deepCpy();
   tmp->setCoords(tmp2);
   tmp2->decrRef();
   const double *coo1D=mesh1D->getCoords()->getConstPointer();
@@ -2218,7 +2218,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D(con
   double *retPtr=ret->getPointer();
   retPtr=std::copy(getCoords()->getConstPointer(),getCoords()->getConstPointer()+getCoords()->getNbOfElems(),retPtr);
   MEDCouplingUMesh *tmp=MEDCouplingUMesh::New();
-  DataArrayDouble *tmp2=getCoords()->deepCopy();
+  DataArrayDouble *tmp2=getCoords()->deepCpy();
   tmp->setCoords(tmp2);
   tmp2->decrRef();
   const double *coo1D=mesh1D->getCoords()->getConstPointer();
index ffa8b6a759498ef924fac8840ceadbf820047f5f..5dd1c85d75c138eb658c8e0c78abb213642912cc 100644 (file)
@@ -325,7 +325,7 @@ void MEDCouplingBasicsTest::testDeepCopy()
   std::fill(array->getPointer(),array->getPointer()+5*3,7.);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,array->getIJ(3,2),1e-14);
   double *tmp1=array->getPointer();
-  DataArrayDouble *array2=array->deepCopy();
+  DataArrayDouble *array2=array->deepCpy();
   double *tmp2=array2->getPointer();
   CPPUNIT_ASSERT(tmp1!=tmp2);
   array->decrRef();
@@ -337,7 +337,7 @@ void MEDCouplingBasicsTest::testDeepCopy()
   std::fill(array3->getPointer(),array3->getPointer()+5*3,17);
   CPPUNIT_ASSERT_EQUAL(17,array3->getIJ(3,2));
   int *tmp3=array3->getPointer();
-  DataArrayInt *array4=array3->deepCopy();
+  DataArrayInt *array4=array3->deepCpy();
   int *tmp4=array4->getPointer();
   CPPUNIT_ASSERT(tmp3!=tmp4);
   array3->decrRef();
@@ -873,7 +873,7 @@ void MEDCouplingBasicsTest::testEqualFieldDouble()
   CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15));
   CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15));
   //
-  DataArrayDouble *arr2=arr->deepCopy();
+  DataArrayDouble *arr2=arr->deepCpy();
   fieldOnCells2->setArray(arr2);
   arr2->decrRef();
   CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15));
index 8e1e4fb01d878d33055ba726ad9ab6a1f54acd1a..883f79f8c8957dfe7527d88d191fb260ae45fa79 100644 (file)
@@ -902,7 +902,7 @@ void MEDCouplingBasicsTest::testCopyTinyStringsFromOnFields()
   a1->fillWithZero();
   a1->setInfoOnComponent(0,"c");
   a1->setInfoOnComponent(1,"d");
-  DataArrayDouble *a2=a1->deepCopy();
+  DataArrayDouble *a2=a1->deepCpy();
   a2->setInfoOnComponent(0,"e");
   a2->setInfoOnComponent(1,"f");
   f->setArray(a1);
index 7e742e5e61e956fafc3d72dcd4c3c9581199588d..a6060feddeb5f25355259b8f7b9258f08e67ee72 100644 (file)
@@ -93,7 +93,6 @@ using namespace INTERP_KERNEL;
 %newobject ParaMEDMEM::MEDCouplingFieldDouble::buildNewTimeReprFromThis;
 %newobject ParaMEDMEM::DataArrayInt::New;
 %newobject ParaMEDMEM::DataArrayInt::convertToDblArr;
-%newobject ParaMEDMEM::DataArrayInt::deepCopy;
 %newobject ParaMEDMEM::DataArrayInt::deepCpy;
 %newobject ParaMEDMEM::DataArrayInt::performCpy;
 %newobject ParaMEDMEM::DataArrayInt::substr;
@@ -113,7 +112,6 @@ using namespace INTERP_KERNEL;
 %newobject ParaMEDMEM::DataArrayInt::toNoInterlace;
 %newobject ParaMEDMEM::DataArrayDouble::New;
 %newobject ParaMEDMEM::DataArrayDouble::convertToIntArr;
-%newobject ParaMEDMEM::DataArrayDouble::deepCopy;
 %newobject ParaMEDMEM::DataArrayDouble::deepCpy;
 %newobject ParaMEDMEM::DataArrayDouble::performCpy;
 %newobject ParaMEDMEM::DataArrayDouble::aggregate;
index a59297b615db9f33017d91399e1845e040e02f83..a8b023fa30c0b7a11fc12a1633d9853d3d269bb3 100644 (file)
@@ -182,13 +182,13 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         array=DataArrayDouble.New();
         array.setValues(5*3*[7.],5,3);
         self.assertEqual(array.getIJ(3,2),7.);
-        array2=array.deepCopy();
+        array2=array.deepCpy();
         self.assertEqual(array2.getIJ(3,2),7.)
         #
         array3=DataArrayInt.New();
         array3.setValues(5*3*[17],5,3);
         self.assertEqual(array3.getIJ(3,2),17);
-        array4=array3.deepCopy();
+        array4=array3.deepCpy();
         self.assertEqual(array4.getIJ(3,2),17);
         pass
     def testRevNodal(self):
@@ -594,7 +594,7 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         self.assertTrue(fieldOnCells1.isEqual(fieldOnCells2,1e-12,1e-15));
         self.assertTrue(fieldOnCells2.isEqual(fieldOnCells1,1e-12,1e-15));
         #
-        arr2=arr.deepCopy();
+        arr2=arr.deepCpy();
         fieldOnCells2.setArray(arr2);
         self.assertTrue(fieldOnCells1.isEqual(fieldOnCells2,1e-12,1e-15));
         self.assertTrue(fieldOnCells2.isEqual(fieldOnCells1,1e-12,1e-15));
@@ -2485,7 +2485,7 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         a1.fillWithZero();
         a1.setInfoOnComponent(0,"c");
         a1.setInfoOnComponent(1,"d");
-        a2=a1.deepCopy();
+        a2=a1.deepCpy();
         a2.setInfoOnComponent(0,"e");
         a2.setInfoOnComponent(1,"f");
         f.setArray(a1);