]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/INTERP_KERNELTest/HexaTests.hxx
Salome HOME
a7f0adf1e730c39aa20aa985a7a316ac3f23805a
[tools/medcoupling.git] / src / INTERP_KERNELTest / HexaTests.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef __HEXA_TESTS_HXX_
20 #define __HEXA_TESTS_HXX_
21
22 #include "InterpolationTestSuite.hxx"
23
24 namespace INTERP_TEST
25 {
26   /**
27    * \brief Class performing intersection tests on meshes with hexahedral elements.
28    *
29    */
30   class HexaTests : public InterpolationTestSuite<3,3>
31   {
32     CPPUNIT_TEST_SUITE( HexaTests );
33
34     CPPUNIT_TEST( simpleHexaBox );
35     //VB : slightly inaccurate so that it triggers a failure of the test
36     // should be investigated in the future
37     //    CPPUNIT_TEST( reflexiveHexaBox );
38     CPPUNIT_TEST( hexaBoxes );
39     CPPUNIT_TEST( hexaBoxesMoved );
40
41     CPPUNIT_TEST_SUITE_END();
42
43   public:
44     
45     /// Intersection between two boxes, aligned with the axes.One has 60 hexahedral elements and the other has 39 tetrahedral elements
46     /// \brief Status : pass
47     void simpleHexaBox()
48     {
49       _testTools->intersectMeshes("BoxHexa1", "BoxTetra2", 65250, 1.0e-5);
50     }
51
52     /// Intersection of a box with 60 hexahedral elements with itself
53     /// \brief Status : pass
54     void reflexiveHexaBox()
55     {
56       _testTools->intersectMeshes("BoxHexa1", "BoxHexa1", 204000);
57     }
58
59     /// Intersection between two boxes, aligned with the axes.Both have hexahedral elements : one 36, the other 60
60     /// \brief Status : pass
61     void hexaBoxes()
62     {
63       _testTools->intersectMeshes("BoxHexa1", "BoxHexa2", 65250);
64     }
65
66     /// Intersection between two boxes in general position with hexahedral elements. One has 200 elements and the other 420.
67     /// \brief Status : fails - reason unknown. The matrix does not fulfil the transpose requirement : that W_AB = W_BA^T 
68     void hexaBoxesMoved()
69     {
70       _testTools->intersectMeshes("MovedHexaBox1", "MovedHexaBox2", 65250);
71     }
72
73   };
74 }
75 #endif