X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FPlanarIntersectorP1P0.txx;h=48ec63802a5ccb791569fc503b41efeed4af896d;hb=b219559763498c4bd10c730cd3d2c62b1eed45db;hp=27f598702ae6c0181253b1f1c55bd75c20369746;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx index 27f598702..48ec63802 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2019 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// Author : Anthony Geay (CEA/DEN) #ifndef __PLANARINTERSECTORP1P0_TXX__ #define __PLANARINTERSECTORP1P0_TXX__ @@ -26,20 +27,20 @@ namespace INTERP_KERNEL { template PlanarIntersectorP1P0::PlanarIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel) { } template - int PlanarIntersectorP1P0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P0::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } template - int PlanarIntersectorP1P0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P0::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } @@ -60,15 +61,15 @@ namespace INTERP_KERNEL typename MyMatrix::value_type& resRow=res[icellT]; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; - int nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; + ConnType iS=*iter; + ConnType nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; const ConnType *startOfCellNodeConn=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[iS]); - for(int nodeIdS=0;nodeIdS::coo2C(startOfCellNodeConn[nodeIdS]); std::copy(PlanarIntersector::_coordsS+curNodeSInCmode*SPACEDIM, PlanarIntersector::_coordsS+curNodeSInCmode*SPACEDIM+SPACEDIM,triangle); - for(int subTriS=1;subTriS<=nbNodesS-2;subTriS++) + for(ConnType subTriS=1;subTriS<=nbNodesS-2;subTriS++) { std::copy(PlanarIntersector::_coordsS+OTT::coo2C(startOfCellNodeConn[(nodeIdS+subTriS)%nbNodesS])*SPACEDIM, PlanarIntersector::_coordsS+OTT::coo2C(startOfCellNodeConn[(nodeIdS+subTriS)%nbNodesS])*SPACEDIM+SPACEDIM, @@ -79,7 +80,7 @@ namespace INTERP_KERNEL fillDualCellOfTri(triangle,quadrangle); std::vector targetCellCoordsTmp(targetCellCoords); if(SPACEDIM==3) - orientation=PlanarIntersector::projectionThis(&targetCellCoordsTmp[0],quadrangle,targetCellCoords.size()/SPACEDIM,4); + orientation=PlanarIntersector::projectionThis(&targetCellCoordsTmp[0],quadrangle,ToConnType(targetCellCoords.size())/SPACEDIM,4); double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,targetCellCoordsTmp,isTargetQuad); surf=PlanarIntersector::getValueRegardingOption(surf); if(surf!=0.)