From 7582757ea28ef815586b1ee3b13e781be6e88cf4 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 23 Jan 2023 17:38:24 +0100 Subject: [PATCH] WIP --- src/MEDCoupling/MEDCouplingFieldDiscretization.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx index 384785366..bf1397a4c 100755 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx @@ -30,6 +30,7 @@ #include "InterpKernelAutoPtr.hxx" #include "InterpKernelGaussCoords.hxx" #include "InterpKernelMatrixTools.hxx" +#include "InterpKernelDenseMatrix.hxx" #include #include @@ -1752,6 +1753,18 @@ MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationGauss::getMeasureField(con umesh->getNodeIdsOfCell(*cellId,conn); std::vector ptsInCell; ptsInCell.reserve(conn.size()*loc.getDimension()); std::for_each( conn.cbegin(), conn.cend(), [coordsOfMesh,&ptsInCell](mcIdType c) { ptsInCell.insert(ptsInCell.end(),coordsOfMesh+c*2,coordsOfMesh+(c+1)*2); } ); + std::size_t nbPtsInCell(ptsInCell.size()/3); + INTERP_KERNEL::DenseMatrix jacobian(2,2); + MCAuto shapeFunc = loc.getDerivativeOfShapeFunctionValues(); + for(std::size_t i = 0 ; i < 2 ; ++i) + for(std::size_t j = 0 ; j < 2 ; ++j) + { + double res = 0.0; + for( std::size_t k = 0 ; k < nbPtsInCell ; ++k ) + res += ptsInCell[k*2+i] * shapeFunc->getIJ(0,2*k+j); + jacobian[ i ][ j ] = res; + } + for(mcIdType j=0;j