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_2D_TESTS_HXX_
20 #define __MULTI_ELEMENT_2D_TESTS_HXX_
22 #include "InterpolationTestSuite.hxx"
27 * \brief Class testing algorithm by intersecting meshes of several
28 * polygonal elements - 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 : triangle, quadrilateral.
34 class MultiElement2DTests : public InterpolationTestSuite<2,2>
36 CPPUNIT_TEST_SUITE( MultiElement2DTests );
38 CPPUNIT_TEST(SymetryTranspose2DTest);
39 CPPUNIT_TEST(SelfIntersection2DTest);
41 CPPUNIT_TEST_SUITE_END();
44 void SymetryTranspose2DTest()
46 _testTools->_intersectionType=INTERP_KERNEL::Triangulation;
47 _testTools->intersectMeshes("square1.med", "Mesh_2","square2.med","Mesh_3", 10000.);
48 _testTools->_intersectionType=INTERP_KERNEL::Convex;
49 _testTools->intersectMeshes("square1.med", "Mesh_2","square2.med","Mesh_3", 10000.);
51 void SelfIntersection2DTest()
54 _testTools->_intersectionType=INTERP_KERNEL::Triangulation;
55 _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m);
56 _testTools->_intersectionType=INTERP_KERNEL::Convex;
57 _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m);