1 // Copyright (C) 2007-2024 CEA, EDF
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
19 // Author : Aymeric SONOLET (CEA/DES)
21 #ifndef __CRACKALGOTEST_HXX__
22 #define __CRACKALGOTEST_HXX__
24 #include <cppunit/extensions/HelperMacros.h>
29 #include <MCIdType.hxx>
31 namespace MEDCoupling {
34 class MEDCouplingUMesh;
36 class CrackAlgoTest : public CppUnit::TestFixture {
37 CPPUNIT_TEST_SUITE(CrackAlgoTest);
38 CPPUNIT_TEST(test3DHalfCrossCut);
39 CPPUNIT_TEST(test3DFullCrossCut);
40 CPPUNIT_TEST(test3DHalfCut);
41 CPPUNIT_TEST(test3DFullCut);
42 CPPUNIT_TEST(test3DFullFullCut);
43 CPPUNIT_TEST(test3DAngleCut);
44 CPPUNIT_TEST(test2DGrp);
45 CPPUNIT_TEST(test2DMeshNonConnexCut);
46 CPPUNIT_TEST(test1DMesh);
47 CPPUNIT_TEST(testInnerCrossCut);
48 CPPUNIT_TEST_SUITE_END();
52 void test3DHalfCrossCut();
53 void test3DFullCrossCut();
54 void test3DAngleCut();
56 void test3DFullFullCut();
59 void test2DMeshNonConnexCut();
61 void testInnerCrossCut();
64 using Connections = std::vector<std::pair<mcIdType, mcIdType>>;
65 static std::pair<bool, bool>
67 MEDFileUMesh * mm_init,
68 const std::string & grp_name,
69 const std::string & test_name);
73 const MEDFileUMesh * mm,
74 const Connections& c2cBrokenConnection,
75 const Connections& c2cPreservedConnection);
79 const MEDCouplingUMesh * f2dup_before,
80 const MEDCouplingUMesh * f2dup_after);
84 const MEDFileUMesh * mm,
85 const std::string & grp_name);
87 static std::vector<std::pair<mcIdType, mcIdType>>
89 const MEDFileUMesh * mm,
90 const std::string & grp_name);
101 static MEDFileUMesh *
104 static MEDFileUMesh *
107 } // namespace MEDCoupling
108 #endif // __CRACKALGOTEST_HXX__