X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingPointSet.cxx;h=e3cbda93fe3d8da4024bb09b91a14b6ee5005042;hb=3567980cd75ceaee7a18ef3638310804c0e09e7c;hp=27ce1b93b0c1dccf1c6ac5daa8b63e6480c4bb8b;hpb=e12fb386987c1baaf3ab44b946e87a7043fa95df;p=modules%2Fmed.git diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index 27ce1b93b..e3cbda93f 100644 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -80,11 +80,10 @@ std::size_t MEDCouplingPointSet::getHeapMemorySizeWithoutChildren() const return MEDCouplingMesh::getHeapMemorySizeWithoutChildren(); } -std::vector MEDCouplingPointSet::getDirectChildren() const +std::vector MEDCouplingPointSet::getDirectChildrenWithNull() const { std::vector ret; - if(_coords) - ret.push_back(_coords); + ret.push_back(_coords); return ret; } @@ -1460,7 +1459,7 @@ void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int int oldNbOfNodes=getNumberOfNodes(); MEDCouplingAutoRefCountObjectPtr da=m->buildPermArrayForMergeNode(prec,oldNbOfNodes,areNodesMerged,newNbOfNodes); //mergeNodes - if(!areNodesMerged) + if(!areNodesMerged && oldNbOfNodes != 0) throw INTERP_KERNEL::Exception("checkDeepEquivalWith : Nodes are incompatible ! "); const int *pt=std::find_if(da->getConstPointer()+oldNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater(),oldNbOfNodes-1)); if(pt!=da->getConstPointer()+da->getNbOfElems()) @@ -1474,11 +1473,10 @@ void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int int nbCells=getNumberOfCells(); if (nbCells != other->getNumberOfCells()) throw INTERP_KERNEL::Exception("checkDeepEquivalWith : some cells in other are not in this !"); - int maxId=-1; - int dan = da->getNumberOfTuples(); + int dan(da->getNumberOfTuples()); if (dan) { - MEDCouplingAutoRefCountObjectPtr da1 = DataArrayInt::New(), da2 = DataArrayInt::New(); + MEDCouplingAutoRefCountObjectPtr da1(DataArrayInt::New()),da2(DataArrayInt::New()); da1->alloc(dan/2,1); da2->alloc(dan/2,1); std::copy(da->getConstPointer(), da->getConstPointer()+dan/2, da1->getPointer()); std::copy(da->getConstPointer()+dan/2, da->getConstPointer()+dan, da2->getPointer());