}
else
{
- std::cout << "V2( " << iter2->first - 1 << ", " << i + 1 << ") " << " does not exist" << std::endl;
- isReflexive = false;
+ if(!epsilonEqual(v1, 0.0))
+ {
+ std::cout << "V2( " << iter2->first - 1 << ", " << i + 1 << ") " << " does not exist" << std::endl;
+ isReflexive = false;
+ }
}
}
++i;
{
CPPUNIT_TEST_SUITE( Interpolation3DTest );
-
+#if 0
CPPUNIT_TEST( tetraReflexiveUnit );
CPPUNIT_TEST( tetraReflexiveGeneral );
CPPUNIT_TEST( tetraNudgedSimpler );
CPPUNIT_TEST( tetraNudged );
CPPUNIT_TEST( tetraCorner );
-
+#endif
+ CPPUNIT_TEST( tetraSimpleIncluded );
+ CPPUNIT_TEST( tetraComplexIncluded );
+#if 0
CPPUNIT_TEST( tetraHalfstripOnly );
CPPUNIT_TEST( tetraHalfstripOnly2 );
CPPUNIT_TEST( tetraSimpleHalfstripOnly );
CPPUNIT_TEST( generalTetra );
+ CPPUNIT_TEST( dividedUnitTetraSimplerReflexive );
CPPUNIT_TEST( dividedUnitTetraReflexive );
+ CPPUNIT_TEST( nudgedDividedUnitTetra );
+ CPPUNIT_TEST( nudgedDividedUnitTetraSimpler );
+ CPPUNIT_TEST( dividedGenTetra );
+#endif
#if 0
CPPUNIT_TEST( boxReflexive );
CPPUNIT_TEST( tetraBoxes );
#endif
- //CPPUNIT_TEST( tetraTetraScale );
- // CPPUNIT_TEST( box1 );
- // CPPUNIT_TEST( cyl1 );
- //CPPUNIT_TEST( tetra1 );
- // CPPUNIT_TEST( tetra3 );
-
+
CPPUNIT_TEST_SUITE_END();
intersectMeshes("meshes/UnitTetra.med", "UnitTetra", "meshes/CornerTetra.med", "CornerTetra", 0.0135435);
}
+ void tetraSimpleIncluded()
+ {
+ intersectMeshes("meshes/SimpleIncludedTetra.med", "SimpleIncludedTetra", "meshes/SimpleIncludingTetra.med", "SimpleIncludingTetra", 17.0156, 1.0e-4);
+ }
+
+ void tetraComplexIncluded()
+ {
+ intersectMeshes("meshes/ComplexIncludedTetra.med", "ComplexIncludedTetra", "meshes/ComplexIncludingTetra.med", "ComplexIncludingTetra", 17.0156, 1.0e-4);
+ }
+
void tetraHalfstripOnly()
{
// NB this test is not completely significant : we should also verify that
intersectMeshes("meshes/DividedUnitTetra.med", "DividedUnitTetra", "meshes/DividedUnitTetra.med", "DividedUnitTetra", 0.1666667);
}
+ void dividedUnitTetraSimplerReflexive()
+ {
+ intersectMeshes("meshes/DividedUnitTetraSimpler.med", "DividedUnitTetraSimpler", "meshes/DividedUnitTetraSimpler.med", "DividedUnitTetraSimpler", 0.1666667);
+ }
+
+ void nudgedDividedUnitTetra()
+ {
+ intersectMeshes("meshes/NudgedDividedUnitTetra.med", "NudgedDividedUnitTetra", "meshes/DividedUnitTetra.med", "DividedUnitTetra", 0.150191);
+ }
+
+ void nudgedDividedUnitTetraSimpler()
+ {
+ intersectMeshes("meshes/NudgedDividedUnitTetraSimpler.med", "NudgedDividedUnitTetraSimpler", "meshes/DividedUnitTetraSimpler.med", "DividedUnitTetraSimpler", 0.150191);
+ }
+
+ void dividedGenTetra()
+ {
+ intersectMeshes("meshes/DividedGenTetra1.med", "DividedGenTetra1", "meshes/DividedGenTetra2.med", "DividedGenTetra2", 4.91393, 1.0e-5);
+ }
+
void boxReflexive()
{
intersectMeshes("meshes/Box3.med", "Box3", "meshes/Box3.med", "Box3", 13.9954, 1.0e-4);
// --- Registers the fixture into the 'registry'
-//CPPUNIT_TEST_SUITE_REGISTRATION( Interpolation3DTest );
-CPPUNIT_TEST_SUITE_REGISTRATION( TransformedTriangleIntersectTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( Interpolation3DTest );
+//CPPUNIT_TEST_SUITE_REGISTRATION( TransformedTriangleIntersectTest );
//CPPUNIT_TEST_SUITE_REGISTRATION( TransformedTriangleTest );
//CPPUNIT_TEST_SUITE_REGISTRATION( TestBogusClass );
// -> (QR, X) : - (QR, Y) : - (QR, Z) : 6
// -> (RP, X) : - (RP, Y) : - (RP, Z) : -
// -----------------------------------------------------------------------------------------------------
-// TE -> OX : 4 OY : 7 OZ : 8 XY : 1 ZX : 4 YZ : 3,7
+// TE -> OX : 4 OY : 7 OZ : 8 XY : 1 ZX : 4 YZ : 3
// -----------------------------------------------------------------------------------------------------
-// TR -> X : 7 Y : 6 Z : 5
+// TR -> X : 7 Y : 6 Z : 5
// -----------------------------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////////////////////////////
void TransformedTriangleIntersectTest::testTriangle5()
{
-
+std::cout << std::endl << "+++++++ Testing triangle 5" << std::endl;
typedef TransformedTriangle TT;
double coords[9] =
// SE -
// SC -
// SHS -
-// SR (PQ, X), (QR, XY)
+// SR (PQ, X), (QR, Z)
// TE -
// TR Y
void TransformedTriangleIntersectTest::testTriangle6()
{
+ std::cout << std::endl << "+++++++ Testing triangle 6" << std::endl;
typedef TransformedTriangle TT;
CPPUNIT_ASSERT_EQUAL(false, tri->testSegmentRayIntersection(TT::QR, TT::X));
CPPUNIT_ASSERT_EQUAL(false, tri->testSegmentRayIntersection(TT::QR, TT::Y));
- CPPUNIT_ASSERT_EQUAL(false, tri->testSegmentRayIntersection(TT::QR, TT::Z));
+ CPPUNIT_ASSERT_EQUAL(true , tri->testSegmentRayIntersection(TT::QR, TT::Z));
CPPUNIT_ASSERT_EQUAL(false, tri->testSegmentRayIntersection(TT::RP, TT::X));
CPPUNIT_ASSERT_EQUAL(false, tri->testSegmentRayIntersection(TT::RP, TT::Y));
- CPPUNIT_ASSERT_EQUAL(true , tri->testSegmentRayIntersection(TT::RP, TT::Z));
+ CPPUNIT_ASSERT_EQUAL(false, tri->testSegmentRayIntersection(TT::RP, TT::Z));
// surface-edge (6 possibilities)
CPPUNIT_ASSERT_EQUAL(false, tri->testSurfaceEdgeIntersection(TT::OX));
// SC (RP, O)
// SHS -
// SR -
-// TE [OY]
+// TE [OY, OZ]
// TR -
void TransformedTriangleIntersectTest::testTriangle11()
// surface-edge (6 possibilities)
CPPUNIT_ASSERT_EQUAL(false, tri->testSurfaceEdgeIntersection(TT::OX));
CPPUNIT_ASSERT_EQUAL(true , tri->testSurfaceEdgeIntersection(TT::OY));
- CPPUNIT_ASSERT_EQUAL(false, tri->testSurfaceEdgeIntersection(TT::OZ));
+ CPPUNIT_ASSERT_EQUAL(true, tri->testSurfaceEdgeIntersection(TT::OZ));
CPPUNIT_ASSERT_EQUAL(false, tri->testSurfaceEdgeIntersection(TT::YZ));
CPPUNIT_ASSERT_EQUAL(false, tri->testSurfaceEdgeIntersection(TT::ZX));
CPPUNIT_ASSERT_EQUAL(false, tri->testSurfaceEdgeIntersection(TT::XY));
{
CPPUNIT_TEST_SUITE( TransformedTriangleIntersectTest );
+
CPPUNIT_TEST( testTriangle1 );
CPPUNIT_TEST( testTriangle2 );
CPPUNIT_TEST( testTriangle3 );
CPPUNIT_TEST( testTriangle11 );
CPPUNIT_TEST( testTriangle12 );
CPPUNIT_TEST( testTriangle13 );
+
CPPUNIT_TEST_SUITE_END();
typedef INTERP_UTILS::TransformedTriangle::TriSegment TriSegment;