From 96da9c74fac1645d390b2993ba59dab8b3e22e9c Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 24 Jan 2023 17:52:36 +0100 Subject: [PATCH] WIP --- src/MEDCoupling/MEDCouplingFieldDiscretization.cxx | 2 +- src/MEDCoupling/MEDCouplingGaussLocalization.cxx | 2 +- src/MEDCoupling/MEDCouplingGaussLocalization.hxx | 2 +- src/MEDCoupling_Swig/MEDCouplingCommon.i | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx index b90584d6d..281947d17 100755 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx @@ -1764,7 +1764,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationGauss::getMeasureField(con res += ptsInCell[spaceDim*k+i] * shapeFunc->getIJ(iGPt,spaceDim*k+j); jacobian[ i ][ j ] = res; } - arrPtr[offsetPtr[*cellId]+iGPt]=jacobian.determinant(); + arrPtr[offsetPtr[*cellId]+iGPt]=jacobian.determinant()*loc.getWeight(iGPt); } } } diff --git a/src/MEDCoupling/MEDCouplingGaussLocalization.cxx b/src/MEDCoupling/MEDCouplingGaussLocalization.cxx index e59f54741..5f1920d96 100644 --- a/src/MEDCoupling/MEDCouplingGaussLocalization.cxx +++ b/src/MEDCoupling/MEDCouplingGaussLocalization.cxx @@ -143,7 +143,7 @@ double MEDCouplingGaussLocalization::getGaussCoord(int gaussPtIdInCell, int comp return _gauss_coord[gaussPtIdInCell*dim+comp]; } -double MEDCouplingGaussLocalization::getWeight(int gaussPtIdInCell, double newVal) const +double MEDCouplingGaussLocalization::getWeight(int gaussPtIdInCell) const { checkCoherencyOfRequest(gaussPtIdInCell,0); return _weight[gaussPtIdInCell]; diff --git a/src/MEDCoupling/MEDCouplingGaussLocalization.hxx b/src/MEDCoupling/MEDCouplingGaussLocalization.hxx index 49cb19da3..ccffabaf2 100644 --- a/src/MEDCoupling/MEDCouplingGaussLocalization.hxx +++ b/src/MEDCoupling/MEDCouplingGaussLocalization.hxx @@ -62,7 +62,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT const std::vector& getGaussCoords() const { return _gauss_coord; } MEDCOUPLING_EXPORT double getGaussCoord(int gaussPtIdInCell, int comp) const; MEDCOUPLING_EXPORT const std::vector& getWeights() const { return _weight; } - MEDCOUPLING_EXPORT double getWeight(int gaussPtIdInCell, double newVal) const; + MEDCOUPLING_EXPORT double getWeight(int gaussPtIdInCell) const; MEDCOUPLING_EXPORT void setRefCoord(int ptIdInCell, int comp, double newVal); MEDCOUPLING_EXPORT void setGaussCoord(int gaussPtIdInCell, int comp, double newVal); MEDCOUPLING_EXPORT void setWeight(int gaussPtIdInCell, double newVal); diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 1793504a5..d3404b6a4 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -1289,7 +1289,7 @@ namespace MEDCoupling const std::vector& getGaussCoords() const; double getGaussCoord(int gaussPtIdInCell, int comp) const; const std::vector& getWeights() const; - double getWeight(int gaussPtIdInCell, double newVal) const; + double getWeight(int gaussPtIdInCell) const; void setRefCoord(int ptIdInCell, int comp, double newVal); void setGaussCoord(int gaussPtIdInCell, int comp, double newVal); void setWeight(int gaussPtIdInCell, double newVal); -- 2.39.2