X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingCMesh.cxx;h=8647c67e5dceaa858d24d8dbb5dd7078995deb9f;hb=e7a9d4f59978fd384ee98db1dfdd5ec2118331ca;hp=100e2134109ac9df3147bab9b3560df92c471b3a;hpb=b219559763498c4bd10c730cd3d2c62b1eed45db;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingCMesh.cxx b/src/MEDCoupling/MEDCouplingCMesh.cxx index 100e21341..8647c67e5 100755 --- a/src/MEDCoupling/MEDCouplingCMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCMesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -613,7 +613,7 @@ mcIdType MEDCouplingCMesh::getCellContainingPoint(const double *pos, double eps) const double *d=getCoordsAt(i)->getConstPointer(); mcIdType nbOfNodes=getCoordsAt(i)->getNbOfElems(); double ref=pos[i]; - const double *w=std::find_if(d,d+nbOfNodes,std::bind2nd(std::greater_equal(),ref)); + const double *w=std::find_if(d,d+nbOfNodes,std::bind(std::greater_equal(),std::placeholders::_1,ref)); mcIdType w2=ToIdType(std::distance(d,w)); if(w2getConstPointer(),_x_array->getConstPointer()+_x_array->getNbOfElems(), - _x_array->getPointer(),std::bind2nd(std::plus(),vector[0])); + _x_array->getPointer(),std::bind(std::plus(),std::placeholders::_1,vector[0])); if(_y_array) std::transform(_y_array->getConstPointer(),_y_array->getConstPointer()+_y_array->getNbOfElems(), - _y_array->getPointer(),std::bind2nd(std::plus(),vector[1])); + _y_array->getPointer(),std::bind(std::plus(),std::placeholders::_1,vector[1])); if(_z_array) std::transform(_z_array->getConstPointer(),_z_array->getConstPointer()+_z_array->getNbOfElems(), - _z_array->getPointer(),std::bind2nd(std::plus(),vector[2])); + _z_array->getPointer(),std::bind(std::plus(),std::placeholders::_1,vector[2])); } /*! * Applies scaling transformation to all nodes of \a this mesh. - * \param [in] postd::size_t - coordinates of a scaling center. This array is to be of + * \param [in] point - coordinates of a scaling center. This array is to be of * size \a this->getSpaceDimension() at least. * \param [in] factor - a scale factor. */ @@ -678,9 +678,9 @@ void MEDCouplingCMesh::scale(const double *point, double factor) { double *coords=c->getPointer(); mcIdType lgth=ToIdType(c->getNbOfElems()); - std::transform(coords,coords+lgth,coords,std::bind2nd(std::minus(),point[i])); - std::transform(coords,coords+lgth,coords,std::bind2nd(std::multiplies(),factor)); - std::transform(coords,coords+lgth,coords,std::bind2nd(std::plus(),point[i])); + std::transform(coords,coords+lgth,coords,std::bind(std::minus(),std::placeholders::_1,point[i])); + std::transform(coords,coords+lgth,coords,std::bind(std::multiplies(),std::placeholders::_1,factor)); + std::transform(coords,coords+lgth,coords,std::bind(std::plus(),std::placeholders::_1,point[i])); c->declareAsNew(); } } @@ -752,7 +752,7 @@ DataArrayDouble *MEDCouplingCMesh::computeCellCenterOfMass() const const double *srcPtr=tabs[j]->getConstPointer(); tabsPtr[j].insert(tabsPtr[j].end(),srcPtr,srcPtr+sz); std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),srcPtr+1,tabsPtr[j].begin(),std::plus()); - std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),tabsPtr[j].begin(),std::bind2nd(std::multiplies(),0.5)); + std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),tabsPtr[j].begin(),std::bind(std::multiplies(),std::placeholders::_1,0.5)); } mcIdType tmp2[3]; for(int i=0;i