1 // Copyright (C) 2007-2024 CEA, EDF
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.
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 // Author : Anthony Geay (CEA/DEN)
21 #ifndef __INTEGRALUNIFORMINTERSECTOR_HXX__
22 #define __INTEGRALUNIFORMINTERSECTOR_HXX__
24 #include "TargetIntersector.txx"
28 namespace INTERP_KERNEL
30 template<class MyMeshType, class MyMatrix>
31 class IntegralUniformIntersector : public TargetIntersector<MyMeshType,MyMatrix>
34 typedef typename MyMeshType::MyConnType ConnType;
36 IntegralUniformIntersector(const MyMeshType& mesh, bool isAbs);
37 double performNormalization(double val) const { if(_is_abs) return fabs(val); else return val; }
38 void setFromTo(bool val) { _from_to=val; }
39 void putValueIn(ConnType i, double val, MyMatrix& res) const;
41 const MyMeshType& _mesh;
42 //! if false means fromIntegralUniform if true means toIntegralUniform
47 template<class MyMeshType, class MyMatrix>
48 class IntegralUniformIntersectorP0 : public IntegralUniformIntersector<MyMeshType,MyMatrix>
51 typedef typename MyMeshType::MyConnType ConnType;
53 IntegralUniformIntersectorP0(const MyMeshType& mesh, bool isAbs);
54 ConnType getNumberOfRowsOfResMatrix() const;
55 ConnType getNumberOfColsOfResMatrix() const;
56 void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res);
59 template<class MyMeshType, class MyMatrix>
60 class IntegralUniformIntersectorP1 : public IntegralUniformIntersector<MyMeshType,MyMatrix>
63 typedef typename MyMeshType::MyConnType ConnType;
65 IntegralUniformIntersectorP1(const MyMeshType& mesh, bool isAbs);
66 ConnType getNumberOfRowsOfResMatrix() const;
67 ConnType getNumberOfColsOfResMatrix() const;
68 void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res);