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 __MULTI_ELEMENT_TETRA_TESTS_HXX_
21 #define __MULTI_ELEMENT_TETRA_TESTS_HXX_
23 #include "InterpolationTestSuite.hxx"
28 * \brief Class testing algorithm by intersecting meshes of several
29 * elements (all tetrahedra) - up to a few thousand. This serves to check the
30 * filtering methods and the matrix assemblage, as well as verifying
31 * that computation errors do not become unmanageable. It uses mehes of
32 * different geometries : tetrahedra, boxes and cylinders.
35 class MultiElementTetraTests : public InterpolationTestSuite<3,3>
37 CPPUNIT_TEST_SUITE( MultiElementTetraTests );
39 CPPUNIT_TEST( tetraComplexIncluded );
40 CPPUNIT_TEST( dividedUnitTetraSimplerReflexive );
41 CPPUNIT_TEST( dividedUnitTetraReflexive );
42 CPPUNIT_TEST( nudgedDividedUnitTetraSimpler );
43 CPPUNIT_TEST( nudgedDividedUnitTetra );
44 CPPUNIT_TEST( dividedGenTetra );
45 CPPUNIT_TEST( tinyBoxReflexive );
46 CPPUNIT_TEST( moderateBoxEvenSmallerReflexive );
47 CPPUNIT_TEST( moderateBoxSmallReflexive );
48 CPPUNIT_TEST( boxReflexive );
49 CPPUNIT_TEST( boxReflexiveModerate );
50 CPPUNIT_TEST( tetraBoxes );
51 CPPUNIT_TEST( moderateBoxesSmaller );
52 CPPUNIT_TEST( moderateBoxes );
54 CPPUNIT_TEST_SUITE_END();
58 /// Tetrahedron situated totally inside another
59 /// \brief Status : pass
60 void tetraComplexIncluded()
62 _testTools->intersectMeshes("ComplexIncludedTetra", "ComplexIncludingTetra", 17.0156);
65 /// Unit tetrahedron divided in 4 elements intersecting itself.
66 /// \brief Status : pass
67 void dividedUnitTetraSimplerReflexive()
69 _testTools->intersectMeshes("DividedUnitTetraSimpler", "DividedUnitTetraSimpler", 0.1666667);
72 /// Unit tetrahedron divided in 14 elements intersecting itself.
73 /// \brief Status : pass
74 void dividedUnitTetraReflexive()
76 _testTools->intersectMeshes("DividedUnitTetra", "DividedUnitTetra", 0.1666667);
79 /// Unit tetrahedron divided in 4 elements intersecting slightly displaced version of itself.
80 /// \brief Status : pass
81 void nudgedDividedUnitTetraSimpler()
83 _testTools->intersectMeshes("NudgedDividedUnitTetraSimpler", "DividedUnitTetraSimpler", 0.150191);
86 /// Unit tetrahedron divided in 14 elements intersecting slightly displaced version of itself.
87 /// \brief Status : pass
88 void nudgedDividedUnitTetra()
90 _testTools->intersectMeshes("NudgedDividedUnitTetra", "DividedUnitTetra", 0.150191);
93 /// Two intersecting tetrahedra in general position, one with 23 elements, the other with 643 elements
94 /// \brief Status : pass
95 void dividedGenTetra()
97 _testTools->intersectMeshes("DividedGenTetra1", "DividedGenTetra2", 0.546329);
100 /// Large box in general position with 12 elements intersecting itself
101 /// \brief Status : pass
102 void tinyBoxReflexive()
104 _testTools->intersectMeshes("TinyBox", "TinyBox", 979200);
107 /// Small box in general position with 33 elements intersecting itself
108 /// \brief Status : pass
111 _testTools->intersectMeshes("Box3", "Box3", 13.9954);
114 /// Box in general position with 67 elements intersecting itself
115 /// \brief Status : pass
116 void moderateBoxEvenSmallerReflexive()
118 _testTools->intersectMeshes("BoxEvenSmaller1", "BoxEvenSmaller1", 1.44018e6);
121 /// Box in general position with 544 elements intersecting itself
122 /// \brief Status : pass
123 void moderateBoxSmallReflexive()
125 _testTools->intersectMeshes("BoxModSmall1", "BoxModSmall1", 1.44018e6);
128 /// Large box in general position with 2943 elements intersecting itself
129 /// \brief Status : pass
130 void boxReflexiveModerate()
132 _testTools->intersectMeshes("Box1Moderate", "Box1Moderate", 1.0e6);
135 /// Two intersecting boxes in general position with 12 and 18 elements
136 /// \brief Status : pass
139 _testTools->intersectMeshes("Box1", "Box2", 124.197);
142 /// Two intersecting boxes in general position with 430 and 544 elements
143 /// \brief Status : pass
144 void moderateBoxesSmaller()
146 _testTools->intersectMeshes("BoxModSmall1", "BoxModSmall2", 321853);
149 /// Two intersecting boxes in general position with 2943 and 3068 elements
150 /// \brief Status : pass
153 _testTools->intersectMeshes("Box1Moderate", "Box2Moderate", 376856);