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 #ifndef __PLANARINTERSECTOR_HXX__
00021 #define __PLANARINTERSECTOR_HXX__
00022
00023 #include "TargetIntersector.hxx"
00024 #include "NormalizedUnstructuredMesh.hxx"
00025
00026 namespace INTERP_KERNEL
00027 {
00028 class TranslationRotationMatrix;
00029
00030 template<class MyMeshType, class MyMatrix>
00031 class PlanarIntersector : public TargetIntersector<MyMeshType,MyMatrix>
00032 {
00033 public:
00034 static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
00035 static const int MESHDIM=MyMeshType::MY_MESHDIM;
00036 typedef typename MyMeshType::MyConnType ConnType;
00037 static const NumberingPolicy numPol=MyMeshType::My_numPol;
00038 public:
00040 PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
00042 virtual ~PlanarIntersector();
00043 void createBoundingBoxes(const MyMeshType& mesh, std::vector<double>& bbox);
00044 void adjustBoundingBoxes(std::vector<double>& bbox, double surf3DAdjustmentEps, double surf3DAdjustmentEpsAbs);
00045 inline void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes);
00046 static int projection(double *Coords_A, double *Coords_B,
00047 int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double median_plane, bool do_rotate);
00048 protected :
00049 int projectionThis(double *Coords_A, double *Coords_B, int nb_NodesA, int nb_NodesB);
00050 void getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT);
00051 void getRealSourceCoordinates(ConnType icellS, std::vector<double>& coordsS);
00052 void getRealTargetCoordinatesPermute(ConnType icellT, int offset, std::vector<double>& coordsT);
00053 void getRealSourceCoordinatesPermute(ConnType icellS, int offset, std::vector<double>& coordsS);
00054 void getRealCoordinates(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS, std::vector<double>& coordsT, std::vector<double>& coordsS, int& orientation);
00055 double getValueRegardingOption(double val) const;
00056 static void rotate3DTriangle( double* PP1, double*PP2, double*PP3,
00057 TranslationRotationMatrix& rotation_matrix);
00058 protected:
00059 const ConnType *_connectT;
00060 const ConnType *_connectS;
00061 const double *_coordsT;
00062 const double *_coordsS;
00063 const ConnType *_connIndexT;
00064 const ConnType *_connIndexS;
00065 const MyMeshType& _meshT;
00066 const MyMeshType& _meshS;
00067 double _dim_caracteristic;
00068 double _max_distance_3Dsurf_intersect;
00069 double _precision;
00070 double _median_plane;
00071 bool _do_rotate;
00072 int _orientation;
00073 int _print_level;
00074 };
00075 }
00076
00077 #endif