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_2D_TESTS_HXX_
21 #define __MULTI_ELEMENT_2D_TESTS_HXX_
23 #include "InterpolationTestSuite.hxx"
28 * \brief Class testing algorithm by intersecting meshes of several
29 * polygonal elements - 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 : triangle, quadrilateral.
35 class MultiElement2DTests : public InterpolationTestSuite<2,2>
37 CPPUNIT_TEST_SUITE( MultiElement2DTests );
39 CPPUNIT_TEST(SymetryTranspose2DTest);
40 CPPUNIT_TEST(SelfIntersection2DTest);
42 CPPUNIT_TEST_SUITE_END();
45 void SymetryTranspose2DTest()
47 _testTools->_intersectionType=INTERP_KERNEL::Triangulation;
48 _testTools->intersectMeshes("square1.med", "Mesh_2","square2.med","Mesh_3", 10000.);
49 _testTools->_intersectionType=INTERP_KERNEL::Convex;
50 _testTools->intersectMeshes("square1.med", "Mesh_2","square2.med","Mesh_3", 10000.);
52 void SelfIntersection2DTest()
55 _testTools->_intersectionType=INTERP_KERNEL::Triangulation;
56 _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m);
57 //_testTools->_intersectionType=INTERP_KERNEL::Convex;// valgrind complains !
58 //_testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m);