// Copyright (C) 2007-2012 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. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef __PLANAR2D1DINTERSECTORP0P0_TXX__ #define __PLANAR2D1DINTERSECTORP0P0_TXX__ #include "Planar2D1DIntersectorP0P0.hxx" namespace INTERP_KERNEL { template Planar2D1DIntersectorP0P0::Planar2D1DIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) { } template int Planar2D1DIntersectorP0P0::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } template int Planar2D1DIntersectorP0P0::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfElements(); } template void Planar2D1DIntersectorP0P0::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) { int nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; 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]; bool isColinear = false; double surf=intersectGeometry1D(OTT::indFC(icellT),OTT::indFC(iS), nbNodesT,nbNodesS, isColinear); surf=PlanarIntersector::getValueRegardingOption(surf); if(surf!=0.) resRow.insert(std::make_pair(OTT::indFC(iS),surf)); if (isColinear) { typename PlanarIntersector::DuplicateFacesType::iterator intersectFacesIter = _intersect_faces.find(iS); if (intersectFacesIter != _intersect_faces.end()) { intersectFacesIter->second.insert(icellT); } else { std::set targetCellSet; targetCellSet.insert(icellT); _intersect_faces.insert(std::make_pair(iS, targetCellSet)); } } } } } #endif