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();
}
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};
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};