1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __PLANARINTERSECTORP0P0_TXX__
20 #define __PLANARINTERSECTORP0P0_TXX__
22 #include "PlanarIntersectorP0P0.hxx"
24 namespace INTERP_KERNEL
26 template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
27 PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::PlanarIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS,
28 double dimCaracteristic, double precision, double md3DSurf, double medianPlane,
29 bool doRotate, int orientation, int printLevel):
30 PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel)
34 template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
35 int PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfRowsOfResMatrix() const
37 return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
40 template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
41 int PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfColsOfResMatrix() const
43 return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfElements();
46 template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
47 void PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res)
49 int nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
50 typename MyMatrix::value_type& resRow=res[icellT];
51 for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
54 int nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
55 double surf=intersectGeometry(OTT<ConnType,numPol>::indFC(icellT),OTT<ConnType,numPol>::indFC(iS),nbNodesT,nbNodesS);
56 surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
58 resRow.insert(std::make_pair(OTT<ConnType,numPol>::indFC(iS),surf));