xmsmesh
1.0
|
Tests for MeRelaxer. More...
Public Member Functions | |
void | testRelaxWhileMeshing () |
Tests the relaxation code as if we were creating a mesh. More... | |
void | testSpringRelaxSetup () |
Tests the spring relax setup. Uses the TIN below. More... | |
void | testSpringRelaxSetup2 () |
Tests the spring relax setup. Uses the TIN below. This tin has missing triangles compared to the previous example. More... | |
void | testSpringRelaxSinglePoint () |
Tests the spring relax of a point. Uses the TIN below. More... | |
void | testSpringRelaxSinglePoint2 () |
Tests the spring relax of a point. Uses the TIN below. More... | |
void | testSpringRelaxSinglePoint3 () |
Tests the spring relax of a point. Uses the TIN below. We are relaxing point 4 and it has 3 connections to the upper edge, 2 connection to the middle and 1 connection to the bottom edge. The result is that the points is "pulled" toward the upper edge. This is not desirable for pre quad mesh generation. More... | |
void | testNewLocationIsValid () |
Tests that a new location for a point is within one of the triangles adjacent to that point's current position. More... | |
void | testAllTrianglesHavePositiveArea () |
Tests the spring relax of a point. Uses the TIN below. More... | |
Tests for MeRelaxer.
Definition at line 24 of file MeRelaxer.t.h.
void MeRelaxerUnitTests::testAllTrianglesHavePositiveArea | ( | ) |
Tests the spring relax of a point. Uses the TIN below.
Definition at line 1008 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::AllTrianglesHavePositiveArea(), and xms::TrTin::New().
void MeRelaxerUnitTests::testNewLocationIsValid | ( | ) |
Tests that a new location for a point is within one of the triangles adjacent to that point's current position.
Definition at line 942 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::m_sizer, xms::MeRelaxerImpl::m_tin, xms::TrTin::New(), xms::MePolyRedistributePts::New(), xms::MeRelaxerImpl::NewLocationIsValid(), xms::MeRelaxerImpl::SetupNeighbors(), and xms::MeRelaxerImpl::SetupPointSizes().
void MeRelaxerUnitTests::testRelaxWhileMeshing | ( | ) |
Tests the relaxation code as if we were creating a mesh.
// 40- 20-----21-----22-----23-----24 // | |\2 1|\2 1|\0 2|\1 0| // | |0\ 12 |1\ 26 |2\ 25 |1\ 28 | // | | \ | \ | \ | \ | // | | 8 \ | \ | \ | \ | // | | \0| 11 \0| 23 \1| 27 \2| // | |1 2\|2 0\|0 1\|2 0\| // 30- 15-----16-----17-----18-----19 // | |\2 1|\2 1|0 2/|\1 0| // | |0\ |1\ 31 | 24 /2|2\ 29 | // | | \ 9 | \ | / | \ | // | | 7 \ | \ | / | \ | // | | \0| 10 \0|1/ 22 | 30 \2| // | |1 2\|2 0\|/0 1|0 1\| // 20- 10-----11-----12-----13-----14 // | |0 2/|\1 0|\0 2|\0 2| // | | 13 /2|2\ 14 |2\ 18 |2\ 21 | // | | / | \ | \ | \ | // | | / 6 | 5 \ | \ | \ | // | |1/ | \2| 15 \1| 19 \1| // | |/0 1|0 1\|0 1\|0 1\| // 10- 5------6------7------8------9 // | |\0 2|\0 2|\1 0|\1 0| // | |2\ |1\ |0\ 16 |0\ 20 | // | | \ 1 | \ 2 | \ | \ | // | | 0 \ | 3 \ | 4 \ | \ | // | | \1| \1| \2| 17 \2| // | |0 1\|2 0\|1 2\|1 2\| // 0 - 0------1------2------3------4 // // |------|------|------|------| // 0 10 20 30 40 ///
Definition at line 637 of file MeRelaxer.cpp.
References xms::TrTin::New(), xms::MeRelaxer::New(), xms::TrTriangulator::Triangulate(), TS_ASSERT_DELTA_VECPT3D, and XM_COUNTOF.
void MeRelaxerUnitTests::testSpringRelaxSetup | ( | ) |
Tests the spring relax setup. Uses the TIN below.
Definition at line 691 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::m_pointNeighbors, xms::MeRelaxerImpl::m_pointSizes, xms::MeRelaxerImpl::m_sizer, xms::MeRelaxerImpl::m_tin, xms::TrTin::New(), xms::MePolyRedistributePts::New(), xms::MeRelaxerImpl::SetupNeighbors(), xms::MeRelaxerImpl::SetupPointSizes(), TS_ASSERT_EQUALS_VEC, and TS_ASSERT_EQUALS_VEC2D.
void MeRelaxerUnitTests::testSpringRelaxSetup2 | ( | ) |
Tests the spring relax setup. Uses the TIN below. This tin has missing triangles compared to the previous example.
Definition at line 732 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::m_pointNeighbors, xms::MeRelaxerImpl::m_pointSizes, xms::MeRelaxerImpl::m_sizer, xms::MeRelaxerImpl::m_tin, xms::TrTin::New(), xms::MePolyRedistributePts::New(), xms::MeRelaxerImpl::SetupNeighbors(), xms::MeRelaxerImpl::SetupPointSizes(), TS_ASSERT_EQUALS_VEC, and TS_ASSERT_EQUALS_VEC2D.
void MeRelaxerUnitTests::testSpringRelaxSinglePoint | ( | ) |
Tests the spring relax of a point. Uses the TIN below.
Definition at line 773 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::m_sizer, xms::MeRelaxerImpl::m_tin, Mdist(), xms::TrTin::New(), xms::MePolyRedistributePts::New(), xms::MeRelaxerImpl::NewLocationIsValid(), xms::MeRelaxerImpl::SetupNeighbors(), xms::MeRelaxerImpl::SetupPointSizes(), xms::MeRelaxerImpl::SpringRelaxSinglePoint(), TS_ASSERT_DELTA_PT3D, xms::Pt3< T >::x, and xms::Pt3< T >::y.
void MeRelaxerUnitTests::testSpringRelaxSinglePoint2 | ( | ) |
Tests the spring relax of a point. Uses the TIN below.
Definition at line 835 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::m_pointSizes, xms::MeRelaxerImpl::m_sizer, xms::MeRelaxerImpl::m_tin, Mdist(), xms::TrTin::New(), xms::MePolyRedistributePts::New(), xms::MeRelaxerImpl::NewLocationIsValid(), xms::MeRelaxerImpl::SetupNeighbors(), xms::MeRelaxerImpl::SetupPointSizes(), xms::MeRelaxerImpl::SpringRelaxSinglePoint(), TS_ASSERT_DELTA_PT3D, xms::Pt3< T >::x, and xms::Pt3< T >::y.
void MeRelaxerUnitTests::testSpringRelaxSinglePoint3 | ( | ) |
Tests the spring relax of a point. Uses the TIN below. We are relaxing point 4 and it has 3 connections to the upper edge, 2 connection to the middle and 1 connection to the bottom edge. The result is that the points is "pulled" toward the upper edge. This is not desirable for pre quad mesh generation.
Definition at line 903 of file MeRelaxer.cpp.
References xms::MeRelaxerImpl::m_sizer, xms::MeRelaxerImpl::m_tin, xms::TrTin::New(), xms::MePolyRedistributePts::New(), xms::MeRelaxerImpl::NewLocationIsValid(), xms::MeRelaxerImpl::SetupNeighbors(), xms::MeRelaxerImpl::SetupPointSizes(), and xms::MeRelaxerImpl::SpringRelaxSinglePoint().