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<double>& sourceCoords, bool isSourceQuad);
{
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<MyMeshType,MyMatrix,CONVEX_INTERSECTOR_ >(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, doRotate, oriantation, printLevel),
+ :InterpType<MyMeshType,MyMatrix,CONVEX_INTERSECTOR_ >(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, doRotate, oriantation, printLevel),
_epsilon(precision*dimCaracteristic)
{
if(PlanarIntersector<MyMeshType,MyMatrix>::_print_level >= 1)
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);
{
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<MyMeshType,MyMatrix,GEO2D_INTERSECTOR >(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, true, orientation, 0)
+ InterpType<MyMeshType,MyMatrix,GEO2D_INTERSECTOR >(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, true, orientation, 0)
{
QUADRATIC_PLANAR::_precision=precision;
}
case Geometric2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,Planar2D1DIntersectorP0P0>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
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";
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";
_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;
setMaxDistance3DSurfIntersect(value);
return true;
}
+ else if(key==MIN_DOT_BTW_3DSURF_INSECT_STR)
+ {
+ setMinDotBtwPlane3DSurfIntersect(value);
+ return true;
+ }
else
return false;
}
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;
//! 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 ;
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; }
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[];
intersector=new TriangulationIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P0>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getOrientation(),
InterpolationOptions::getPrintLevel());
intersector=new ConvexIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P0>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getDoRotate(),
InterpolationOptions::getOrientation(),
case Geometric2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P0>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
case PointLocator:
intersector=new PointLocator2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P0>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
intersector=new TriangulationIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P1>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getOrientation(),
InterpolationOptions::getPrintLevel());
intersector=new ConvexIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P1>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getDoRotate(),
InterpolationOptions::getOrientation(),
case Geometric2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P1>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
case PointLocator:
intersector=new PlanarIntersectorP0P1PL<MyMeshType,MatrixType>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
intersector=new TriangulationIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P1Bary>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getOrientation(),
InterpolationOptions::getPrintLevel());
case BarycentricGeo2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP0P1Bary>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
intersector=new TriangulationIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P0>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getOrientation(),
InterpolationOptions::getPrintLevel());
intersector=new ConvexIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P0>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getDoRotate(),
InterpolationOptions::getOrientation(),
case Geometric2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P0>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
break;
case PointLocator:
intersector=new PlanarIntersectorP1P0PL<MyMeshType,MatrixType>(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<MyMeshType,MatrixType,PlanarIntersectorP1P0Bary>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getOrientation(),
InterpolationOptions::getPrintLevel());
case BarycentricGeo2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P0Bary>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
intersector=new TriangulationIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P1>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getOrientation(),
InterpolationOptions::getPrintLevel());
intersector=new ConvexIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P1>(myMeshT,myMeshS,_dim_caracteristic,
InterpolationOptions::getPrecision(),
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getDoRotate(),
InterpolationOptions::getOrientation(),
case Geometric2D:
intersector=new Geometric2DIntersector<MyMeshType,MatrixType,PlanarIntersectorP1P1>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
case PointLocator:
intersector=new PlanarIntersectorP1P1PL<MyMeshType,MatrixType>(myMeshT, myMeshS, _dim_caracteristic,
InterpolationOptions::getMaxDistance3DSurfIntersect(),
+ InterpolationOptions::getMinDotBtwPlane3DSurfIntersect(),
InterpolationOptions::getMedianPlane(),
InterpolationOptions::getPrecision(),
InterpolationOptions::getOrientation());
INTERSECTOR_CU2D::IntersectorCU2D(const MyCMeshType& meshS,
const MyUMeshType& meshT):
IntersectorCU<MyCMeshType, MyUMeshType, MyMatrix, IntersectorCU2D<MyCMeshType,MyUMeshType,MyMatrix> >( 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 )
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;
{
template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
Planar2D1DIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel)
{
}
typedef typename std::map<int,std::set<int> > 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<double>& bbox);
void adjustBoundingBoxes(std::vector<double>& 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;
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;
namespace INTERP_KERNEL
{
template<class MyMeshType, class MyMatrix>
- PlanarIntersector<MyMeshType,MyMatrix>::PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel):
+ PlanarIntersector<MyMeshType,MyMatrix>::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)
template<class MyMeshType, class MyMatrix>
int PlanarIntersector<MyMeshType,MyMatrix>::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<class MyMeshType, class MyMatrix>
- int PlanarIntersector<MyMeshType,MyMatrix>::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<MyMeshType,MyMatrix>::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};
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;
{
template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel)
{
}
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
{
template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
PlanarIntersectorP0P1<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel)
{
}
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
PlanarIntersectorP0P1Bary<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,
- medianPlane,doRotate,orientation,printLevel)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,
+ medianPlane,doRotate,orientation,printLevel)
{
// SPEC:
// "Limitation. For the P0P1 barycentric improvement only triangle target cells in 2D and
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
int getNumberOfColsOfResMatrix() const;
{
template<class MyMeshType, class MyMatrix>
PlanarIntersectorP0P1PL<MyMeshType,MyMatrix>::PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS,
- double dimCaracteristic, double md3DSurf,
+ double dimCaracteristic, double md3DSurf, double minDot3DSurf,
double medianPlane, double precision, int orientation):
- PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0)
{
}
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
{
template<class MyMeshType, class MyMatrix, class ConcreteP1P0Intersector>
PlanarIntersectorP1P0<MyMeshType,MyMatrix,ConcreteP1P0Intersector>::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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel)
{
}
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,
medianPlane,doRotate,orientation,printLevel)
{
// SPEC:
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
int getNumberOfColsOfResMatrix() const;
{
template<class MyMeshType, class MyMatrix>
PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS,
- double dimCaracteristic, double md3DSurf,
+ double dimCaracteristic, double md3DSurf, double minDot3DSurf,
double medianPlane, double precision, int orientation):
- PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0)
{
}
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
{
template<class MyMeshType, class MyMatrix, class ConcreteP1P1Intersector>
PlanarIntersectorP1P1<MyMeshType,MyMatrix,ConcreteP1P1Intersector>::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<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,doRotate,orientation,printLevel)
{
}
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<ConnType>& icellsS, MyMatrix& res);
int getNumberOfRowsOfResMatrix() const;
int getNumberOfColsOfResMatrix() const;
{
template<class MyMeshType, class MyMatrix>
PlanarIntersectorP1P1PL<MyMeshType,MyMatrix>::PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS,
- double dimCaracteristic, double md3DSurf,
+ double dimCaracteristic, double md3DSurf, double minDot3DSurf,
double medianPlane, double precision, int orientation):
- PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0)
+ PlanarIntersector<MyMeshType,MyMatrix>(meshT,meshS,dimCaracteristic,precision,md3DSurf,minDot3DSurf,medianPlane,true,orientation,0)
{
}
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<double>& sourceCoords, bool isSourceQuad);
double intersectGeometryGeneral(const std::vector<double>& targetCoords, const std::vector<double>& sourceCoords);
{
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<MyMeshType,MyMatrix,PTLOC2D_INTERSECTOR >(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, true, orientation, 0)
+ InterpType<MyMeshType,MyMatrix,PTLOC2D_INTERSECTOR >(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, true, orientation, 0)
{
}
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<double>& sourceCoords, bool isSourceQuad);
double intersectGeometryGeneral(const std::vector<double>& targetCoords, const std::vector<double>& sourceCoords);
{
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<MyMeshType,MyMatrix,TRI_INTERSECTOR >(meshT,meshS,DimCaracteristic, Precision, md3DSurf,
+ :InterpType<MyMeshType,MyMatrix,TRI_INTERSECTOR >(meshT,meshS,DimCaracteristic, Precision, md3DSurf, minDot3DSurf,
MedianPlane, true, orientation, PrintLevel)
{
if(PlanarIntersector<MyMeshType,MyMatrix>::_print_level >= 1)
// 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<MyMeshType,MyMatrixType>::projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,0.5,true);
+ ret=INTERP_KERNEL::PlanarIntersector<MyMeshType,MyMatrixType>::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++)
// 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<MyMeshType,MyMatrixType>::projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,0.5,true);
+ ret=INTERP_KERNEL::PlanarIntersector<MyMeshType,MyMatrixType>::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<MyMeshType,MyMatrixType>::projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,0.5,true);
+ ret=INTERP_KERNEL::PlanarIntersector<MyMeshType,MyMatrixType>::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.};
// 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<MyMeshType,MyMatrixType>::projection(tmp0,tmp1,3,3,1e-2,1e-5/* <- */,0.5,true);
+ ret=INTERP_KERNEL::PlanarIntersector<MyMeshType,MyMatrixType>::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<MyMeshType,MyMatrixType>::projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,0.5,true);
+ ret=INTERP_KERNEL::PlanarIntersector<MyMeshType,MyMatrixType>::Projection(tmp0,tmp1,3,3,1e-2,1e-8/* <- */,-1.,0.5,true);
CPPUNIT_ASSERT_EQUAL(0,ret);
//
delete [] tmp0;
{
std::vector<double> cpy(res);
int nbNodes=(int)std::distance(startConn,endConn);
- INTERP_KERNEL::PlanarIntersector<DummyClsMCPS,int>::projection(&res[0],&cpy[0],nbNodes,nbNodes,1.e-12,0.,0.,true);
+ INTERP_KERNEL::PlanarIntersector<DummyClsMCPS,int>::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<nbNodes;i++)
{