]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Tue, 15 Dec 2009 10:51:36 +0000 (10:51 +0000)
committerageay <ageay>
Tue, 15 Dec 2009 10:51:36 +0000 (10:51 +0000)
src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.cxx
src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.hxx

index 39cf2717562f342eea6188622d5cebd9df70097e..d39f9e6611aae0fd3c8a191eed35e57576ecdb15 100644 (file)
@@ -24,6 +24,7 @@
 #include "UnitTetraIntersectionBary.hxx"
 #include "TetraAffineTransform.hxx"
 #include "InterpolationUtils.hxx"
+#include "SplitterTetra.txx"
 
 #include <iostream>
 
@@ -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 }, 
index 4fbaa953ab2ae5f52433d1c14e8441d48a9e801b..4a269fa56f0fb6f8ec6c43be68bce7f3ca5115de 100644 (file)
@@ -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();
   };