1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
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 //VB : slightly inaccurate so that it triggers a failure of the test
37 // should be investigated in the future
38 // CPPUNIT_TEST( reflexiveHexaBox );
39 CPPUNIT_TEST( hexaBoxes );
40 CPPUNIT_TEST( hexaBoxesMoved );
42 CPPUNIT_TEST_SUITE_END();
46 /// Intersection between two boxes, aligned with the axes.One has 60 hexahedral elements and the other has 39 tetrahedral elements
47 /// \brief Status : pass
50 _testTools->intersectMeshes("BoxHexa1", "BoxTetra2", 65250, 1.0e-5);
53 /// Intersection of a box with 60 hexahedral elements with itself
54 /// \brief Status : pass
55 void reflexiveHexaBox()
57 _testTools->intersectMeshes("BoxHexa1", "BoxHexa1", 204000);
60 /// Intersection between two boxes, aligned with the axes.Both have hexahedral elements : one 36, the other 60
61 /// \brief Status : pass
64 _testTools->intersectMeshes("BoxHexa1", "BoxHexa2", 65250);
67 /// Intersection between two boxes in general position with hexahedral elements. One has 200 elements and the other 420.
68 /// \brief Status : fails - reason unknown. The matrix does not fulfil the transpose requirement : that W_AB = W_BA^T
71 _testTools->intersectMeshes("MovedHexaBox1", "MovedHexaBox2", 65250);