Back to index

salome-med  6.5.0
SingleElementTetraTests.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __SINGLE_ELEMENT_TETRA_TESTS_HXX_
00021 #define __SINGLE_ELEMENT_TETRA_TESTS_HXX_
00022 
00023 #include "InterpolationTestSuite.hxx"
00024 
00025 namespace INTERP_TEST 
00026 {
00032   class SingleElementTetraTests : public InterpolationTestSuite<3,3>
00033   {
00034     CPPUNIT_TEST_SUITE( SingleElementTetraTests );
00035 
00036     CPPUNIT_TEST( tetraReflexiveUnit );
00037     CPPUNIT_TEST( tetraReflexiveGeneral );
00038     CPPUNIT_TEST( tetraNudgedSimpler );
00039     CPPUNIT_TEST( tetraNudged );
00040     CPPUNIT_TEST( tetraCorner );
00041     CPPUNIT_TEST( tetraSimpleIncluded );
00042     CPPUNIT_TEST( tetraDegenEdge );
00043     CPPUNIT_TEST( tetraDegenFace );
00044     CPPUNIT_TEST( tetraDegenTranslatedInPlane );
00045     CPPUNIT_TEST( tetraHalfstripOnly );
00046     CPPUNIT_TEST( tetraHalfstripOnly2 );
00047     CPPUNIT_TEST( tetraSimpleHalfstripOnly );
00048     CPPUNIT_TEST( generalTetra );
00049     CPPUNIT_TEST( trickyTetra1 );
00050     //    CPPUNIT_TEST( inconsistentTetra );
00051 
00052     CPPUNIT_TEST_SUITE_END();
00053 
00054   public:
00055 
00058     void tetraReflexiveUnit()
00059     {
00060       _testTools->intersectMeshes("UnitTetra", "UnitTetra", 1.0/6.0);
00061     }
00062 
00065     void tetraReflexiveGeneral()
00066     {
00067       _testTools->intersectMeshes("GeneralTetra", "GeneralTetra", 0.428559);
00068     }
00069 
00072     void tetraNudged()
00073     {
00074       _testTools->intersectMeshes("UnitTetra", "NudgedTetra", 0.142896);
00075     }
00076 
00079     void tetraNudgedSimpler()
00080     {
00081       _testTools->intersectMeshes("UnitTetra", "NudgedSimpler", 0.152112);
00082     }
00083 
00086     void tetraCorner()
00087     {
00088       _testTools->intersectMeshes("UnitTetra", "CornerTetra", 0.0135435);
00089     }
00090 
00093     void tetraSimpleIncluded()
00094     {
00095       _testTools->intersectMeshes("SimpleIncludedTetra", "SimpleIncludingTetra", 17.0156);
00096     }
00097 
00100     void tetraDegenEdge()
00101     {
00102       _testTools->intersectMeshes("UnitTetraDegenT", "DegenEdgeXY", 0.0);
00103     }
00104 
00107     void tetraDegenFace()
00108     {
00109       _testTools->intersectMeshes("UnitTetraDegenT", "DegenFaceXYZ", 0.0);
00110     }
00111 
00114     void tetraDegenTranslatedInPlane()
00115     {
00116       _testTools->intersectMeshes("UnitTetraDegenT", "DegenTranslatedInPlane", 0.0571667);
00117     }
00118 
00121     void tetraHalfstripOnly()
00122     {
00123       // NB this test is not completely significant : we should also verify that 
00124       // there are triangles on the element that give a non-zero volume
00125       _testTools->intersectMeshes("HalfstripOnly", "UnitTetra", 0.0);
00126     }
00127 
00130     void tetraHalfstripOnly2()
00131     {
00132       // NB this test is not completely significant : we should also verify that 
00133       // there are triangles on the element that give a non-zero volume
00134       _testTools->intersectMeshes("HalfstripOnly2", "UnitTetra", 0.0);
00135     }
00136   
00139     void tetraSimpleHalfstripOnly()
00140     {
00141       // NB this test is not completely significant : we should also verify that 
00142       // there are triangles on the element that give a non-zero volume
00143       _testTools->intersectMeshes("SimpleHalfstripOnly", "UnitTetra", 0.0);
00144     }
00145 
00148     void generalTetra()
00149     {
00150       _testTools->intersectMeshes("GenTetra1", "GenTetra2", 4.91393);
00151     }
00152 
00155     void trickyTetra1()
00156     {
00157       _testTools->intersectMeshes("UnitTetra", "TrickyTetra1", 0.0);
00158     }
00159 
00163     void inconsistentTetra()
00164     {
00165       _testTools->intersectMeshes("LargeUnitTetra.med", "LargeUnitTetra", "LargeInconsistentTetra.med", "LargeInconsistent", 7.86231e7);
00166     }
00167 
00168   };
00169 }
00170 #endif