From bfcd543f7ed589cd494ca806abbbc3c670adbfaf Mon Sep 17 00:00:00 2001 From: ndjinga Date: Wed, 16 Apr 2008 07:28:57 +0000 Subject: [PATCH] 3D surf interpolation tests on the interpolation matrix --- .../Test/MultiElement3DSurfTests.hxx | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/INTERP_KERNEL/Test/MultiElement3DSurfTests.hxx diff --git a/src/INTERP_KERNEL/Test/MultiElement3DSurfTests.hxx b/src/INTERP_KERNEL/Test/MultiElement3DSurfTests.hxx new file mode 100644 index 000000000..94b131367 --- /dev/null +++ b/src/INTERP_KERNEL/Test/MultiElement3DSurfTests.hxx @@ -0,0 +1,44 @@ +#ifndef __MULTI_ELEMENT_3DSurf_TESTS_HXX_ +#define __MULTI_ELEMENT_3DSurf_TESTS_HXX_ + +#include "InterpolationTestSuite.hxx" + +namespace INTERP_TEST +{ + /** + * \brief Class testing algorithm by intersecting meshes of several + * polygonal elements - up to a few thousand. This serves to check the + * filtering methods and the matrix assemblage, as well as verifying + * that computation errors do not become unmanageable. It uses mehes of + * different geometries : triangle, quadrilateral. + * + */ + class MultiElement2DTests : public InterpolationTestSuite<3,2> + { + CPPUNIT_TEST_SUITE( MultiElement3DSurfTests ); + + CPPUNIT_TEST(SymetryTranspose3DSurfTest); + CPPUNIT_TEST(SelfIntersection3DSurfTest); + + CPPUNIT_TEST_SUITE_END(); + + public: + void SymetryTranspose3DSurfTest() + { + _testTools->_intersectionType=INTERP_KERNEL::Triangulation; + _testTools->intersectMeshes("square1.med", "Mesh_2","square2.med","Mesh_3", 10000.); + _testTools->_intersectionType=INTERP_KERNEL::Convex; + _testTools->intersectMeshes("square1.med", "Mesh_2","square2.med","Mesh_3", 10000.); + } + void SelfIntersection3DSurfTest() + { + IntersectionMatrix m; + _testTools->_intersectionType=INTERP_KERNEL::Triangulation; + _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m); + _testTools->_intersectionType=INTERP_KERNEL::Convex; + _testTools->calcIntersectionMatrix("square1.med", "Mesh_2","square1.med","Mesh_2", m); + } + }; +} + +#endif -- 2.39.2