Salome HOME
[EDF26877] : management of computation of measure field on field on Gauss Point in...
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingStructuredMesh.cxx
index 3570a3b00938d69e47d1d16ac9c203ebf1f5736f..9eb7a30d43d88334775c0a7da001c92630a01767 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  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
@@ -1274,7 +1274,7 @@ mcIdType MEDCouplingStructuredMesh::getNumberOfNodes() const
 /*!
  * This method returns for a cell which id is \a cellId the location (locX,locY,locZ) of this cell in \a this.
  *
- * \param [in] cellId
+ * \param [in] cellId ID of the cell
  * \return - A vector of size this->getMeshDimension()
  * \throw if \a cellId not in [ 0, this->getNumberOfCells() )
  */
@@ -1297,7 +1297,7 @@ std::vector<mcIdType> MEDCouplingStructuredMesh::getLocationFromCellId(mcIdType
 /*!
  * This method returns for a node which id is \a nodeId the location (locX,locY,locZ) of this node in \a this.
  *
- * \param [in] nodeId
+ * \param [in] nodeId ID of the node
  * \return - A vector of size this->getSpaceDimension()
  * \throw if \a cellId not in [ 0, this->getNumberOfNodes() )
  */
@@ -1331,7 +1331,7 @@ void MEDCouplingStructuredMesh::GetPosFromId(mcIdType eltId, int meshDim, const
 std::vector<mcIdType> MEDCouplingStructuredMesh::getCellGridStructure() const
 {
   std::vector<mcIdType> ret(getNodeGridStructure());
-  std::transform(ret.begin(),ret.end(),ret.begin(),std::bind2nd(std::plus<mcIdType>(),-1));
+  std::transform(ret.begin(),ret.end(),ret.begin(),std::bind(std::plus<mcIdType>(),std::placeholders::_1,-1));
   return ret;
 }
 
@@ -1999,7 +1999,7 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<mcIdType>& st,
                 for(mcIdType k=0;k<dims[0];k++)
                   {
                     mcIdType offset(part[0].first+k+b+a);
-                    std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind2nd(std::multiplies<double>(),factor));
+                    std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind(std::multiplies<double>(),std::placeholders::_1,factor));
                   }
               }
           }
@@ -2013,7 +2013,7 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<mcIdType>& st,
             for(mcIdType k=0;k<dims[0];k++)
               {
                 mcIdType offset(part[0].first+k+b);
-                std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind2nd(std::multiplies<double>(),factor));
+                std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind(std::multiplies<double>(),std::placeholders::_1,factor));
               }
           }
         break;
@@ -2023,7 +2023,7 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<mcIdType>& st,
         for(mcIdType k=0;k<dims[0];k++)
           {
             mcIdType offset(part[0].first+k);
-            std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind2nd(std::multiplies<double>(),factor));
+            std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind(std::multiplies<double>(),std::placeholders::_1,factor));
           }
         break;
       }
@@ -2073,7 +2073,7 @@ void MEDCouplingStructuredMesh::PutInGhostFormat(mcIdType ghostSize, const std::
     if(part[i].first<0 || part[i].first>part[i].second || part[i].second>st[i])
       throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::PutInGhostFormat : the specified part is invalid ! The begin must be >= 0 and <= end ! The end must be <= to the size at considered dimension !");
   stWithGhost.resize(st.size());
-  std::transform(st.begin(),st.end(),stWithGhost.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  std::transform(st.begin(),st.end(),stWithGhost.begin(),std::bind(std::plus<mcIdType>(),std::placeholders::_1,2*ghostSize));
   partWithGhost=part;
   ApplyGhostOnCompactFrmt(partWithGhost,ghostSize);
 }