X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FPlanarIntersectorP1P1PL.txx;h=45692ac8880a11c9f0138d2e86f480d5027aaa6b;hb=1b746b38f3cdeae6654a9501f37fde5e56e59288;hp=37eb3348b35e2541644b0503607b9acba3437083;hpb=8763c12d01e33d6845dd53be65b001514d00bd42;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx index 37eb3348b..45692ac88 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -31,9 +31,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP1P1PL::PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0) { } @@ -41,30 +41,30 @@ namespace INTERP_KERNEL void PlanarIntersectorP1P1PL::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) { std::vector CoordsT; - PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),CoordsT); - int nbOfNodesT=CoordsT.size()/SPACEDIM; + this->getRealTargetCoordinates(OTT::indFC(icellT),CoordsT); + ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(OTT::indFC(*iter)); + NormalizedCellType tS=this->_meshS.getTypeOfElement(OTT::indFC(*iter)); if(tS!=NORM_TRI3) throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==2. Only TRI3 supported !"); std::vector CoordsS; - PlanarIntersector::getRealSourceCoordinates(OTT::indFC(*iter),CoordsS); + this->getRealSourceCoordinates(OTT::indFC(*iter),CoordsS); std::vector CoordsTTmp(CoordsT); if(SPACEDIM==3) - PlanarIntersector::projectionThis(&CoordsS[0],&CoordsTTmp[0],CoordsS.size()/SPACEDIM,nbOfNodesT); - const ConnType *startOfCellNodeConnT=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); + this->projectionThis(CoordsS.data(),CoordsTTmp.data(),ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT); + const ConnType *startOfCellNodeConnT=this->_connectT+OTT::conn2C(this->_connIndexT[icellT]); for(int nodeIdT=0;nodeIdT::ind2C(startOfCellNodeConnT[nodeIdT])]; - if( PointLocatorAlgos::isElementContainsPointAlg2D(&CoordsTTmp[nodeIdT*SPACEDIM],&CoordsS[0],3,PlanarIntersector::_precision) ) + if( PointLocatorAlgos::isElementContainsPointAlg2DSimple(CoordsTTmp.data()+nodeIdT*SPACEDIM,CoordsS.data(),3,this->_precision) ) { double resLoc[3]; barycentric_coords(&CoordsS[0],&CoordsTTmp[nodeIdT*SPACEDIM],resLoc); - const ConnType *startOfCellNodeConnS=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[*iter]); + const ConnType *startOfCellNodeConnS=this->_connectS+OTT::conn2C(this->_connIndexS[*iter]); for(int nodeIdS=0;nodeIdS<3;nodeIdS++) { - if(fabs(resLoc[nodeIdS])>PlanarIntersector::_precision) + if(fabs(resLoc[nodeIdS])>this->_precision) { ConnType curNodeSInCmode=OTT::coo2C(startOfCellNodeConnS[nodeIdS]); typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(curNodeSInCmode)); @@ -84,15 +84,15 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const { - return PlanarIntersector::_meshT.getNumberOfNodes(); + return this->_meshT.getNumberOfNodes(); } template - int PlanarIntersectorP1P1PL::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P1PL::getNumberOfColsOfResMatrix() const { - return PlanarIntersector::_meshS.getNumberOfNodes(); + return this->_meshS.getNumberOfNodes(); } }