-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
}
/*!
- * \param [in,out] f field fed with good values.
+ * \param [in] isAbs whether to compute signed or absolute values
+ * \param [in,out] field field fed with good values.
* \sa MEDCouplingCurveLinearMesh::getMeasureField
*/
void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim1(bool isAbs, MEDCouplingFieldDouble *field) const
}
/*!
- * \param [in,out] f field fed with good values.
+ * \param [in] isAbs whether to compute signed or absolute values
+ * \param [in,out] field field fed with good values.
* \sa MEDCouplingCurveLinearMesh::getMeasureField
*/
void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2(bool isAbs, MEDCouplingFieldDouble *field) const
}
/*!
- * \param [in,out] f field fed with good values.
+ * \param [in] isAbs whether to compute signed or absolute values
+ * \param [in,out] field field fed with good values.
* \sa MEDCouplingCurveLinearMesh::getMeasureField
*/
void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim3(bool isAbs, MEDCouplingFieldDouble *field) const
return nodeId;
}
}
+ break;
case 2:
if(spaceDim==2)
{
return nx+ny*_structure[0];
}
}
+ break;
case 3:
{
if(spaceDim==3)
}
}
}
+ break;
default:
throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getCellContainingPoint : mesh dimension managed are 1, 2 or 3 !");
}
+ return 0;
}
void MEDCouplingCurveLinearMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
for(mcIdType i=0;i<nbNodes;i++)
{
std::transform(coords+i*dim,coords+(i+1)*dim,point,coords+i*dim,std::minus<double>());
- std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind2nd(std::multiplies<double>(),factor));
+ std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind(std::multiplies<double>(),std::placeholders::_1,factor));
std::transform(coords+i*dim,coords+(i+1)*dim,point,coords+i*dim,std::plus<double>());
}
_coords->declareAsNew();
{
int spaceDim=getSpaceDimension();
std::transform(_coords->begin()+spaceDim,_coords->end(),_coords->begin(),bary->getPointer(),std::plus<double>());
- std::transform(bary->begin(),bary->end(),bary->getPointer(),std::bind2nd(std::multiplies<double>(),0.5));
+ std::transform(bary->begin(),bary->end(),bary->getPointer(),std::bind(std::multiplies<double>(),std::placeholders::_1,0.5));
}
void MEDCouplingCurveLinearMesh::renumberCells(const mcIdType *old2NewBg, bool check)