Bounds *Bounds::nearlyAmIIntersectingWith(const Bounds& other) const
{
- if( (other._x_min > _x_max+QUADRATIC_PLANAR::_precision) || (other._x_max < _x_min-QUADRATIC_PLANAR::_precision) || (other._y_min > _y_max+QUADRATIC_PLANAR::_precision)
- || (other._y_max < _y_min-QUADRATIC_PLANAR::_precision) )
+ double eps = QuadraticPlanarPrecision::getPrecision();
+ if( (other._x_min > _x_max+eps) || (other._x_max < _x_min-eps) || (other._y_min > _y_max+eps)
+ || (other._y_max < _y_min-eps) )
return 0;
if( (other._x_min >= _x_max ) || (other._x_max <= _x_min) || (other._y_min >= _y_max) || (other._y_max <= _y_min) )
{
- return new Bounds(std::max(_x_min-QUADRATIC_PLANAR::_precision,other._x_min),
- std::min(_x_max+QUADRATIC_PLANAR::_precision,other._x_max),
- std::max(_y_min-QUADRATIC_PLANAR::_precision,other._y_min),
- std::min(_y_max+QUADRATIC_PLANAR::_precision,other._y_max));//In approx cases.
+ return new Bounds(std::max(_x_min-eps,other._x_min),
+ std::min(_x_max+eps,other._x_max),
+ std::max(_y_min-eps,other._y_min),
+ std::min(_y_max+eps,other._y_max));//In approx cases.
}
else
return new Bounds(std::max(_x_min,other._x_min),std::min(_x_max,other._x_max),std::max(_y_min,other._y_min),std::min(_y_max,other._y_max));
bool thinY=Node::areDoubleEquals(_y_min,_y_max);
if(!thinX)
{
- if((Node::areDoubleEquals(x,_x_min) || Node::areDoubleEquals(x,_x_max)) && ((y<_y_max+QUADRATIC_PLANAR::_precision) && (y>_y_min-QUADRATIC_PLANAR::_precision)))
+ if((Node::areDoubleEquals(x,_x_min) || Node::areDoubleEquals(x,_x_max)) && ((y<_y_max+QuadraticPlanarPrecision::getPrecision()) && (y>_y_min-QuadraticPlanarPrecision::getPrecision())))
return ON_BOUNDARY_POS;
}
else
return OUT;
if(!thinY)
{
- if((Node::areDoubleEquals(y,_y_min) || Node::areDoubleEquals(y,_y_max)) && ((x<_x_max+QUADRATIC_PLANAR::_precision) && (x>_x_min-QUADRATIC_PLANAR::_precision)))
+ if((Node::areDoubleEquals(y,_y_min) || Node::areDoubleEquals(y,_y_max)) && ((x<_x_max+QuadraticPlanarPrecision::getPrecision()) && (x>_x_min-QuadraticPlanarPrecision::getPrecision())))
return ON_BOUNDARY_POS;
}
else
std::set<Node *> nodes;
getAllNodes(nodes);
for(std::set<Node *>::const_iterator iter=nodes.begin();iter!=nodes.end();iter++)
- if(sqrt((*iter)->distanceWithSq(*nodeToTest))<QUADRATIC_PLANAR::_precision)
+ if(sqrt((*iter)->distanceWithSq(*nodeToTest))<QuadraticPlanarPrecision::getPrecision())
return true;
double ref(isInOrOutAlg(nodeToTest,nodes,inOutSwitch));
bool ret(false);
for(std::set< IntersectElement >::iterator iter4=inOutSwitch.begin();iter4!=inOutSwitch.end();iter4++)
{
double val((*iter4).getVal1());
- if(fabs(val-ref)>=QUADRATIC_PLANAR::_precision)
+ if(fabs(val-ref)>=QuadraticPlanarPrecision::getPrecision())
{
if(val<ref)
{
inline bool eqpair(const std::pair<double,Node *>& p1, const std::pair<double,Node *>& p2)
{
- return fabs(p1.first-p2.first)<QUADRATIC_PLANAR::_precision;
+ return fabs(p1.first-p2.first)<QuadraticPlanarPrecision::getPrecision();
}
/**
for(std::vector< std::pair<double,Node *> >::const_iterator it=an2.begin();it!=itend;it++)
{
int idd=(*mapp2.find((*it).second)).second;
- if((*it).first<QUADRATIC_PLANAR::_precision)
+ if((*it).first<QuadraticPlanarPrecision::getPrecision())
{
startId=idd;
continue;
}
- if((*it).first>1-QUADRATIC_PLANAR::_precision)
+ if((*it).first>1-QuadraticPlanarPrecision::getPrecision())
{
endId=idd;
continue;
{
_dist=Node::distanceBtw2Pt(getE1().getCenter(),getE2().getCenter());
double radius1=getE1().getRadius(); double radius2=getE2().getRadius();
- if(_dist>radius1+radius2+QUADRATIC_PLANAR::_precision || _dist+std::min(radius1,radius2)+QUADRATIC_PLANAR::_precision<std::max(radius1,radius2))
+ if(_dist>radius1+radius2+QuadraticPlanarPrecision::getPrecision() || _dist+std::min(radius1,radius2)+QuadraticPlanarPrecision::getPrecision()<std::max(radius1,radius2))
{
obviousNoIntersection=true;
areOverlapped=false;
((*(_e2.getStartNode()))[0]-center[0])*((*(_e2.getEndNode()))[1]-center[1])-
((*(_e2.getStartNode()))[1]-center[1])*((*(_e2.getEndNode()))[0]-center[0]);
_determinant=getE1().getRadius()*getE1().getRadius()/_drSq-_cross*_cross/(_drSq*_drSq);
- if(_determinant>-2*QUADRATIC_PLANAR::_precision)//QUADRATIC_PLANAR::_precision*QUADRATIC_PLANAR::_precision*_drSq*_drSq/(2.*_dx*_dx))
+ if(_determinant>-2*QuadraticPlanarPrecision::getPrecision())//QuadraticPlanarPrecision::getPrecision()*QuadraticPlanarPrecision::getPrecision()*_drSq*_drSq/(2.*_dx*_dx))
obviousNoIntersection=false;
else
obviousNoIntersection=true;
{
std::list< IntersectElement > ret;
const double *center=getE1().getCenter();
- if(!(fabs(_determinant)<(2.*QUADRATIC_PLANAR::_precision)))//QUADRATIC_PLANAR::_precision*QUADRATIC_PLANAR::_precision*_drSq*_drSq/(2.*_dx*_dx))
+ if(!(fabs(_determinant)<(2.*QuadraticPlanarPrecision::getPrecision())))//QuadraticPlanarPrecision::getPrecision()*QuadraticPlanarPrecision::getPrecision()*_drSq*_drSq/(2.*_dx*_dx))
{
double determinant=EdgeArcCircle::SafeSqrt(_determinant);
double x1=(_cross*_dy/_drSq+Node::sign(_dy)*_dx*determinant)+center[0];
//
double myDelta1(angle1-_angle0),myDelta2(angle2-_angle0);
if(_angle>0.)
- { myDelta1=myDelta1>-QUADRATIC_PLANAR::_precision?myDelta1:myDelta1+2.*M_PI; myDelta2=myDelta2>-QUADRATIC_PLANAR::_precision?myDelta2:myDelta2+2.*M_PI; }
+ { myDelta1=myDelta1>-QuadraticPlanarPrecision::getPrecision()?myDelta1:myDelta1+2.*M_PI; myDelta2=myDelta2>-QuadraticPlanarPrecision::getPrecision()?myDelta2:myDelta2+2.*M_PI; }
else
- { myDelta1=myDelta1<QUADRATIC_PLANAR::_precision?myDelta1:myDelta1-2.*M_PI; myDelta2=myDelta2<QUADRATIC_PLANAR::_precision?myDelta2:myDelta2-2.*M_PI; }
+ { myDelta1=myDelta1<QuadraticPlanarPrecision::getPrecision()?myDelta1:myDelta1-2.*M_PI; myDelta2=myDelta2<QuadraticPlanarPrecision::getPrecision()?myDelta2:myDelta2-2.*M_PI; }
////
mid[0]=_center[0]+_radius*cos(_angle0+(myDelta1+myDelta2)/2.);
mid[1]=_center[1]+_radius*sin(_angle0+(myDelta1+myDelta2)/2.);
double myDelta2=val2-_angle0;
if(_angle>0.)
{
- myDelta1=myDelta1>-(_radius*QUADRATIC_PLANAR::_precision)?myDelta1:myDelta1+2.*M_PI;//in some cases val1 or val2 are so close to angle0 that myDelta is close to 0. but negative.
- myDelta2=myDelta2>-(_radius*QUADRATIC_PLANAR::_precision)?myDelta2:myDelta2+2.*M_PI;
+ myDelta1=myDelta1>-(_radius*QuadraticPlanarPrecision::getPrecision())?myDelta1:myDelta1+2.*M_PI;//in some cases val1 or val2 are so close to angle0 that myDelta is close to 0. but negative.
+ myDelta2=myDelta2>-(_radius*QuadraticPlanarPrecision::getPrecision())?myDelta2:myDelta2+2.*M_PI;
return myDelta1<myDelta2;
}
else
{
- myDelta1=myDelta1<(_radius*QUADRATIC_PLANAR::_precision)?myDelta1:myDelta1-2.*M_PI;
- myDelta2=myDelta2<(_radius*QUADRATIC_PLANAR::_precision)?myDelta2:myDelta2-2.*M_PI;
+ myDelta1=myDelta1<(_radius*QuadraticPlanarPrecision::getPrecision())?myDelta1:myDelta1-2.*M_PI;
+ myDelta2=myDelta2<(_radius*QuadraticPlanarPrecision::getPrecision())?myDelta2:myDelta2-2.*M_PI;
return myDelta2<myDelta1;
}
}
bool SegSegIntersector::areColinears() const
{
double determinant=_matrix[0]*_matrix[3]-_matrix[1]*_matrix[2];
- return fabs(determinant)<QUADRATIC_PLANAR::_arc_detection_precision;
+ return fabs(determinant)<QuadraticPlanarArcDetectionPrecision::getArcDetectionPrecision();
}
/*!
* Should be called \b once ! non const method.
* \param whereToFind specifies the box where final seek should be done. Essentially it is used for caracteristic reason.
- * \param colinearity returns if regarding QUADRATIC_PLANAR::_precision ; e1 and e2 are colinears
+ * \param colinearity returns if regarding QuadraticPlanarPrecision::getPrecision() ; e1 and e2 are colinears
* If true 'this' is modified ! So this method be called once above all if true is returned for this parameter.
* \param areOverlapped if colinearity if true, this parameter looks if e1 and e2 are overlapped.
*/
void SegSegIntersector::areOverlappedOrOnlyColinears(const Bounds *whereToFind, bool& colinearity, bool& areOverlapped)
{
double determinant=_matrix[0]*_matrix[3]-_matrix[1]*_matrix[2];
- if(fabs(determinant)>2.*QUADRATIC_PLANAR::_precision)//2*_precision due to max of offset on _start and _end
+ if(fabs(determinant)>2.*QuadraticPlanarPrecision::getPrecision())//2*_precision due to max of offset on _start and _end
{
colinearity=false; areOverlapped=false;
_matrix[0]/=determinant; _matrix[1]/=determinant; _matrix[2]/=determinant; _matrix[3]/=determinant;
double deno=sqrt(_matrix[0]*_matrix[0]+_matrix[1]*_matrix[1]);
double x=(*(_e1.getStartNode()))[0]-(*(_e2.getStartNode()))[0];
double y=(*(_e1.getStartNode()))[1]-(*(_e2.getStartNode()))[1];
- areOverlapped=fabs((_matrix[1]*y+_matrix[0]*x)/deno)<QUADRATIC_PLANAR::_precision;
+ areOverlapped=fabs((_matrix[1]*y+_matrix[0]*x)/deno)<QuadraticPlanarPrecision::getPrecision();
}
}
static double dot(const double *vect1, const double *vect2) { return vect1[0]*vect2[0]+vect1[1]*vect2[1]; }
static double sign(double val) { if(val>=0) return 1.; else return -1.; }
static double norm(const double *vect) { return sqrt(vect[0]*vect[0]+vect[1]*vect[1]); }
- static bool areDoubleEquals(double a, double b) { return fabs(a-b) < QUADRATIC_PLANAR::_precision; }
+ static bool areDoubleEquals(double a, double b) { return fabs(a-b) < QuadraticPlanarPrecision::getPrecision(); }
//! idem areDoubleEquals except that precision of comparison is modified.
- static bool areDoubleEqualsWP(double a, double b, double k) { return fabs(a-b) < k*QUADRATIC_PLANAR::_precision; }
+ static bool areDoubleEqualsWP(double a, double b, double k) { return fabs(a-b) < k*QuadraticPlanarPrecision::getPrecision(); }
static double distanceBtw2Pt(const double *a, const double *b) { return sqrt((a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1])); }
static double distanceBtw2PtSq(const double *a, const double *b) { return (a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1]); }
//
#include "InterpKernelGeo2DPrecision.hxx"
-double INTERP_KERNEL::QUADRATIC_PLANAR::_precision=1e-14;
+double INTERP_KERNEL::QuadraticPlanarPrecision::_precision=1e-14;
+double INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::_arc_detection_precision=1e-14;
+
+INTERP_KERNEL::QuadraticPlanarPrecision::QuadraticPlanarPrecision(double precision):
+ _initial_precision(_precision)
+{
+ _precision=precision;
+}
+
+INTERP_KERNEL::QuadraticPlanarPrecision::~QuadraticPlanarPrecision()
+{
+ _precision = _initial_precision;
+}
+
+INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::QuadraticPlanarArcDetectionPrecision(double precision):
+ _initial_arc_detection_precision(_arc_detection_precision)
+{
+ _arc_detection_precision=precision;
+}
+
+INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::~QuadraticPlanarArcDetectionPrecision()
+{
+ _arc_detection_precision = _initial_arc_detection_precision;
+}
-double INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=1e-14;
-void INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(double precision)
+void INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(double precision)
{
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=precision;
+ _precision=precision;
}
-void INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(double precision)
+void INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(double precision)
{
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=precision;
+ _arc_detection_precision=precision;
}
namespace INTERP_KERNEL
{
- class INTERPKERNEL_EXPORT QUADRATIC_PLANAR
+ /* !!TODO: a more global review of the code should be done, so that eps is always a parameter of all methods
+ instead of being stored as a static attribute.
+ */
+
+ /** Class storing the precision for the detection of colinear segments, coincident points, etc ...
+ * in Geometric2D computations.
+ *
+ * RAII pattern allowing to temporarily override Geometric2D precision.
+ * When the instance is destroyed, the previous precision is set back.
+ *
+ */
+ class QuadraticPlanarPrecision
{
public:
- static double _precision;
- static double _arc_detection_precision;
+ QuadraticPlanarPrecision(double prec);
+ virtual ~QuadraticPlanarPrecision();
+
static void setPrecision(double precision);
+ inline static double getPrecision() { return _precision; }
+ private:
+ static double _precision;
+ double _initial_precision;
+ };
+
+ /** Class storing the precision for the detection of degenerated arc of circles
+ * in Geometric2D computations.
+ *
+ * RAII pattern allowing to temporarily override Geometric2D precision.
+ * When the instance is destroyed, the previous precision is set back.
+ */
+ class QuadraticPlanarArcDetectionPrecision
+ {
+ public:
+ QuadraticPlanarArcDetectionPrecision(double prec);
+ virtual ~QuadraticPlanarArcDetectionPrecision();
+
static void setArcDetectionPrecision(double precision);
+ inline static double getArcDetectionPrecision() { return _arc_detection_precision; }
+ private:
+ static double _arc_detection_precision;
+ double _initial_arc_detection_precision;
+
};
}
#endif
+
QuadraticPolygon *buildPolygonOfOneEdgeFrom(const std::vector<double>& coords, NormalizedCellType type);
QuadraticPolygon *buildPolygonAFrom(ConnType cell, int nbOfPoints, NormalizedCellType type);
QuadraticPolygon *buildPolygonBFrom(ConnType cell, int nbOfPoints, NormalizedCellType type);
+
+ QuadraticPlanarPrecision _precision;
};
}
GEO2D_INTERSECTOR::Geometric2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS,
double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane,
double precision, int orientation):
- InterpType<MyMeshType,MyMatrix,GEO2D_INTERSECTOR >(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, true, orientation, 0)
+ InterpType<MyMeshType,MyMatrix,GEO2D_INTERSECTOR >(meshT,meshS,dimCaracteristic, precision, md3DSurf, minDot3DSurf, medianPlane, true, orientation, 0),
+ _precision(precision)
{
- QUADRATIC_PLANAR::_precision=precision;
}
INTERSECTOR_TEMPLATE
double INTERP_KERNEL::InterpolationOptions::getArcDetectionPrecision() const
{
- return INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision;
+ return INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::getArcDetectionPrecision();
}
void INTERP_KERNEL::InterpolationOptions::setArcDetectionPrecision(double p)
{
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=p;
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(p);
}
std::string INTERP_KERNEL::InterpolationOptions::getIntersectionTypeRepr() const
delete intersector; e2->decrRef(); e1->decrRef();
}
// Tangent intersection
- QUADRATIC_PLANAR::setPrecision(1e-5);
+ QuadraticPlanarPrecision::setPrecision(1e-5);
for(unsigned k=0;k<8;k++)
{
double center2[2]; center[0]=0.; center[1]=0.;
v4.clear(); v4.clear();
delete intersector; e2->decrRef(); e1->decrRef();
}
- QUADRATIC_PLANAR::setPrecision(1e-14);
+ QuadraticPlanarPrecision::setPrecision(1e-14);
// Extremities # 1
for(unsigned k=0;k<8;k++)
{
*/
void QuadraticPlanarInterpTest::checkHighLevelFunctionTest1()
{
- QUADRATIC_PLANAR::setPrecision(1e-12);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-9);
+ QuadraticPlanarPrecision::setPrecision(1e-12);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-9);
double coords[]={
8.8334591186000004, 5.0999999999999996,
7.1014083111000001, 6.0999999999999996,
pol=QuadraticPolygon::BuildArcCirclePolygon(nodes);
pol->getBarycenter(tmp,tmp2);
delete pol;
- QUADRATIC_PLANAR::setPrecision(1e-14);
+ QuadraticPlanarPrecision::setPrecision(1e-14);
}
void QuadraticPlanarInterpTest::check1DInterpLin()
{
- QUADRATIC_PLANAR::setPrecision(1e-7);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-9);
+ QuadraticPlanarPrecision::setPrecision(1e-7);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-9);
const int NB_OF_CELL_AXIAL_1=30;
static const double Z_VALS_1[NB_OF_CELL_AXIAL_1+1]=
{ -0.1550 , -0.1356, -0.1162, -0.0969, -0.0775 ,-0.0581, -0.0387, -0.0194, 0.0000 , 0.0500,
CPPUNIT_ASSERT_EQUAL(1,(int)m[i+2].size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,m[i+2][i+9],1e-12);
}
- QUADRATIC_PLANAR::setPrecision(1e-14);
+ QuadraticPlanarPrecision::setPrecision(1e-14);
}
/*!
*/
void QuadraticPlanarInterpTest::checkEpsilonCoherency1()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-12);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-5);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-12);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-5);
const double pol1[]={
-2.1083388455000001, 1.2172499999999999,
void QuadraticPlanarInterpTest::checkNonRegression2()
{
- QUADRATIC_PLANAR::setPrecision(1e-12);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-9);
+ QuadraticPlanarPrecision::setPrecision(1e-12);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-9);
double coords1[]=
{
15.141499999899999, -26.226033271399999,
void QuadraticPlanarInterpTest::checkNonRegression4()
{
- QUADRATIC_PLANAR::setPrecision(1e-12);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-9);
+ QuadraticPlanarPrecision::setPrecision(1e-12);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-9);
double coords1[]=
{
10.962340811000001, -22.417749999000002,
void QuadraticPlanarInterpTest::checkNonRegression5()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-12);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-5);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-12);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-5);
double coords1[]=
{
-1.7320508075000001, 1,
void QuadraticPlanarInterpTest::checkNonRegression6()
{
- QUADRATIC_PLANAR::setPrecision(1e-12);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-5);
+ QuadraticPlanarPrecision::setPrecision(1e-12);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-5);
double coords1[]=
{
10.962340811000001, -22.417749999000002,
void QuadraticPlanarInterpTest::checkNonRegression7()
{
- QUADRATIC_PLANAR::setPrecision(1e-5);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-5);
+ QuadraticPlanarPrecision::setPrecision(1e-5);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-5);
double coords1[]=
{
-2., 0,
void QuadraticPlanarInterpTest::checkNonRegression8()
{
- QUADRATIC_PLANAR::setPrecision(1e-3);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-5);
+ QuadraticPlanarPrecision::setPrecision(1e-3);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-5);
double coords1[]=
{
-13.933240959000001, -28.559499999,
void QuadraticPlanarInterpTest::checkNonRegression9()
{
- QUADRATIC_PLANAR::setPrecision(1e-7);
- QUADRATIC_PLANAR::setArcDetectionPrecision(1e-8);
+ QuadraticPlanarPrecision::setPrecision(1e-7);
+ QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-8);
double coords1[]=
{
-0.04476229252902969, -0.085118027765365603,
void QuadraticPlanarInterpTest::checkNonRegression10()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords1[]=
{ -0.002269581957210453, -0.09851030343724453,
-0.004268022334182935, -0.1059685844580936,
void QuadraticPlanarInterpTest::checkNonRegression11()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords1[]=
{ -0.002269581957210453, -0.09851030343724453,
-0.004268022334182935, -0.1059685844580936,
void QuadraticPlanarInterpTest::checkNonRegression12()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-6);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-6);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords1[]=
{ -0.5032251558760915, -0.8716087994449138,
-0.4695268343089433, -0.8806382374805872,
void QuadraticPlanarInterpTest::checkNonRegression13()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-6);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-6);
double coords_1[194]={
0, 0, 0.304375, -7.454791178893722e-17, 0.2152256265236553, -0.2152256265236555, -5.591093384170291e-17, -0.304375,
*/
void QuadraticPlanarInterpTest::checkNonRegression14()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-6);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-6);
double coords[72]={
1.,0.,1.3,0.,-1.3,0.,-1.,0.,1.15,0.,0.,1.3,-1.15,0.,0.,1.,
*/
void QuadraticPlanarInterpTest::checkNonRegression15()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-6);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-6);
double coords[72]={
1.,0.,1.3,0.,-1.3,0.,-1.,0.,1.15,0.,0.,1.3,-1.15,0.,0.,1.,
*/
void QuadraticPlanarInterpTest::checkNonRegression16()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords1[194]={
0, 0, 0.304375, 0, 0.2152256265236554, 0.2152256265236554, 1.86369779472343e-17, 0.304375,
-0.2152256265236554, 0.2152256265236554, -0.304375, 3.727395589446861e-17, -0.2152256265236555, -0.2152256265236554, -5.591093384170291e-17, -0.304375,
*/
void QuadraticPlanarInterpTest::checkNonRegression17()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1., 0., 1., 0. , 1.5, 0., -1.5, 0.,
0. , 1., 1.25, 0., 0., 1.5, -1.25, 0.};
void QuadraticPlanarInterpTest::checkNormalize()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-14);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-14);
Node *n1=new Node(0.,0.); Node *n4=new Node(0.,-3.);
Node *n2=new Node(10.,0.); Node *n5=new Node(10.,-3.);
Node *n3=new Node(5.,10.); Node *n6=new Node(5.,7.);
void QuadraticPlanarInterpTest::checkMakePartitionAbs1()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-14);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-14);
Node *n0=new Node(0.,0.); Node *n4=new Node(0.5,0.25);
Node *n1=new Node(0.,0.5); Node *n5=new Node(0.3,1.2);
Node *n2=new Node(1.,0.5); Node *n6=new Node(1.1,1.3);
void QuadraticPlanarInterpTest::checkNonRegressionOmar0000()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.5745333323392334, 0.4820907072649046, 0.5745333323392335, 0.4820907072649044, 0.383022221559489, 0.3213938048432696,
-0.4787777769493612, 0.4017422560540872, 4.592273826833915e-17, 0.75, 0.4787777769493612, 0.401742256054087, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0001()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.5745333323392334, 0.4820907072649046, 0.5745333323392335, 0.4820907072649044, 0.383022221559489, 0.3213938048432696,
-0.4787777769493612, 0.4017422560540872, 4.592273826833915e-17, 0.75, 0.4787777769493612, 0.401742256054087, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0002()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.5745333323392334, 0.4820907072649046, 0.5745333323392335, 0.4820907072649044, 0.383022221559489, 0.3213938048432696,
-0.4787777769493612, 0.4017422560540872, 4.592273826833915e-17, 0.75, 0.4787777769493612, 0.401742256054087, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0003()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.3535533905932737, 0.3535533905932738, -0.5303300858899106, 0.5303300858899107, 0.5303300858899107, 0.5303300858899106, 0.3535533905932738, 0.3535533905932737,
-0.4419417382415922, 0.4419417382415922, 4.592273826833915e-17, 0.75, 0.4419417382415922, 0.4419417382415922, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0004()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.4596194077712559, 0.4596194077712559, -0.5303300858899106, 0.5303300858899107, 0.5303300858899107, 0.5303300858899106, 0.4596194077712559, 0.4596194077712559,
-0.4949747468305832, 0.4949747468305833, 4.592273826833915e-17, 0.75, 0.4949747468305833, 0.4949747468305832, 3.979970649922726e-17, 0.65 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0005()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.6128355544951823, 0.5142300877492316, 0.6128355544951825, 0.5142300877492314, 0.383022221559489, 0.3213938048432696,
-0.4979288880273356, 0.4178119462962507, 4.898425415289509e-17, 0.8, 0.4979288880273357, 0.4178119462962505, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0006()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.5362311101832845, 0.4499513267805776, 0.5362311101832846, 0.4499513267805774, 0.383022221559489, 0.3213938048432696,
-0.4596266658713867, 0.3856725658119237, 4.28612223837832e-17, 0.7, 0.4596266658713868, 0.3856725658119236, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0007()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.5362311101832845, 0.4499513267805776, 0.5362311101832846, 0.4499513267805774, 0.383022221559489, 0.3213938048432696,
-0.4596266658713867, 0.3856725658119237, 4.28612223837832e-17, 0.7, 0.4596266658713868, 0.3856725658119236, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0008()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.383022221559489, 0.3213938048432697, -0.5362311101832845, 0.4499513267805776, 0.5362311101832846, 0.4499513267805774, 0.383022221559489, 0.3213938048432696,
-0.4596266658713867, 0.3856725658119237, 4.28612223837832e-17, 0.7, 0.4596266658713868, 0.3856725658119236, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0009()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.3863703305156274, -0.1035276180410081, -0.4829629131445342, -0.1294095225512602, 0.4829629131445342, -0.1294095225512604, 0.3863703305156274, -0.1035276180410083,
-0.4346666218300808, -0.1164685702961342, 1.416374613080751e-16, 0.5, 0.4346666218300808, -0.1164685702961343, 1.133099690464601e-16, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0010()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.3863703305156274, -0.1035276180410081, -0.4829629131445342, -0.1294095225512602, 0.4829629131445342, -0.1294095225512604, 0.3863703305156274, -0.1035276180410083,
-0.4346666218300808, -0.1164685702961342, 1.416374613080751e-16, 0.5, 0.4346666218300808, -0.1164685702961343, 1.133099690464601e-16, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0011()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.3863703305156274, -0.1035276180410081, -0.4829629131445342, -0.1294095225512602, 0.4829629131445342, -0.1294095225512604, 0.3863703305156274, -0.1035276180410083,
-0.4346666218300808, -0.1164685702961342, 1.416374613080751e-16, 0.5, 0.4346666218300808, -0.1164685702961343, 1.133099690464601e-16, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar2511()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.3863703305156274, -0.1035276180410081, -0.4829629131445342, -0.1294095225512602, 0.4829629131445342, -0.1294095225512604, 0.3863703305156274, -0.1035276180410083,
-0.4346666218300808, -0.1164685702961342, 1.416374613080751e-16, 0.5, 0.4346666218300808, -0.1164685702961343, 1.133099690464601e-16, 0.4, };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0012()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0013()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0014()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0015()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0016()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0017()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0018()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-1, 1.224606353822377e-16, -1.6, 1.959370166115804e-16, 9.796850830579018e-17, 1.6, 6.123031769111886e-17, 1,
-1.3, 1.591988259969091e-16, -1.131370849898476, 1.131370849898476, 7.959941299845453e-17, 1.3, -0.7071067811865475, 0.7071067811865476 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0019()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0020()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0021()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
}
void QuadraticPlanarInterpTest::checkNonRegressionOmar0022()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0023()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5, };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0024()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar2524()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0025()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.5, 6.123031769111886e-17, -0.8, 9.796850830579018e-17, 0.8, 0, 0.5, 0,
-0.65, 7.959941299845453e-17, 4.898425415289509e-17, 0.8, 0.65, 0, 3.061515884555943e-17, 0.5 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0026()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.4, 4.898425415289509e-17, -0.75, 9.184547653667829e-17, 0.75, 0, 0.4, 0,
-0.575, 7.041486534478669e-17, 4.592273826833915e-17, 0.75, 0.575, 0, 2.449212707644755e-17, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0027()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.4, 4.898425415289509e-17, -0.75, 9.184547653667829e-17, 0.75, 0, 0.4, 0,
-0.575, 7.041486534478669e-17, 4.592273826833915e-17, 0.75, 0.575, 0, 2.449212707644755e-17, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0028()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.4, 4.898425415289509e-17, -0.75, 9.184547653667829e-17, 0.75, 0, 0.4, 0,
-0.575, 7.041486534478669e-17, 4.592273826833915e-17, 0.75, 0.575, 0, 2.449212707644755e-17, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0029()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.4, 4.898425415289509e-17, -0.75, 9.184547653667829e-17, 0.75, 0, 0.4, 0,
-0.575, 7.041486534478669e-17, 4.592273826833915e-17, 0.75, 0.575, 0, 2.449212707644755e-17, 0.4 };
void QuadraticPlanarInterpTest::checkNonRegressionOmar0030()
{
- INTERP_KERNEL::QUADRATIC_PLANAR::setPrecision(1e-7);
- INTERP_KERNEL::QUADRATIC_PLANAR::setArcDetectionPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarPrecision::setPrecision(1e-7);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision::setArcDetectionPrecision(1e-7);
double coords[16]={
-0.4, 4.898425415289509e-17, -0.75, 9.184547653667829e-17, 0.75, 0, 0.4, 0,
-0.575, 7.041486534478669e-17, 4.592273826833915e-17, 0.75, 0.575, 0, 2.449212707644755e-17, 0.4 };
*/
bool MEDCouplingPointSet::isButterfly2DCell(const std::vector<double>& res, bool isQuad, double eps)
{
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
+
std::size_t nbOfNodes(res.size()/2);
std::vector<INTERP_KERNEL::Node *> nodes(nbOfNodes);
for(std::size_t i=0;i<nbOfNodes;i++)
INTERP_KERNEL::Node *tmp=new INTERP_KERNEL::Node(res[2*i],res[2*i+1]);
nodes[i]=tmp;
}
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
INTERP_KERNEL::QuadraticPolygon *pol=0;
if(isQuad)
pol=INTERP_KERNEL::QuadraticPolygon::BuildArcCirclePolygon(nodes);
DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arcDetEps) const
{
checkFullyDefined();
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(arcDetEps);
+
int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
if(spaceDim!=2 || mDim!=2)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic : This method should be applied on mesh with mesh dimension equal to 2 and space dimension also equal to 2!");
{
const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[*connI]));
int sz(connI[1]-connI[0]-1);
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=arcDetEps;
std::vector<INTERP_KERNEL::Node *> nodes(sz);
INTERP_KERNEL::QuadraticPolygon *pol(0);
for(int j=0;j<sz;j++)
int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
if(spaceDim!=2 || mDim!=1)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic : This method should be applied on mesh with mesh dimension equal to 1 and space dimension also equal to 2!");
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(arcDetEps);
MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
double *bbox(ret->getPointer());
const double *coords(_coords->begin());
{
const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[*connI]));
int sz(connI[1]-connI[0]-1);
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=arcDetEps;
std::vector<INTERP_KERNEL::Node *> nodes(sz);
INTERP_KERNEL::Edge *edge(0);
for(int j=0;j<sz;j++)
double epsa=fabs(eps);
if(epsa<std::numeric_limits<double>::min())
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::tessellate2DCurveInternal : epsilon is null ! Please specify a higher epsilon. If too tiny it can lead to a huge amount of nodes and memory !");
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=1.e-10;
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(1.e-10); // RAII
int nbCells=getNumberOfCells();
int nbNodes=getNumberOfNodes();
const int *conn=_nodal_connec->begin();
void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const double *pos, int nbOfPoints,
double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const
{
+ // Override precision for this method only:
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
+
elts=DataArrayInt::New(); eltsIndex=DataArrayInt::New(); eltsIndex->alloc(nbOfPoints+1,1); eltsIndex->setIJ(0,0,0); elts->alloc(0,1);
int *eltsIndexPtr(eltsIndex->getPointer());
MCAuto<DataArrayDouble> bboxArr(getBoundingBoxForBBTree(eps));
{
if(SPACEDIM!=2)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getCellsContainingPointsAlg : not implemented yet for POLYGON and QPOLYGON in spaceDim 3 !");
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
std::vector<INTERP_KERNEL::Node *> nodes(sz);
INTERP_KERNEL::QuadraticPolygon *pol(0);
for(int j=0;j<sz;j++)
std::vector< std::vector<int> >& intersectEdge1, std::vector< std::vector<int> >& colinear2, std::vector< std::vector<int> >& subDiv2, std::vector<double>& addCoo, std::map<int,int>& mergedNodes)
{
static const int SPACEDIM=2;
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
const int *c1(m1Desc->getNodalConnectivity()->begin()),*ci1(m1Desc->getNodalConnectivityIndex()->begin());
// Build BB tree of all edges in the tool mesh (second mesh)
MCAuto<DataArrayDouble> bbox1Arr(m1Desc->getBoundingBoxForBBTree()),bbox2Arr(m2Desc->getBoundingBoxForBBTree());
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Intersect2DMeshes : input meshes must be not NULL !");
m1->checkFullyDefined();
m2->checkFullyDefined();
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
if(m1->getMeshDimension()!=2 || m1->getSpaceDimension()!=2 || m2->getMeshDimension()!=2 || m2->getSpaceDimension()!=2)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Intersect2DMeshes works on umeshes m1 AND m2 with meshdim equal to 2 and spaceDim equal to 2 too!");
// Step 1: compute all edge intersections (new nodes)
std::vector< std::vector<int> > intersectEdge1, colinear2, subDiv2;
std::vector<double> addCoo,addCoordsQuadratic; // coordinates of newly created nodes
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
//
// Build desc connectivity
DataArrayInt *desc1(DataArrayInt::New()),*descIndx1(DataArrayInt::New()),*revDesc1(DataArrayInt::New()),*revDescIndx1(DataArrayInt::New());
std::vector< std::vector<int> > intersectEdge(nDescCell),overlapEdge(nDescCell);
std::vector<double> addCoo;
BBTree<SPACEDIM,int> myTree(bbox,0,0,nDescCell,-eps);
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
for(int i=0;i<nDescCell;i++)
{
std::vector<int> candidates;
checkConsistencyLight();
if(getSpaceDimension()!=2 || getMeshDimension()!=2)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::colinearize2D : This method only works for meshes with spaceDim=2 and meshDim=2 !");
- INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
- INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
+ INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
+ INTERP_KERNEL::QuadraticPlanarArcDetectionPrecision arcPrec(eps);
int nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
const int *cptr(_nodal_connec->begin()),*ciptr(_nodal_connec_index->begin());
MCAuto<DataArrayInt> newc(DataArrayInt::New()),newci(DataArrayInt::New()); newci->alloc(nbOfCells+1,1); newc->alloc(0,1); newci->setIJ(0,0,0);
self.assertTrue(f.getArray().isEqual(valuesExpected,1e-12))
pass
+ def testIntersect2DMeshes7(self):
+ """ Quadratic precision values were improperly reset before testing colinearities """
+ eps = 1.0e-08
+ mesh1 = MEDCouplingUMesh('assemblyGrid_Pij', 2)
+ coo = DataArrayDouble([(10.80630000000000,10.80630000000000),(9.48750000000000,10.80630000000000),(10.75250000000000,10.80630000000000),(9.48750000000000,9.48750000000000),(10.75250000000000,9.48750000000000),(10.80630000000000,9.48750000000000),(9.48750000000000,10.75250000000000),(10.75250000000000,10.75250000000000),(10.80630000000000,10.75250000000000)])
+ mesh1.setCoords(coo)
+ c = DataArrayInt([5, 4, 3, 6, 7, 5, 5, 4, 7, 8, 5, 1, 2, 7, 6, 5, 2, 0, 8, 7])
+ cI = DataArrayInt([0, 5, 10, 15, 20])
+ mesh1.setConnectivity(c, cI)
+ mesh1.checkConsistency()
+
+ mesh2 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.12000000000001,9.48750000000001),(10.80629999999976,9.48749999999955),(8.22250000000029,10.75250000000028),(9.48749999999961,10.75249999999971),(8.85500000000029,10.75250000000028),(9.48750000000001,10.12000000000001),(10.75249999999338,10.75249999999338),(10.41000000000001,10.12000000000001),(10.32506096654411,10.32506096654411),(10.12000000000001,10.41000000000001),(9.91493903345591,10.32506096654411),(9.83000000000001,10.12000000000001),(9.91493903345591,9.91493903345591),(10.12000000000001,9.83000000000001),(10.32506096654411,9.91493903345591),(10.11999999999961,10.75249999999971),(10.75249999999975,10.11999999999958),(10.49000000000001,10.12000000000001),(10.38162950903903,10.38162950903903),(10.12000000000001,10.49000000000001),(9.85837049096099,10.38162950903903),(9.75000000000001,10.12000000000001),(9.85837049096099,9.85837049096099),(10.12000000000001,9.75000000000001),(10.38162950903903,9.85837049096099),(9.88665476220845,10.35334523779157),(9.88665476220845,9.88665476220845),(9.67293524548050,9.67293524548050),(9.67293524548050,10.56706475451952),(10.80629999999339,10.75249999999338),(8.22250000000029,10.80630000000028),(9.48749999999961,10.80629999999971),(10.75249999999338,10.80629999999339),(10.80629999999339,10.80629999999339),(10.77939999999976,9.48749999999955),(10.77939999999339,10.75249999999338),(10.80629999999976,10.11999999999958),(8.22250000000029,10.77940000000028),(8.85500000000029,10.80630000000028),(9.48749999999961,10.77939999999971),(10.11999999999961,10.80629999999971),(10.75249999999338,10.77939999999339),(10.77939999999339,10.80629999999339),(10.80629999999339,10.77939999999339)])
+ mesh2.setCoords(coo)
+ c = DataArrayInt([32, 4, 32, 33, 5, 39, 40, 41, 6, 32, 5, 33, 34, 8, 41, 42, 43, 17, 32, 8, 34, 35, 31, 43, 44, 45, 37, 32, 14, 12, 10, 16, 13, 11, 9, 15, 32, 22, 12, 14, 24, 27, 13, 28, 23, 32, 24, 0, 5, 22, 29, 7, 30, 23, 32, 24, 14, 16, 10, 12, 22, 20, 26, 28, 15, 9, 11, 27, 21, 19, 25, 32, 22, 5, 8, 1, 0, 24, 26, 20, 30, 17, 18, 2, 29, 25, 19, 21, 32, 1, 8, 31, 3, 18, 37, 38, 36])
+ cI = DataArrayInt([0, 9, 18, 27, 36, 45, 54, 71, 88, 97])
+ mesh2.setConnectivity(c, cI)
+ mesh2.checkConsistency()
+
+ result, mapResToInit, mapResToRef = MEDCouplingUMesh.Intersect2DMeshes(mesh1, mesh2, eps)
+
+ def testIntersect2DMeshes8(self):
+ """ Quadratic precision values were improperly reset before testing colinearities """
+ eps = 1.0e-08
+ mesh1 = MEDCouplingUMesh('assemblyGrid_Pij', 2)
+ coo = DataArrayDouble([(10.80630000000000,10.80630000000000),(9.48750000000000,10.80630000000000),(10.75250000000000,10.80630000000000),(9.48750000000000,9.48750000000000),(10.75250000000000,9.48750000000000),(10.80630000000000,9.48750000000000),(9.48750000000000,10.75250000000000),(10.75250000000000,10.75250000000000),(10.80630000000000,10.75250000000000),(10.12000000000000,9.48750000000000),(10.77940000000000,9.48750000000000),(9.48750000000000,10.12000000000000),(10.12000000000000,10.75250000000000),(10.75250000000000,10.12000000000000),(10.77940000000000,10.75250000000000),(10.80630000000000,10.12000000000000),(9.48750000000000,10.77940000000000),(10.12000000000000,10.80630000000000),(10.75250000000000,10.77940000000000),(10.77940000000000,10.80630000000000),(10.80630000000000,10.77940000000000)])
+ mesh1.setCoords(coo)
+ c = DataArrayInt([32, 4, 3, 6, 7, 9, 11, 12, 13, 32, 5, 4, 7, 8, 10, 13, 14, 15, 32, 1, 2, 7, 6, 17, 18, 12, 16, 32, 2, 0, 8, 7, 19, 20, 14, 18])
+ cI = DataArrayInt([0, 9, 18, 27, 36])
+ mesh1.setConnectivity(c, cI)
+ mesh1.checkConsistency()
+
+ mesh2 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.12000000000001,9.48750000000001),(10.80629999999976,9.48749999999955),(8.22250000000029,10.75250000000028),(9.48749999999961,10.75249999999971),(8.85500000000029,10.75250000000028),(9.48750000000001,10.12000000000001),(10.75249999999338,10.75249999999338),(10.41000000000001,10.12000000000001),(10.32506096654411,10.32506096654411),(10.12000000000001,10.41000000000001),(9.91493903345591,10.32506096654411),(9.83000000000001,10.12000000000001),(9.91493903345591,9.91493903345591),(10.12000000000001,9.83000000000001),(10.32506096654411,9.91493903345591),(10.11999999999961,10.75249999999971),(10.75249999999975,10.11999999999958),(10.49000000000001,10.12000000000001),(10.38162950903903,10.38162950903903),(10.12000000000001,10.49000000000001),(9.85837049096099,10.38162950903903),(9.75000000000001,10.12000000000001),(9.85837049096099,9.85837049096099),(10.12000000000001,9.75000000000001),(10.38162950903903,9.85837049096099),(9.88665476220845,10.35334523779157),(9.88665476220845,9.88665476220845),(9.67293524548050,9.67293524548050),(9.67293524548050,10.56706475451952),(10.80629999999339,10.75249999999338),(8.22250000000029,10.80630000000028),(9.48749999999961,10.80629999999971),(10.75249999999338,10.80629999999339),(10.80629999999339,10.80629999999339),(10.77939999999976,9.48749999999955),(10.77939999999339,10.75249999999338),(10.80629999999976,10.11999999999958),(8.22250000000029,10.77940000000028),(8.85500000000029,10.80630000000028),(9.48749999999961,10.77939999999971),(10.11999999999961,10.80629999999971),(10.75249999999338,10.77939999999339),(10.77939999999339,10.80629999999339),(10.80629999999339,10.77939999999339)])
+ mesh2.setCoords(coo)
+ c = DataArrayInt([32, 4, 32, 33, 5, 39, 40, 41, 6, 32, 5, 33, 34, 8, 41, 42, 43, 17, 32, 8, 34, 35, 31, 43, 44, 45, 37, 32, 14, 12, 10, 16, 13, 11, 9, 15, 32, 22, 12, 14, 24, 27, 13, 28, 23, 32, 24, 0, 5, 22, 29, 7, 30, 23, 32, 24, 14, 16, 10, 12, 22, 20, 26, 28, 15, 9, 11, 27, 21, 19, 25, 32, 22, 5, 8, 1, 0, 24, 26, 20, 30, 17, 18, 2, 29, 25, 19, 21, 32, 1, 8, 31, 3, 18, 37, 38, 36])
+ cI = DataArrayInt([0, 9, 18, 27, 36, 45, 54, 71, 88, 97])
+ mesh2.setConnectivity(c, cI)
+ mesh2.checkConsistency()
+
+ result, mapResToInit, mapResToRef = MEDCouplingUMesh.Intersect2DMeshes(mesh1, mesh2, eps)
+
+ def testIntersect2DMeshes9(self):
+ """ Quadratic precision values were improperly reset before testing colinearities """
+ eps = 1.0e-08
+ mesh1 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(10.80629999999339,10.80629999999339),(9.48749999999961,10.80629999999971),(10.75249999999338,10.80629999999339),(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.80629999999976,9.48749999999955),(9.48749999999961,10.75249999999971),(10.75249999999338,10.75249999999338),(10.80629999999339,10.75249999999338)])
+ mesh1.setCoords(coo)
+ c = DataArrayInt([5, 4, 3, 6, 7, 5, 5, 4, 7, 8, 5, 1, 2, 7, 6, 5, 2, 0, 8, 7])
+ cI = DataArrayInt([0, 5, 10, 15, 20])
+ mesh1.setConnectivity(c, cI)
+ mesh1.checkConsistency()
+
+ mesh2 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(9.48749999999998,8.22249999999998),(10.75250000000034,8.22250000000030),(10.80630000000034,8.22250000000030),(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.80629999999976,9.48749999999955),(9.48749999999961,10.75249999999971),(10.75249999999338,10.75249999999338),(10.80629999999339,10.75249999999338),(10.11999999999999,8.22249999999998),(9.48749999999998,8.85499999999998),(10.40999999999999,8.85499999999998),(10.32506096654408,9.06006096654408),(10.11999999999999,9.14499999999998),(9.91493903345589,9.06006096654408),(9.82999999999998,8.85499999999998),(9.91493903345589,8.64993903345588),(10.11999999999999,8.56499999999998),(10.32506096654408,8.64993903345588),(10.12000000000001,9.48750000000001),(10.75250000000034,8.85500000000035),(10.48999999999999,8.85499999999998),(10.38162950903901,9.11662950903900),(10.11999999999999,9.22499999999998),(9.85837049096096,9.11662950903900),(9.74999999999998,8.85499999999998),(9.85837049096096,8.59337049096096),(10.11999999999999,8.48499999999998),(10.38162950903901,8.59337049096096),(9.88665476220842,9.08834523779154),(9.88665476220842,8.62165476220842),(9.67293524548047,8.40793524548047),(9.67293524548047,9.30206475451949),(9.48750000000001,10.12000000000001),(10.41000000000001,10.12000000000001),(10.32506096654411,10.32506096654411),(10.12000000000001,10.41000000000001),(9.91493903345591,10.32506096654411),(9.83000000000001,10.12000000000001),(9.91493903345591,9.91493903345591),(10.12000000000001,9.83000000000001),(10.32506096654411,9.91493903345591),(10.11999999999961,10.75249999999971),(10.75249999999975,10.11999999999958),(10.49000000000001,10.12000000000001),(10.38162950903903,10.38162950903903),(10.12000000000001,10.49000000000001),(9.85837049096099,10.38162950903903),(9.75000000000001,10.12000000000001),(9.85837049096099,9.85837049096099),(10.12000000000001,9.75000000000001),(10.38162950903903,9.85837049096099),(9.88665476220845,10.35334523779157),(9.88665476220845,9.88665476220845),(9.67293524548050,9.67293524548050),(9.67293524548050,10.56706475451952),(10.77940000000034,8.22250000000030),(10.77939999999976,9.48749999999955),(10.80630000000034,8.85500000000035),(10.77939999999339,10.75249999999338),(10.80629999999976,10.11999999999958)])
+ mesh2.setCoords(coo)
+ c = DataArrayInt([32, 16, 14, 12, 18, 15, 13, 11, 17, 32, 24, 14, 16, 26, 29, 15, 30, 25, 32, 26, 0, 3, 24, 31, 10, 32, 25, 32, 26, 16, 18, 12, 14, 24, 22, 28, 30, 17, 11, 13, 29, 23, 21, 27, 32, 24, 3, 4, 1, 0, 26, 28, 22, 32, 19, 20, 9, 31, 27, 21, 23, 32, 1, 4, 5, 2, 20, 57, 58, 56, 32, 39, 37, 35, 41, 38, 36, 34, 40, 32, 47, 37, 39, 49, 52, 38, 53, 48, 32, 49, 3, 6, 47, 54, 33, 55, 48, 32, 49, 39, 41, 35, 37, 47, 45, 51, 53, 40, 34, 36, 52, 46, 44, 50, 32, 47, 6, 7, 4, 3, 49, 51, 45, 55, 42, 43, 19, 54, 50, 44, 46, 32, 4, 7, 8, 5, 43, 59, 60, 57])
+ cI = DataArrayInt([0, 9, 18, 27, 44, 61, 70, 79, 88, 97, 114, 131, 140])
+ mesh2.setConnectivity(c, cI)
+ mesh2.checkConsistency()
+
+ result, mapResToInit, mapResToRef = MEDCouplingUMesh.Intersect2DMeshes(mesh1, mesh2, eps)
def testSwig2Intersect2DMeshesQuadra1(self):
import cmath