From: geay Date: Mon, 24 Feb 2014 09:37:45 +0000 (+0100) Subject: Addition of a new advanced option for 3D surf option. X-Git-Tag: V7_4_0a1~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2aef7b103b9d67157bd7a6c00768f1d0273deaa2;p=modules%2Fmed.git Addition of a new advanced option for 3D surf option. --- diff --git a/src/INTERP_KERNEL/ConvexIntersector.hxx b/src/INTERP_KERNEL/ConvexIntersector.hxx index 5e21fb9c1..071c89778 100644 --- a/src/INTERP_KERNEL/ConvexIntersector.hxx +++ b/src/INTERP_KERNEL/ConvexIntersector.hxx @@ -40,7 +40,7 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; public: ConvexIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); double intersectGeometry(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS); double intersectGeometryWithQuadrangle(const double *quadrangle, const std::vector& sourceCoords, bool isSourceQuad); diff --git a/src/INTERP_KERNEL/ConvexIntersector.txx b/src/INTERP_KERNEL/ConvexIntersector.txx index 46f3aea35..daae7c590 100644 --- a/src/INTERP_KERNEL/ConvexIntersector.txx +++ b/src/INTERP_KERNEL/ConvexIntersector.txx @@ -39,9 +39,9 @@ namespace INTERP_KERNEL { CONVINTERSECTOR_TEMPLATE CONVEX_INTERSECTOR_::ConvexIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate , int oriantation, int printLevel) - :InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, doRotate, oriantation, printLevel), + :InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, doRotate, oriantation, printLevel), _epsilon(precision*dimCaracteristic) { if(PlanarIntersector::_print_level >= 1) diff --git a/src/INTERP_KERNEL/Geometric2DIntersector.hxx b/src/INTERP_KERNEL/Geometric2DIntersector.hxx index 983475543..3e264755a 100644 --- a/src/INTERP_KERNEL/Geometric2DIntersector.hxx +++ b/src/INTERP_KERNEL/Geometric2DIntersector.hxx @@ -42,7 +42,7 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; public: Geometric2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); double intersectGeometry(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS); double intersectGeometry1D(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS, bool& isColinear); diff --git a/src/INTERP_KERNEL/Geometric2DIntersector.txx b/src/INTERP_KERNEL/Geometric2DIntersector.txx index 573306984..6b1e0f103 100644 --- a/src/INTERP_KERNEL/Geometric2DIntersector.txx +++ b/src/INTERP_KERNEL/Geometric2DIntersector.txx @@ -42,9 +42,9 @@ namespace INTERP_KERNEL { INTERSECTOR_TEMPLATE GEO2D_INTERSECTOR::Geometric2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, double medianPlane, + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation): - InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, true, orientation, 0) + InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, true, orientation, 0) { QUADRATIC_PLANAR::_precision=precision; } diff --git a/src/INTERP_KERNEL/Interpolation2D1D.txx b/src/INTERP_KERNEL/Interpolation2D1D.txx index 00494a307..111336e59 100644 --- a/src/INTERP_KERNEL/Interpolation2D1D.txx +++ b/src/INTERP_KERNEL/Interpolation2D1D.txx @@ -80,6 +80,7 @@ namespace INTERP_KERNEL case Geometric2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); diff --git a/src/INTERP_KERNEL/InterpolationOptions.cxx b/src/INTERP_KERNEL/InterpolationOptions.cxx index a48f86fdd..70a65a7cd 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.cxx +++ b/src/INTERP_KERNEL/InterpolationOptions.cxx @@ -29,6 +29,8 @@ const double INTERP_KERNEL::InterpolationOptions::DFT_SURF3D_ADJ_EPS=1.e-4; const double INTERP_KERNEL::InterpolationOptions::DFT_MAX_DIST_3DSURF_INTERSECT=-1.; +const double INTERP_KERNEL::InterpolationOptions::DFT_MIN_DOT_BTW_3DSURF_INTERSECT=-1.; + const char INTERP_KERNEL::InterpolationOptions::PRECISION_STR[]="Precision"; const char INTERP_KERNEL::InterpolationOptions::MEDIANE_PLANE_STR[]="MedianPlane"; @@ -39,6 +41,8 @@ const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_ABS_STR[]="Boun const char INTERP_KERNEL::InterpolationOptions::MAX_DISTANCE_3DSURF_INSECT_STR[]="MaxDistance3DSurfIntersect"; +const char INTERP_KERNEL::InterpolationOptions::MIN_DOT_BTW_3DSURF_INSECT_STR[]="MinDotBetween3DSurfIntersect"; + const char INTERP_KERNEL::InterpolationOptions::PRINT_LEV_STR[]="PrintLevel"; const char INTERP_KERNEL::InterpolationOptions::DO_ROTATE_STR[]="DoRotate"; @@ -81,6 +85,7 @@ void INTERP_KERNEL::InterpolationOptions::init() _bounding_box_adjustment=DFT_SURF3D_ADJ_EPS; _bounding_box_adjustment_abs=0.; _max_distance_for_3Dsurf_intersect=DFT_MAX_DIST_3DSURF_INTERSECT; + _min_dot_btw_3Dsurf_intersect=DFT_MIN_DOT_BTW_3DSURF_INTERSECT; _orientation=0; _measure_abs=true; _splitting_policy=PLANAR_FACE_5; @@ -131,6 +136,11 @@ bool INTERP_KERNEL::InterpolationOptions::setOptionDouble(const std::string& key setMaxDistance3DSurfIntersect(value); return true; } + else if(key==MIN_DOT_BTW_3DSURF_INSECT_STR) + { + setMinDotBtwPlane3DSurfIntersect(value); + return true; + } else return false; } @@ -279,6 +289,7 @@ std::string INTERP_KERNEL::InterpolationOptions::printOptions() const oss << "Bounding box adj : " << _bounding_box_adjustment << std::endl; oss << "Bounding box adj abs : " << _bounding_box_adjustment_abs << std::endl; oss << "Max distance for 3DSurf intersect : " << _max_distance_for_3Dsurf_intersect << std::endl; + oss << "Min dot between plane for 3DSurf intersect : " << _min_dot_btw_3Dsurf_intersect << std::endl; oss << "Orientation : " << _orientation << std::endl; oss << "Measure abs : " << _measure_abs << std::endl; oss << "Splitting policy : " << getSplittingPolicyRepr() << std::endl; diff --git a/src/INTERP_KERNEL/InterpolationOptions.hxx b/src/INTERP_KERNEL/InterpolationOptions.hxx index cf737137f..587ee6661 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.hxx +++ b/src/INTERP_KERNEL/InterpolationOptions.hxx @@ -50,6 +50,7 @@ namespace INTERP_KERNEL //! this measure is absolute \b not relative to the cell size double _bounding_box_adjustment_abs ; double _max_distance_for_3Dsurf_intersect; + double _min_dot_btw_3Dsurf_intersect; int _orientation ; bool _measure_abs; SplittingPolicy _splitting_policy ; @@ -80,6 +81,9 @@ namespace INTERP_KERNEL double getMaxDistance3DSurfIntersect() const { return _max_distance_for_3Dsurf_intersect; } void setMaxDistance3DSurfIntersect(double bba) { _max_distance_for_3Dsurf_intersect=bba; } + double getMinDotBtwPlane3DSurfIntersect() const { return _min_dot_btw_3Dsurf_intersect; } + void setMinDotBtwPlane3DSurfIntersect(double v) { _min_dot_btw_3Dsurf_intersect=v; } + int getOrientation() const { return _orientation; } void setOrientation(int o) { _orientation=o; } @@ -116,12 +120,14 @@ namespace INTERP_KERNEL static const double DFT_MEDIAN_PLANE; static const double DFT_SURF3D_ADJ_EPS; static const double DFT_MAX_DIST_3DSURF_INTERSECT; + static const double DFT_MIN_DOT_BTW_3DSURF_INTERSECT; public: static const char PRECISION_STR[]; static const char MEDIANE_PLANE_STR[]; static const char BOUNDING_BOX_ADJ_STR[]; static const char BOUNDING_BOX_ADJ_ABS_STR[]; static const char MAX_DISTANCE_3DSURF_INSECT_STR[]; + static const char MIN_DOT_BTW_3DSURF_INSECT_STR[]; static const char PRINT_LEV_STR[]; static const char DO_ROTATE_STR[]; static const char ORIENTATION_STR[]; diff --git a/src/INTERP_KERNEL/InterpolationPlanar.txx b/src/INTERP_KERNEL/InterpolationPlanar.txx index 52ec12557..b0cedf774 100644 --- a/src/INTERP_KERNEL/InterpolationPlanar.txx +++ b/src/INTERP_KERNEL/InterpolationPlanar.txx @@ -164,6 +164,7 @@ namespace INTERP_KERNEL intersector=new TriangulationIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getOrientation(), InterpolationOptions::getPrintLevel()); @@ -172,6 +173,7 @@ namespace INTERP_KERNEL intersector=new ConvexIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getDoRotate(), InterpolationOptions::getOrientation(), @@ -180,6 +182,7 @@ namespace INTERP_KERNEL case Geometric2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -187,6 +190,7 @@ namespace INTERP_KERNEL case PointLocator: intersector=new PointLocator2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -203,6 +207,7 @@ namespace INTERP_KERNEL intersector=new TriangulationIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getOrientation(), InterpolationOptions::getPrintLevel()); @@ -211,6 +216,7 @@ namespace INTERP_KERNEL intersector=new ConvexIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getDoRotate(), InterpolationOptions::getOrientation(), @@ -219,6 +225,7 @@ namespace INTERP_KERNEL case Geometric2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -226,6 +233,7 @@ namespace INTERP_KERNEL case PointLocator: intersector=new PlanarIntersectorP0P1PL(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -234,6 +242,7 @@ namespace INTERP_KERNEL intersector=new TriangulationIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getOrientation(), InterpolationOptions::getPrintLevel()); @@ -241,6 +250,7 @@ namespace INTERP_KERNEL case BarycentricGeo2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -257,6 +267,7 @@ namespace INTERP_KERNEL intersector=new TriangulationIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getOrientation(), InterpolationOptions::getPrintLevel()); @@ -265,6 +276,7 @@ namespace INTERP_KERNEL intersector=new ConvexIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getDoRotate(), InterpolationOptions::getOrientation(), @@ -273,21 +285,24 @@ namespace INTERP_KERNEL case Geometric2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); break; case PointLocator: intersector=new PlanarIntersectorP1P0PL(myMeshT, myMeshS, _dim_caracteristic, - InterpolationOptions::getMaxDistance3DSurfIntersect(), - InterpolationOptions::getMedianPlane(), - InterpolationOptions::getPrecision(), - InterpolationOptions::getOrientation()); + InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), + InterpolationOptions::getMedianPlane(), + InterpolationOptions::getPrecision(), + InterpolationOptions::getOrientation()); break; case Barycentric: intersector=new TriangulationIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getOrientation(), InterpolationOptions::getPrintLevel()); @@ -295,6 +310,7 @@ namespace INTERP_KERNEL case BarycentricGeo2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -309,6 +325,7 @@ namespace INTERP_KERNEL intersector=new TriangulationIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getOrientation(), InterpolationOptions::getPrintLevel()); @@ -317,6 +334,7 @@ namespace INTERP_KERNEL intersector=new ConvexIntersector(myMeshT,myMeshS,_dim_caracteristic, InterpolationOptions::getPrecision(), InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getDoRotate(), InterpolationOptions::getOrientation(), @@ -325,6 +343,7 @@ namespace INTERP_KERNEL case Geometric2D: intersector=new Geometric2DIntersector(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); @@ -332,6 +351,7 @@ namespace INTERP_KERNEL case PointLocator: intersector=new PlanarIntersectorP1P1PL(myMeshT, myMeshS, _dim_caracteristic, InterpolationOptions::getMaxDistance3DSurfIntersect(), + InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(), InterpolationOptions::getMedianPlane(), InterpolationOptions::getPrecision(), InterpolationOptions::getOrientation()); diff --git a/src/INTERP_KERNEL/IntersectorCU2D.txx b/src/INTERP_KERNEL/IntersectorCU2D.txx index 97b0262f5..a6bfc139c 100644 --- a/src/INTERP_KERNEL/IntersectorCU2D.txx +++ b/src/INTERP_KERNEL/IntersectorCU2D.txx @@ -37,7 +37,7 @@ namespace INTERP_KERNEL INTERSECTOR_CU2D::IntersectorCU2D(const MyCMeshType& meshS, const MyUMeshType& meshT): IntersectorCU >( meshS, meshT ), - _intersector(meshT, meshT, 0,0,0,0,0,0 ) + _intersector(meshT, meshT, 0,0,0,0,0,0,0 ) { if ( MyCMeshType::MY_SPACEDIM != 2 || MyCMeshType::MY_MESHDIM != 2 || MyUMeshType::MY_SPACEDIM != 2 || MyUMeshType::MY_MESHDIM != 2 ) diff --git a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx index 4803f58c7..8390b8767 100644 --- a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx +++ b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx @@ -35,7 +35,7 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: Planar2D1DIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: int getNumberOfRowsOfResMatrix() const; int getNumberOfColsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx index 430d2f01f..e0811ad51 100644 --- a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx @@ -26,9 +26,9 @@ namespace INTERP_KERNEL { template Planar2D1DIntersectorP0P0::Planar2D1DIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel) { } diff --git a/src/INTERP_KERNEL/PlanarIntersector.hxx b/src/INTERP_KERNEL/PlanarIntersector.hxx index 07986359f..a81675080 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.hxx +++ b/src/INTERP_KERNEL/PlanarIntersector.hxx @@ -42,14 +42,14 @@ namespace INTERP_KERNEL typedef typename std::map > DuplicateFacesType; public: //! \addtogroup InterpKerGrpIntPlan @{ - PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); //! @} virtual ~PlanarIntersector(); void createBoundingBoxes(const MyMeshType& mesh, std::vector& bbox); void adjustBoundingBoxes(std::vector& bbox, double surf3DAdjustmentEps, double surf3DAdjustmentEpsAbs); inline void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes); - static int projection(double *Coords_A, double *Coords_B, - int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double median_plane, bool do_rotate); + static int Projection(double *Coords_A, double *Coords_B, + int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate); virtual const DuplicateFacesType* getIntersectFaces() const { return NULL; @@ -75,6 +75,7 @@ namespace INTERP_KERNEL const MyMeshType& _meshS; double _dim_caracteristic; double _max_distance_3Dsurf_intersect; + double _min_dot_btw_3Dsurf_intersect; double _precision; double _median_plane; bool _do_rotate; diff --git a/src/INTERP_KERNEL/PlanarIntersector.txx b/src/INTERP_KERNEL/PlanarIntersector.txx index 8c1df161a..6f0c5aa5d 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.txx +++ b/src/INTERP_KERNEL/PlanarIntersector.txx @@ -30,7 +30,7 @@ namespace INTERP_KERNEL { template - PlanarIntersector::PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): + PlanarIntersector::PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): _meshT(meshT),_meshS(meshS), _dim_caracteristic(dimCaracteristic),_max_distance_3Dsurf_intersect(md3DSurf),_precision(precision),_median_plane(medianPlane), _do_rotate(doRotate),_orientation(orientation),_print_level(printLevel) @@ -275,12 +275,12 @@ namespace INTERP_KERNEL template int PlanarIntersector::projectionThis(double *Coords_A, double *Coords_B, int nb_NodesA, int nb_NodesB) { - return projection(Coords_A,Coords_B,nb_NodesA,nb_NodesB,_dim_caracteristic*_precision,_max_distance_3Dsurf_intersect,_median_plane,_do_rotate); + return Projection(Coords_A,Coords_B,nb_NodesA,nb_NodesB,_dim_caracteristic*_precision,_max_distance_3Dsurf_intersect,_min_dot_btw_3Dsurf_intersect,_median_plane,_do_rotate); } template - int PlanarIntersector::projection(double *Coords_A, double *Coords_B, - int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double median_plane, bool do_rotate) + int PlanarIntersector::Projection(double *Coords_A, double *Coords_B, + int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate) { double normal_A[3]={0,0,0}; double normal_B[3]={0,0,0}; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx index ba497752a..a4892c392 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: - PlanarIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: int getNumberOfRowsOfResMatrix() const; int getNumberOfColsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx index 86be0d24a..4f7b327d8 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx @@ -26,9 +26,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP0P0::PlanarIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel) { } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx index f071080ee..f5e768efb 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: - PlanarIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx index bbab21e1c..4736c08c7 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx @@ -28,9 +28,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP0P1::PlanarIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel) { } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx index a59b77787..a330ea4d9 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: - PlanarIntersectorP0P1Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersectorP0P1Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx index e2e734d7b..8e6e6fd80 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx @@ -29,10 +29,10 @@ namespace INTERP_KERNEL template PlanarIntersectorP0P1Bary::PlanarIntersectorP0P1Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, - double md3DSurf, double medianPlane, + double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf, - medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf, + medianPlane,doRotate,orientation,printLevel) { // SPEC: // "Limitation. For the P0P1 barycentric improvement only triangle target cells in 2D and diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx index c777f830b..55338aefc 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; public: - PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); + PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; int getNumberOfColsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx index 2feb21543..02f0fb9f4 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx @@ -30,9 +30,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP0P1PL::PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0) { } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx index b251aa48a..1be11730b 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: - PlanarIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx index 33aa87e6f..79654e732 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx @@ -27,9 +27,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP1P0::PlanarIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel) { } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx index cf34ba083..c1e80955f 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: - PlanarIntersectorP1P0Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersectorP1P0Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx index 2cafaca07..40dcd0116 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx @@ -31,9 +31,9 @@ namespace INTERP_KERNEL PLAN_INTER_TEMPLATE PLAN_INTERSECTOR::PlanarIntersectorP1P0Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, - double md3DSurf, double medianPlane, + double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf, + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf, medianPlane,doRotate,orientation,printLevel) { // SPEC: diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx index d5a393442..36dbb4125 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; public: - PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); + PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; int getNumberOfColsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx index 4d827439f..f4c5b7900 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx @@ -32,9 +32,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP1P0PL::PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0) { } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx index 55be99468..405cbd6f5 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; protected: - PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); + PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx index 79d08a3c3..1bf675613 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx @@ -28,9 +28,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP1P1::PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel) { } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx index 5d6bfb9ba..ada07f842 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; public: - PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); + PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); int getNumberOfRowsOfResMatrix() const; int getNumberOfColsOfResMatrix() const; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx index 37eb3348b..881baf512 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx @@ -31,9 +31,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP1P1PL::PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0) { } diff --git a/src/INTERP_KERNEL/PointLocator2DIntersector.hxx b/src/INTERP_KERNEL/PointLocator2DIntersector.hxx index fa564a3a3..1c82ef095 100644 --- a/src/INTERP_KERNEL/PointLocator2DIntersector.hxx +++ b/src/INTERP_KERNEL/PointLocator2DIntersector.hxx @@ -41,7 +41,7 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; public: PointLocator2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); double intersectGeometry(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS); double intersectGeometryWithQuadrangle(const double *quadrangle, const std::vector& sourceCoords, bool isSourceQuad); double intersectGeometryGeneral(const std::vector& targetCoords, const std::vector& sourceCoords); diff --git a/src/INTERP_KERNEL/PointLocator2DIntersector.txx b/src/INTERP_KERNEL/PointLocator2DIntersector.txx index f92063dd6..39f249652 100644 --- a/src/INTERP_KERNEL/PointLocator2DIntersector.txx +++ b/src/INTERP_KERNEL/PointLocator2DIntersector.txx @@ -38,9 +38,9 @@ namespace INTERP_KERNEL { INTERSECTOR_TEMPLATE PTLOC2D_INTERSECTOR::PointLocator2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, double medianPlane, + double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation): - InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, true, orientation, 0) + InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, true, orientation, 0) { } diff --git a/src/INTERP_KERNEL/TriangulationIntersector.hxx b/src/INTERP_KERNEL/TriangulationIntersector.hxx index 3bed2b615..0f6db14e1 100644 --- a/src/INTERP_KERNEL/TriangulationIntersector.hxx +++ b/src/INTERP_KERNEL/TriangulationIntersector.hxx @@ -39,7 +39,7 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; public: TriangulationIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, int orientation, int printLevel); + double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, int orientation, int printLevel); double intersectGeometry(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS); double intersectGeometryWithQuadrangle(const double *quadrangle, const std::vector& sourceCoords, bool isSourceQuad); double intersectGeometryGeneral(const std::vector& targetCoords, const std::vector& sourceCoords); diff --git a/src/INTERP_KERNEL/TriangulationIntersector.txx b/src/INTERP_KERNEL/TriangulationIntersector.txx index 1fda7d6a7..0a2fcc274 100644 --- a/src/INTERP_KERNEL/TriangulationIntersector.txx +++ b/src/INTERP_KERNEL/TriangulationIntersector.txx @@ -39,9 +39,9 @@ namespace INTERP_KERNEL { TRI_INTER_TEMPLATE TRI_INTERSECTOR::TriangulationIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double DimCaracteristic, double Precision, double md3DSurf, + double DimCaracteristic, double Precision, double md3DSurf, double minDot3DSurf, double MedianPlane, int orientation, int PrintLevel) - :InterpType(meshT,meshS,DimCaracteristic, Precision, md3DSurf, + :InterpType(meshT,meshS,DimCaracteristic, Precision, md3DSurf, minDot3DSurf, MedianPlane, true, orientation, PrintLevel) { if(PlanarIntersector::_print_level >= 1) diff --git a/src/INTERP_KERNELTest/ThreeDSurfProjectionTest.cxx b/src/INTERP_KERNELTest/ThreeDSurfProjectionTest.cxx index f052edbb4..cce28e644 100644 --- a/src/INTERP_KERNELTest/ThreeDSurfProjectionTest.cxx +++ b/src/INTERP_KERNELTest/ThreeDSurfProjectionTest.cxx @@ -48,7 +48,7 @@ void INTERP_TEST::ThreeDSurfProjectionTest::test1() // here the max 3D distance is 1e-5 > 1e-6 so 1 is expected std::copy(coo,coo+9,tmp0); std::copy(coo2,coo2+9,tmp1); - ret=INTERP_KERNEL::PlanarIntersector::projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,0.5,true); + ret=INTERP_KERNEL::PlanarIntersector::Projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,-1.,0.5,true); CPPUNIT_ASSERT_EQUAL(1,ret); const double expected0[9]={0.,0.,0.,1.,0.,0.,0.,1.,0.}; for(int i=0;i<9;i++) @@ -59,12 +59,12 @@ void INTERP_TEST::ThreeDSurfProjectionTest::test1() // here the max 3D distance is 1e-8 < 1e-6 so 0 is expected std::copy(coo,coo+9,tmp0); std::copy(coo2,coo2+9,tmp1); - ret=INTERP_KERNEL::PlanarIntersector::projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,0.5,true); + ret=INTERP_KERNEL::PlanarIntersector::Projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,-1.,0.5,true); CPPUNIT_ASSERT_EQUAL(0,ret); // here testing when max 3D distance is 1e-5 > 1e-6 with inverted cells std::copy(coo,coo+9,tmp0); std::copy(coo2,coo2+3,tmp1+6); std::copy(coo2+3,coo2+6,tmp1+3); std::copy(coo2+6,coo2+9,tmp1); - ret=INTERP_KERNEL::PlanarIntersector::projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,0.5,true); + ret=INTERP_KERNEL::PlanarIntersector::Projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,-1.,0.5,true); CPPUNIT_ASSERT_EQUAL(-1,ret); const double expected1[9]={-0.7071067811865476,-0.7071067811865476,0.,0.,-1.4142135623730951,0.,-1.4142135623730951,-1.4142135623730951,0.}; const double expected2[9]={-1.4142135623730951,-1.4142135623730951,0.,0.,-1.4142135623730951,0.,-0.7071067811865476,-0.7071067811865476,0.}; @@ -93,12 +93,12 @@ void INTERP_TEST::ThreeDSurfProjectionTest::test2() // here the max 3D distance is 1e-5 > 1e-6 so 1 is expected std::copy(coo,coo+9,tmp0); std::copy(coo2,coo2+9,tmp1); - ret=INTERP_KERNEL::PlanarIntersector::projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,0.5,true); + ret=INTERP_KERNEL::PlanarIntersector::Projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,-1.,0.5,true); CPPUNIT_ASSERT_EQUAL(1,ret); // here the max 3D distance is 1e-8 < 1e-6 so 0 is expected std::copy(coo,coo+9,tmp0); std::copy(coo2,coo2+9,tmp1); - ret=INTERP_KERNEL::PlanarIntersector::projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,0.5,true); + ret=INTERP_KERNEL::PlanarIntersector::Projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,-1.,0.5,true); CPPUNIT_ASSERT_EQUAL(0,ret); // delete [] tmp0; diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index 78a180dd4..faf9b24b9 100644 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -1202,7 +1202,7 @@ void MEDCouplingPointSet::project2DCellOnXY(const int *startConn, const int *end { std::vector cpy(res); int nbNodes=(int)std::distance(startConn,endConn); - INTERP_KERNEL::PlanarIntersector::projection(&res[0],&cpy[0],nbNodes,nbNodes,1.e-12,0.,0.,true); + INTERP_KERNEL::PlanarIntersector::Projection(&res[0],&cpy[0],nbNodes,nbNodes,1.e-12,0./*max distance*/,-1./*min dot*/,0.,true); res.resize(2*nbNodes); for(int i=0;i