Salome HOME
0543d73d156deffd07d07bd77702121cc4be265a
[tools/medcoupling.git] / src / INTERP_KERNELTest / MultiElement3DSurfTests.hxx
1 //  Copyright (C) 2007-2008  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.
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 #ifndef __MULTI_ELEMENT_3DSurf_TESTS_HXX_
20 #define __MULTI_ELEMENT_3DSurf_TESTS_HXX_
21
22 #include "InterpolationTestSuite.hxx"
23
24 namespace INTERP_TEST
25 {
26   /**
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.
32    *
33    */
34   class MultiElement2DTests : public InterpolationTestSuite<3,2>
35   {
36     CPPUNIT_TEST_SUITE( MultiElement3DSurfTests );
37     
38     CPPUNIT_TEST(SymetryTranspose3DSurfTest);
39     CPPUNIT_TEST(SelfIntersection3DSurfTest);
40
41     CPPUNIT_TEST_SUITE_END();
42
43   public:
44     void SymetryTranspose3DSurfTest()
45     { 
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.);
50     }
51     void SelfIntersection3DSurfTest()
52     { 
53       IntersectionMatrix m;
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);
58     }
59   };
60 }
61
62 #endif