1 // Copyright (C) 2007-2024 CEA, EDF
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __HEXA_TESTS_HXX_
21 #define __HEXA_TESTS_HXX_
23 #include "InterpolationTestSuite.hxx"
28 * \brief Class performing intersection tests on meshes with hexahedral elements.
31 class HexaTests : public InterpolationTestSuite<3,3>
33 CPPUNIT_TEST_SUITE( HexaTests );
35 CPPUNIT_TEST( simpleHexaBox );
36 CPPUNIT_TEST( reflexiveHexaBox );
37 CPPUNIT_TEST( hexaBoxes );
38 CPPUNIT_TEST( hexaBoxesMoved );
40 CPPUNIT_TEST_SUITE_END();
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
48 _testTools->intersectMeshes("BoxHexa1", "BoxTetra2", 65250, 1.0e-5);
51 /// Intersection of a box with 60 hexahedral elements with itself
52 /// \brief Status : pass
53 void reflexiveHexaBox()
55 _testTools->intersectMeshes("BoxHexa1", "BoxHexa1", 204000);
58 /// Intersection between two boxes, aligned with the axes.Both have hexahedral elements : one 36, the other 60
59 /// \brief Status : pass
62 _testTools->intersectMeshes("BoxHexa1", "BoxHexa2", 65250);
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
69 _testTools->intersectMeshes("MovedHexaBox1", "MovedHexaBox2", 65250);