]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/INTERP_KERNELTest/HexaTests.hxx
Salome HOME
[TetraIntersect] This test can be re-activated.
[tools/medcoupling.git] / src / INTERP_KERNELTest / HexaTests.hxx
1 // Copyright (C) 2007-2024  CEA, EDF
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, or (at your option) any later version.
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
20 #ifndef __HEXA_TESTS_HXX_
21 #define __HEXA_TESTS_HXX_
22
23 #include "InterpolationTestSuite.hxx"
24
25 namespace INTERP_TEST
26 {
27   /**
28    * \brief Class performing intersection tests on meshes with hexahedral elements.
29    *
30    */
31   class HexaTests : public InterpolationTestSuite<3,3>
32   {
33     CPPUNIT_TEST_SUITE( HexaTests );
34
35     CPPUNIT_TEST( simpleHexaBox );
36     CPPUNIT_TEST( reflexiveHexaBox );
37     CPPUNIT_TEST( hexaBoxes );
38     CPPUNIT_TEST( hexaBoxesMoved );
39
40     CPPUNIT_TEST_SUITE_END();
41
42   public:
43
44     /// Intersection between two boxes, aligned with the axes.One has 60 hexahedral elements and the other has 39 tetrahedral elements
45     /// \brief Status : pass
46     void simpleHexaBox()
47     {
48       _testTools->intersectMeshes("BoxHexa1", "BoxTetra2", 65250, 1.0e-5);
49     }
50
51     /// Intersection of a box with 60 hexahedral elements with itself
52     /// \brief Status : pass
53     void reflexiveHexaBox()
54     {
55       _testTools->intersectMeshes("BoxHexa1", "BoxHexa1", 204000);
56     }
57
58     /// Intersection between two boxes, aligned with the axes.Both have hexahedral elements : one 36, the other 60
59     /// \brief Status : pass
60     void hexaBoxes()
61     {
62       _testTools->intersectMeshes("BoxHexa1", "BoxHexa2", 65250);
63     }
64
65     /// Intersection between two boxes in general position with hexahedral elements. One has 200 elements and the other 420.
66     /// \brief Status : fails - reason unknown. The matrix does not fulfill the transpose requirement : that W_AB = W_BA^T 
67     void hexaBoxesMoved()
68     {
69       _testTools->intersectMeshes("MovedHexaBox1", "MovedHexaBox2", 65250);
70     }
71
72   };
73 }
74 #endif