Salome HOME
6308c046c5e0563a87377ccd09eaa0e7a0c7c719
[tools/medcoupling.git] / src / INTERP_KERNELTest / MultiElement3DSurfTests.hxx
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __MULTI_ELEMENT_3DSurf_TESTS_HXX_
21 #define __MULTI_ELEMENT_3DSurf_TESTS_HXX_
22
23 #include "InterpolationTestSuite.hxx"
24
25 namespace INTERP_TEST
26 {
27   /**
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.
33    *
34    */
35   class MultiElement2DTests : public InterpolationTestSuite<3,2>
36   {
37     CPPUNIT_TEST_SUITE( MultiElement3DSurfTests );
38     
39     CPPUNIT_TEST(SymetryTranspose3DSurfTest);
40     CPPUNIT_TEST(SelfIntersection3DSurfTest);
41
42     CPPUNIT_TEST_SUITE_END();
43
44   public:
45     void SymetryTranspose3DSurfTest()
46     { 
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.);
51     }
52     void SelfIntersection3DSurfTest()
53     { 
54       IntersectionMatrix m;
55       _testTools->_intersectionType=INTERP_KERNEL::Triangulation;
56       _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m);
57       _testTools->_intersectionType=INTERP_KERNEL::Convex;
58       _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m);
59     }
60   };
61 }
62
63 #endif