1 // Copyright (C) 2007-2008 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.
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
19 #ifndef __MULTI_ELEMENT_TETRA_TESTS_HXX_
20 #define __MULTI_ELEMENT_TETRA_TESTS_HXX_
22 #include "InterpolationTestSuite.hxx"
27 * \brief Class testing algorithm by intersecting meshes of several
28 * elements (all tetrahedra) - up to a few thousand. This serves to check the
29 * filtering methods and the matrix assemblage, as well as verifying
30 * that computation errors do not become unmanageable. It uses mehes of
31 * different geometries : tetrahedra, boxes and cylinders.
34 class MultiElementTetraTests : public InterpolationTestSuite<3,3>
36 CPPUNIT_TEST_SUITE( MultiElementTetraTests );
38 CPPUNIT_TEST( tetraComplexIncluded );
39 CPPUNIT_TEST( dividedUnitTetraSimplerReflexive );
40 CPPUNIT_TEST( dividedUnitTetraReflexive );
41 CPPUNIT_TEST( nudgedDividedUnitTetraSimpler );
42 CPPUNIT_TEST( nudgedDividedUnitTetra );
43 CPPUNIT_TEST( dividedGenTetra );
44 CPPUNIT_TEST( tinyBoxReflexive );
45 CPPUNIT_TEST( moderateBoxEvenSmallerReflexive );
46 CPPUNIT_TEST( moderateBoxSmallReflexive );
47 CPPUNIT_TEST( boxReflexive );
48 CPPUNIT_TEST( boxReflexiveModerate );
49 CPPUNIT_TEST( tetraBoxes );
50 CPPUNIT_TEST( moderateBoxesSmaller );
51 CPPUNIT_TEST( moderateBoxes );
53 CPPUNIT_TEST_SUITE_END();
57 /// Tetrahedron situated totally inside another
58 /// \brief Status : pass
59 void tetraComplexIncluded()
61 _testTools->intersectMeshes("ComplexIncludedTetra", "ComplexIncludingTetra", 17.0156);
64 /// Unit tetrahedron divided in 4 elements intersecting itself.
65 /// \brief Status : pass
66 void dividedUnitTetraSimplerReflexive()
68 _testTools->intersectMeshes("DividedUnitTetraSimpler", "DividedUnitTetraSimpler", 0.1666667);
71 /// Unit tetrahedron divided in 14 elements intersecting itself.
72 /// \brief Status : pass
73 void dividedUnitTetraReflexive()
75 _testTools->intersectMeshes("DividedUnitTetra", "DividedUnitTetra", 0.1666667);
78 /// Unit tetrahedron divided in 4 elements intersecting slightly displaced version of itself.
79 /// \brief Status : pass
80 void nudgedDividedUnitTetraSimpler()
82 _testTools->intersectMeshes("NudgedDividedUnitTetraSimpler", "DividedUnitTetraSimpler", 0.150191);
85 /// Unit tetrahedron divided in 14 elements intersecting slightly displaced version of itself.
86 /// \brief Status : pass
87 void nudgedDividedUnitTetra()
89 _testTools->intersectMeshes("NudgedDividedUnitTetra", "DividedUnitTetra", 0.150191);
92 /// Two intersecting tetrahedra in general position, one with 23 elements, the other with 643 elements
93 /// \brief Status : pass
94 void dividedGenTetra()
96 _testTools->intersectMeshes("DividedGenTetra1", "DividedGenTetra2", 0.546329);
99 /// Large box in general position with 12 elements intersecting itself
100 /// \brief Status : pass
101 void tinyBoxReflexive()
103 _testTools->intersectMeshes("TinyBox", "TinyBox", 979200);
106 /// Small box in general position with 33 elements intersecting itself
107 /// \brief Status : pass
110 _testTools->intersectMeshes("Box3", "Box3", 13.9954);
113 /// Box in general position with 67 elements intersecting itself
114 /// \brief Status : pass
115 void moderateBoxEvenSmallerReflexive()
117 _testTools->intersectMeshes("BoxEvenSmaller1", "BoxEvenSmaller1", 1.44018e6);
120 /// Box in general position with 544 elements intersecting itself
121 /// \brief Status : pass
122 void moderateBoxSmallReflexive()
124 _testTools->intersectMeshes("BoxModSmall1", "BoxModSmall1", 1.44018e6);
127 /// Large box in general position with 2943 elements intersecting itself
128 /// \brief Status : pass
129 void boxReflexiveModerate()
131 _testTools->intersectMeshes("Box1Moderate", "Box1Moderate", 1.0e6);
134 /// Two intersecting boxes in general position with 12 and 18 elements
135 /// \brief Status : pass
138 _testTools->intersectMeshes("Box1", "Box2", 124.197);
141 /// Two intersecting boxes in general position with 430 and 544 elements
142 /// \brief Status : pass
143 void moderateBoxesSmaller()
145 _testTools->intersectMeshes("BoxModSmall1", "BoxModSmall2", 321853);
148 /// Two intersecting boxes in general position with 2943 and 3068 elements
149 /// \brief Status : pass
152 _testTools->intersectMeshes("Box1Moderate", "Box2Moderate", 376856);