Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __IntersectorCU_HXX__
00025 #define __IntersectorCU_HXX__
00026
00027 #include "TargetIntersector.hxx"
00028 #include "NormalizedUnstructuredMesh.hxx"
00029
00030 namespace INTERP_KERNEL
00031 {
00032 template<class MyCMeshType, class MyUMeshType, class MyMatrix> class _StabIntersector;
00033
00034 template<class MyCMeshType, class MyUMeshType, class MyMatrix, class ConcreteIntersector=_StabIntersector<MyCMeshType,MyUMeshType,MyMatrix> >
00035 class IntersectorCU : public TargetIntersector<MyCMeshType,MyMatrix>
00036 {
00037 public:
00038 static const int SPACEDIM=MyCMeshType::MY_SPACEDIM;
00039 static const int MESHDIM=MyCMeshType::MY_MESHDIM;
00040 typedef typename MyUMeshType::MyConnType UConnType;
00041 typedef typename MyCMeshType::MyConnType CConnType;
00042 public:
00044 IntersectorCU(const MyCMeshType& meshS, const MyUMeshType& meshT);
00046 virtual ~IntersectorCU();
00047 void getUElemBB(double* bb, UConnType iP);
00048 void getUCoordinates(UConnType icell, std::vector<double>& coords);
00049
00050 int getNumberOfRowsOfResMatrix() const;
00051 int getNumberOfColsOfResMatrix() const;
00052 void intersectCells(CConnType icellU, const std::vector<CConnType>& icellC, MyMatrix& res);
00053 double intersectGeometry(CConnType icellT, const std::vector<CConnType>& icellC) { return asLeaf().intersectGeometry(icellT,icellC); }
00054 protected:
00055 ConcreteIntersector& asLeaf() { return static_cast<ConcreteIntersector&>(*this); }
00056
00057 protected:
00058 const UConnType *_connectU;
00059 const UConnType *_connIndexU;
00060 const double * _coordsU;
00061 const MyUMeshType& _meshU;
00062
00063 const double * _coordsC[SPACEDIM];
00064 int _nbCellsC[SPACEDIM];
00065 const MyCMeshType& _meshC;
00066 };
00067
00068
00069 template<class MyCMeshType, class MyUMeshType, class MyMatrix>
00070 class _StabIntersector: public IntersectorCU<MyCMeshType, MyUMeshType, MyMatrix, _StabIntersector<MyCMeshType, MyUMeshType, MyMatrix> >
00071 {
00072 public:
00073 _StabIntersector(const MyCMeshType& meshS, const MyUMeshType& meshT) : IntersectorCU<MyCMeshType, MyUMeshType, MyMatrix, _StabIntersector<MyCMeshType, MyUMeshType, MyMatrix> >(meshS, meshT) {}
00074 double intersectGeometry(typename MyUMeshType::MyConnType icellT, const std::vector<typename MyCMeshType::MyConnType>& icellC) { throw Exception("You must provide an intersector as the 4-th template argument of IntersectorCU"); return 0; }
00075 };
00076 }
00077
00078 #endif