X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingPointSet.cxx;h=9ef4f9a76e0c818bafb762fbb0fc41f6f49b74b3;hb=e7a9d4f59978fd384ee98db1dfdd5ec2118331ca;hp=80be8194141da28c8d467ca3b137c0f7566d36d3;hpb=f7fdff591a1830181499ba95e16ef25eb43e0140;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index 80be81941..9ef4f9a76 100755 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -217,7 +217,7 @@ bool MEDCouplingPointSet::areCoordsEqualWithoutConsideringStr(const MEDCouplingP /*! * Returns coordinates of \a nodeId-th node. * \param [in] nodeId - the ID of the node of interest. - * \param [in, out] coo - the array filled with coordinates of the \a nodeId-th + * \param [in,out] coo - the array filled with coordinates of the \a nodeId-th * node. This array is not cleared before filling in, the coordinates are * appended to its end. * \throw If the coordinates array is not set. @@ -370,7 +370,8 @@ void MEDCouplingPointSet::getNodeIdsNearPoints(const double *pos, mcIdType nbOfP /*! * @param comm in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect). - * @param commI in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect). + * @param commIndex in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect). + * @param newNbOfNodes new number of nodes * @return the old to new correspondence array. */ DataArrayIdType *MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex, @@ -444,7 +445,7 @@ void MEDCouplingPointSet::renumberNodesCenter(const mcIdType *newNodeNumbers, mc div[newNodeNumbers[i]]++; } for(mcIdType i=0;i(),1./(double)div[i])); + ptToFill=std::transform(ptToFill,ptToFill+spaceDim,ptToFill,std::bind(std::multiplies(),std::placeholders::_1,1./(double)div[i])); setCoords(newCoords); newCoords->decrRef(); renumberNodesInConn(newNodeNumbers); @@ -608,7 +609,7 @@ void MEDCouplingPointSet::scale(const double *point, double factor) for(mcIdType i=0;i()); - std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind2nd(std::multiplies(),factor)); + std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind(std::multiplies(),std::placeholders::_1,factor)); std::transform(coords+i*dim,coords+(i+1)*dim,point,coords+i*dim,std::plus()); } _coords->declareAsNew(); @@ -1220,7 +1221,7 @@ bool MEDCouplingPointSet::areCellsFrom2MeshEqual(const MEDCouplingPointSet *othe getCoordinatesOfNode(c1[0],n1); other->getCoordinatesOfNode(c2[0],n2); std::transform(n1.begin(),n1.end(),n2.begin(),n1.begin(),std::minus()); - std::transform(n1.begin(),n1.end(),n1.begin(),std::ptr_fun(fabs)); + std::transform(n1.begin(),n1.end(),n1.begin(),[](double c){return fabs(c);}); if(*std::max_element(n1.begin(),n1.end())>prec) return false; } @@ -1263,7 +1264,7 @@ void MEDCouplingPointSet::tryToShareSameCoordsPermute(const MEDCouplingPointSet& throw INTERP_KERNEL::Exception("MEDCouplingPointSet::tryToShareSameCoordsPermute fails : no nodes are mergeable with specified given epsilon !"); } mcIdType maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+otherNbOfNodes); - const mcIdType *pt=std::find_if(da->getConstPointer()+otherNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater(),maxId)); + const mcIdType *pt=std::find_if(da->getConstPointer()+otherNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind(std::greater(),std::placeholders::_1,maxId)); if(pt!=da->getConstPointer()+da->getNbOfElems()) { setCoords(oldCoords); @@ -1425,7 +1426,7 @@ void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int //mergeNodes if(!areNodesMerged && oldNbOfNodes != 0) throw INTERP_KERNEL::Exception("checkDeepEquivalWith : Nodes are incompatible ! "); - const mcIdType *pt=std::find_if(da->getConstPointer()+oldNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater(),oldNbOfNodes-1)); + const mcIdType *pt=std::find_if(da->getConstPointer()+oldNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind(std::greater(),std::placeholders::_1,oldNbOfNodes-1)); if(pt!=da->getConstPointer()+da->getNbOfElems()) throw INTERP_KERNEL::Exception("checkDeepEquivalWith : some nodes in other are not in this !"); m->renumberNodes(da->getConstPointer(),newNbOfNodes); @@ -1488,7 +1489,7 @@ void MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh MCAuto m=mergeMyselfWithOnSameCoords(otherC); MCAuto da=m->zipConnectivityTraducer(cellCompPol); mcIdType maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+getNumberOfCells()); - const mcIdType *pt=std::find_if(da->getConstPointer()+getNumberOfCells(),da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater(),maxId)); + const mcIdType *pt=std::find_if(da->getConstPointer()+getNumberOfCells(),da->getConstPointer()+da->getNbOfElems(),std::bind(std::greater(),std::placeholders::_1,maxId)); if(pt!=da->getConstPointer()+da->getNbOfElems()) { throw INTERP_KERNEL::Exception("checkDeepEquivalOnSameNodesWith : some cells in other are not in this !");