X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingCartesianAMRMesh.cxx;h=7d2f0621749359bbbcf6a7254b08f7935dbf0e79;hb=0ba3453939dda0697b09ed7e728a01d4f33e3ce2;hp=f064b881844a829e8da995d1d30056b7d07d9f87;hpb=e0c843a1fe827a90af91ada8d2033ffb3a7dd1d8;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx b/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx index f064b8818..7d2f06217 100755 --- a/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D +// Copyright (C) 2007-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -371,13 +371,13 @@ void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoMixedLev(mcIdType std::transform(dimsP2NotRefined.begin(),dimsP2NotRefined.end(),factors.begin(),dimsP2Refined.begin(),std::multiplies()); std::vector< std::pair > p2RefinedAbs(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dimsP2NotRefined)); std::vector dimsP2RefinedGhost(dimsP2Refined.size()); - std::transform(dimsP2Refined.begin(),dimsP2Refined.end(),dimsP2RefinedGhost.begin(),std::bind2nd(std::plus(),2*ghostLev)); + std::transform(dimsP2Refined.begin(),dimsP2Refined.end(),dimsP2RefinedGhost.begin(),std::bind(std::plus(),std::placeholders::_1,2*ghostLev)); MCAuto fineP2(DataArrayDouble::New()); fineP2->alloc(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(dimsP2RefinedGhost),dataOnP2->getNumberOfComponents()); MEDCouplingIMesh::SpreadCoarseToFineGhost(dataOnP2,dimsP2NotRefined,fineP2,p2RefinedAbs,factors,ghostLev); if(isConservative) { mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(factors)); - std::transform(fineP2->begin(),fineP2->end(),fineP2->getPointer(),std::bind2nd(std::multiplies(),1./((double)fact))); + std::transform(fineP2->begin(),fineP2->end(),fineP2->getPointer(),std::bind(std::multiplies(),std::placeholders::_1,1./((double)fact))); } // UpdateNeighborsOfOneWithTwoInternal(ghostLev,p1->getMesh()->getFather()->getFactors(),p1pp,p2pp,dataOnP1,fineP2); @@ -509,7 +509,7 @@ void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoInternal(mcIdType mcIdType dim(ToIdType(factors.size())); std::vector dimsCoarse(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(p1));//[3,2] std::transform(dimsCoarse.begin(),dimsCoarse.end(),factors.begin(),dimsCoarse.begin(),std::multiplies());//[12,8] - std::transform(dimsCoarse.begin(),dimsCoarse.end(),dimsCoarse.begin(),std::bind2nd(std::plus(),2*ghostLev));//[14,10] + std::transform(dimsCoarse.begin(),dimsCoarse.end(),dimsCoarse.begin(),std::bind(std::plus(),std::placeholders::_1,2*ghostLev));//[14,10] std::vector< std::pair > rangeCoarse(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dimsCoarse));//[(0,14),(0,10)] std::vector fakeFactors(dim,1); // @@ -897,7 +897,7 @@ bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const Interna { bool cutFound(false); cutPlace=-1;// do not set axisId before to be sure that cutFound was set to true const std::vector< std::pair >& part(patchToBeSplit->getConstPart()); - mcIdType sign,minimumPatchLength(bso.getMinimumPatchLength()); + mcIdType sign=0,minimumPatchLength(bso.getMinimumPatchLength()); const mcIdType dim(patchToBeSplit->getDimension()); std::vector zeroCrossDims(dim,-1); @@ -1215,7 +1215,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatch(mcIdType patchId, cons if(isConservative) { mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors())); - std::transform(cellFieldOnPatch->begin(),cellFieldOnPatch->end(),cellFieldOnPatch->getPointer(),std::bind2nd(std::multiplies(),1./((double)fact))); + std::transform(cellFieldOnPatch->begin(),cellFieldOnPatch->end(),cellFieldOnPatch->getPointer(),std::bind(std::multiplies(),std::placeholders::_1,1./((double)fact))); } } @@ -1239,7 +1239,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost(mcIdType patchId, if(isConservative) { mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors())); - std::transform(cellFieldOnPatch->begin(),cellFieldOnPatch->end(),cellFieldOnPatch->getPointer(),std::bind2nd(std::multiplies(),1./((double)fact))); + std::transform(cellFieldOnPatch->begin(),cellFieldOnPatch->end(),cellFieldOnPatch->getPointer(),std::bind(std::multiplies(),std::placeholders::_1,1./((double)fact))); } } @@ -1266,7 +1266,6 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone(mcIdTyp * * \param [in] patchId - The id of the patch \a cellFieldOnThis has to be put on. * \param [in] cellFieldOnThis - The array of the cell field on \c this->getImageMesh() to be projected to patch having id \a patchId. - * \param [in,out] cellFieldOnPatch - The array of the cell field on the requested patch to be filled. * \param [in] ghostLev - The size of the ghost zone (must be >=0 !) * \param [in] arrsOnPatches - \b WARNING arrsOnPatches[patchId] is \b NOT \b const. All others are const. * @@ -1494,7 +1493,7 @@ DataArrayDouble *MEDCouplingCartesianAMRMeshGen::extractGhostFrom(mcIdType ghost { std::vector st(_mesh->getCellGridStructure()); std::vector< std::pair > p(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(st)); - std::transform(st.begin(),st.end(),st.begin(),std::bind2nd(std::plus(),2*ghostSz)); + std::transform(st.begin(),st.end(),st.begin(),std::bind(std::plus(),std::placeholders::_1,2*ghostSz)); MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(p,ghostSz); MCAuto ret(MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(st,arr,p)); return ret.retn(); @@ -1900,12 +1899,12 @@ MEDCouplingCartesianAMRMesh *MEDCouplingCartesianAMRMesh::deepCopy(MEDCouplingCa /*! * This method creates a multi level patches split at once. - * This method calls as times as size of \a bso createPatchesFromCriterion. Size of \a bso and size of \a factors must be the same ! + * This method calls as many times as size of \a bso createPatchesFromCriterion. Size of \a bso and size of \a factors must be the same ! * \b WARNING, after the call the number of levels in \a this is equal to bso.size() + 1 ! * - * \param [in] bso - * \param [in] criterion - * \param [in] factors + * \param [in] bso vector of BoxSplittingOptions + * \param [in] criterion DataArrayDouble + * \param [in] factors vector of vector of factors * \param [in] eps - See DataArrayDouble::toVectorOfBool for more information about the semantic of eps. * * \sa createPatchesFromCriterion