]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
modification of API of MEDCouplingPointSet::findBoundaryNodes
authorageay <ageay>
Thu, 14 Jun 2012 13:54:10 +0000 (13:54 +0000)
committerageay <ageay>
Thu, 14 Jun 2012 13:54:10 +0000 (13:54 +0000)
src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx

index ba6ae4027a6521945d4dc6f86f06857958e44a76..12769a45c587882235cd7a5e7be2e8a167299b12 100644 (file)
@@ -545,11 +545,12 @@ void MEDCouplingBasicsTest1::testDescConn3D()
 void MEDCouplingBasicsTest1::testFindBoundaryNodes()
 {
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
-  std::vector<int> boundaryNodes;
-  mesh->findBoundaryNodes(boundaryNodes);
-  CPPUNIT_ASSERT_EQUAL(26,(int)boundaryNodes.size());
+  DataArrayInt *boundaryNodes=mesh->findBoundaryNodes();
+  CPPUNIT_ASSERT_EQUAL(26,boundaryNodes->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,boundaryNodes->getNumberOfComponents());
   const int expected1[26]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26};
-  CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes.begin()));
+  CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes->begin()));
+  boundaryNodes->decrRef();
   mesh->decrRef();
 }
 
index c5cb3096715954edc5bfdd90f121aee535ea0a0e..a9d8b8759d75243642e7773e121f0adc143b90d7 100644 (file)
@@ -1046,7 +1046,7 @@ void MEDCouplingBasicsTest3::testDAIGetIdsEqualList1()
   std::copy(tab1,tab1+7,da->getPointer());
   const int tab2[3]={3,-2,0};
   std::vector<int> tab2V(tab2,tab2+3);
-  DataArrayInt *da2=da->getIdsEqualList(tab2V);
+  DataArrayInt *da2=da->getIdsEqualList(&tab2V[0],&tab2V[0]+tab2V.size());
   CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
   const int expected1[4]={1,3,4,6};
index d412fde11601ceeb25b6347c71e09d71f9567395..be97db389b240d60adda3b2eaa98407f3fd13094 100644 (file)
@@ -779,7 +779,7 @@ void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1()
   const int vals2[3]={-4,5,6};
   std::vector<int> vals3(vals2,vals2+3);
   d->rearrange(1);
-  DataArrayInt *d3=d->getIdsNotEqualList(vals3);
+  DataArrayInt *d3=d->getIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size());
   CPPUNIT_ASSERT_EQUAL(5,d3->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,d3->getNumberOfComponents());
   const int expected2[5]={0,1,4,8,9};