From: ageay Date: Tue, 15 Dec 2009 10:51:36 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V5_1_main_FINAL~273 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c15ec19beda3428abe7f449a47c2cc312462e1b;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.cxx b/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.cxx index 39cf27175..d39f9e661 100644 --- a/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.cxx +++ b/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.cxx @@ -24,6 +24,7 @@ #include "UnitTetraIntersectionBary.hxx" #include "TetraAffineTransform.hxx" #include "InterpolationUtils.hxx" +#include "SplitterTetra.txx" #include @@ -267,6 +268,36 @@ namespace INTERP_TEST CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.250000, baryCenter[2], 1e-5); } + struct __MESH_DUMMY + { + typedef int MyConnType; + }; + + void UnitTetraIntersectionBaryTest::test_UnitTetraIntersectionBary_13() + { + double T[] = { + 66.6666666666666714,133.333333333333343,66.6666666666666714, + 100,200,100, + 100,100,100, + 200,200,0 }; + + double S[] = { + 100,166.666666666666657,66.6666666666666714, + 100,150,50, + 75,150,75, + 100,100,100}; + + int conn[4] = { 0,1,2,3 }; + + const double* tnodes[4]={ T, T+3, T+6, T+9 }; + const double* snodes[4]={ S, S+3, S+6, S+9 }; + + __MESH_DUMMY dummyMesh; + SplitterTetra<__MESH_DUMMY> src( dummyMesh, snodes, conn ); + double volume = src.intersectTetra( tnodes ); + CPPUNIT_ASSERT_DOUBLES_EQUAL(6944.4444444444443,volume,1e-9); + } + void UnitTetraIntersectionBaryTest::test_TetraAffineTransform_reverseApply() { double nodes[4][3] = { {-4.0, 9.0, 3.0 }, diff --git a/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.hxx b/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.hxx index 4fbaa953a..4a269fa56 100644 --- a/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.hxx +++ b/src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.hxx @@ -35,6 +35,7 @@ namespace INTERP_TEST class INTERPKERNELTEST_EXPORT UnitTetraIntersectionBaryTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( UnitTetraIntersectionBaryTest ); + //CPPUNIT_TEST( test_UnitTetraIntersectionBary_13 ); CPPUNIT_TEST( test_UnitTetraIntersectionBary_12 ); CPPUNIT_TEST( test_UnitTetraIntersectionBary_1 ); CPPUNIT_TEST( test_UnitTetraIntersectionBary_2 ); @@ -63,6 +64,7 @@ namespace INTERP_TEST void test_UnitTetraIntersectionBary_10(); void test_UnitTetraIntersectionBary_11(); void test_UnitTetraIntersectionBary_12(); + void test_UnitTetraIntersectionBary_13(); void test_TetraAffineTransform_reverseApply(); void test_barycentric_coords(); };