Salome HOME
Synchronize adm files
[modules/med.git] / src / INTERP_KERNEL / TargetIntersector.hxx
1 // Copyright (C) 2007-2014  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, or (at your option) any later version.
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 // Author : Anthony Geay (CEA/DEN)
20
21 #ifndef __TARGETINTERSECTOR__HXX__
22 #define __TARGETINTERSECTOR__HXX__
23
24 #include "INTERPKERNELDefines.hxx"
25
26 #include <vector>
27
28 namespace INTERP_KERNEL
29 {
30   /**
31    * \brief Abstract base class of Intersector classes. 
32    * These classes represent a target element and calculate its intersection
33    * with the source elements.
34    */
35   template<class MyMeshType, class MyMatrix>
36   class TargetIntersector
37   {
38   public:
39     typedef typename MyMeshType::MyConnType ConnType;
40   public:
41     /*!
42      * \addtogroup InterpKerGrpIntPlan
43      * @{
44      */
45     /*!
46      * Tool for cell intersection, result is always positive.
47      * @param icellT id of cell in target mesh in \b C \b mode.
48      * @param icellsS ids of cells in source mesh in \b C \b mode.
49      * @param res is an IN/OUT parameter that represents the icellTth row in final matrix, fed with at most icellsS elements. 
50      */
51     virtual void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res) = 0;
52     //! @}
53     //Tool for cell filtering
54     virtual int getNumberOfRowsOfResMatrix() const = 0;
55     virtual int getNumberOfColsOfResMatrix() const = 0;
56     virtual ~TargetIntersector() { }
57   };
58 }
59
60 #endif