]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/INTERP_KERNEL/TargetIntersector.hxx
Salome HOME
1023394af8683ae09dbbb2e8464a2349b135b7f2
[tools/medcoupling.git] / src / INTERP_KERNEL / TargetIntersector.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __TARGETINTERSECTOR__HXX__
21 #define __TARGETINTERSECTOR__HXX__
22
23 #include "INTERPKERNELDefines.hxx"
24
25 #include <vector>
26
27 namespace INTERP_KERNEL
28 {
29   /**
30    * \brief Abstract base class of Intersector classes. 
31    * These classes represent a target element and calculate its intersection
32    * with the source elements.
33    */
34   template<class MyMeshType, class MyMatrix>
35   class TargetIntersector
36   {
37   public:
38     typedef typename MyMeshType::MyConnType ConnType;
39   public:
40     /*!
41      * \addtogroup InterpKerGrpIntPlan
42      * @{
43      */
44     /*!
45      * Tool for cell intersection, result is always positive.
46      * @param icellT id of cell in target mesh in \b C \b mode.
47      * @param icellsS ids of cells in source mesh in \b C \b mode.
48      * @param res is an IN/OUT parameter that represents the icellTth row in final matrix, fed with at most icellsS elements. 
49      */
50     virtual void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res) = 0;
51     //! @}
52     //Tool for cell filtering
53     virtual int getNumberOfRowsOfResMatrix() const = 0;
54     virtual int getNumberOfColsOfResMatrix() const = 0;
55     virtual ~TargetIntersector() { }
56   };
57 }
58
59 #endif