MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
CylinderDomainTest () | |
void | setUp () |
void | tearDown () |
void | test_z_basic () |
void | test_z_snap_to () |
void | test_z_normal_at () |
void | test_z_closest_point () |
void | test_x_basic () |
void | test_x_snap_to () |
void | test_x_normal_at () |
void | test_x_closest_point () |
void | test_domain_DoF () |
Private Member Functions | |
CPPUNIT_TEST_SUITE (CylinderDomainTest) | |
CPPUNIT_TEST (test_z_basic) | |
CPPUNIT_TEST (test_z_snap_to) | |
CPPUNIT_TEST (test_z_normal_at) | |
CPPUNIT_TEST (test_z_closest_point) | |
CPPUNIT_TEST (test_x_basic) | |
CPPUNIT_TEST (test_x_snap_to) | |
CPPUNIT_TEST (test_x_normal_at) | |
CPPUNIT_TEST (test_x_closest_point) | |
CPPUNIT_TEST (test_domain_DoF) | |
CPPUNIT_TEST_SUITE_END () | |
Private Attributes | |
CylinderDomain | z |
CylinderDomain | x |
Definition at line 10 of file CylinderDomainTest.cpp.
CylinderDomainTest::CylinderDomainTest | ( | ) | [inline] |
Definition at line 28 of file CylinderDomainTest.cpp.
CylinderDomainTest::CPPUNIT_TEST | ( | test_z_basic | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_z_snap_to | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_z_normal_at | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_z_closest_point | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_x_basic | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_x_snap_to | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_x_normal_at | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_x_closest_point | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST | ( | test_domain_DoF | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST_SUITE | ( | CylinderDomainTest | ) | [private] |
CylinderDomainTest::CPPUNIT_TEST_SUITE_END | ( | ) | [private] |
void CylinderDomainTest::setUp | ( | ) | [inline] |
Definition at line 30 of file CylinderDomainTest.cpp.
{}
void CylinderDomainTest::tearDown | ( | ) | [inline] |
Definition at line 31 of file CylinderDomainTest.cpp.
{}
void CylinderDomainTest::test_domain_DoF | ( | ) |
Definition at line 180 of file CylinderDomainTest.cpp.
References CPPUNIT_ASSERT, CPPUNIT_ASSERT_EQUAL, and z.
{ const size_t count = 3; unsigned short dof_vals[count]; MsqError err; z.domain_DoF( 0, dof_vals, count, err ); CPPUNIT_ASSERT( !err ); for( size_t i = 0; i < count; ++i ) CPPUNIT_ASSERT_EQUAL( (unsigned short)2, dof_vals[i] ); }
void CylinderDomainTest::test_x_basic | ( | ) |
Definition at line 53 of file CylinderDomainTest.cpp.
References CPPUNIT_ASSERT_EQUAL.
{ CPPUNIT_ASSERT_EQUAL( Vector3D( 1, 0, 0 ), x.axis() ); CPPUNIT_ASSERT_EQUAL( 2.0, x.radius() ); CPPUNIT_ASSERT_EQUAL( Vector3D( 0, 0, 0 ), x.center() ); }
Definition at line 169 of file CylinderDomainTest.cpp.
References ASSERT_VECTORS_EQUAL, and CPPUNIT_ASSERT.
{ MsqError err; Vector3D point( 20, 0, x.radius() ); Vector3D close, normal; x.closest_point( 0, point, close, normal, err ); CPPUNIT_ASSERT( !err ); ASSERT_VECTORS_EQUAL( point, close ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 0, 1 ), normal ); }
void CylinderDomainTest::test_x_normal_at | ( | ) |
Definition at line 127 of file CylinderDomainTest.cpp.
References ASSERT_VECTORS_EQUAL, CPPUNIT_ASSERT_DOUBLES_EQUAL, MBMesquite::EPSILON, MBMesquite::Vector3D::length(), MBMesquite::Vector3D::set(), and MBMesquite::Vector3D::x().
{ Vector3D vect; vect.set( 1, 0, 0.5 ); x.vertex_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 0, 1 ), vect ); vect.set( -5, 100, 0 ); x.vertex_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 1, 0 ), vect ); vect = x.center(); x.vertex_normal_at( 0, vect ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, vect.x(), EPSILON ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, vect.length(), EPSILON ); vect.set( 1, 0, 0.5 ); x.element_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 0, 1 ), vect ); vect.set( -5, 100, 0 ); x.element_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 1, 0 ), vect ); vect = x.center(); x.element_normal_at( 0, vect ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, vect.x(), EPSILON ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, vect.length(), EPSILON ); }
void CylinderDomainTest::test_x_snap_to | ( | ) |
Definition at line 78 of file CylinderDomainTest.cpp.
References ASSERT_VECTORS_EQUAL, CPPUNIT_ASSERT_DOUBLES_EQUAL, MBMesquite::EPSILON, MBMesquite::length(), MBMesquite::Vector3D::set(), and MBMesquite::Vector3D::x().
{ Vector3D vect; vect.set( 1, 0, 0.5 ); x.snap_to( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 1, 0, x.radius() ), vect ); vect.set( -5, 100, 0 ); x.snap_to( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( -5, x.radius(), 0 ), vect ); vect = x.center(); x.snap_to( 0, vect ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 0, vect.x(), EPSILON ); CPPUNIT_ASSERT_DOUBLES_EQUAL( x.radius(), ( vect - x.center() ).length(), EPSILON ); }
void CylinderDomainTest::test_z_basic | ( | ) |
Definition at line 46 of file CylinderDomainTest.cpp.
References CPPUNIT_ASSERT_EQUAL, and z.
{ CPPUNIT_ASSERT_EQUAL( Vector3D( 0, 0, 1 ), z.axis() ); CPPUNIT_ASSERT_EQUAL( 1.0, z.radius() ); CPPUNIT_ASSERT_EQUAL( Vector3D( 0, 0, 0 ), z.center() ); }
Definition at line 158 of file CylinderDomainTest.cpp.
References ASSERT_VECTORS_EQUAL, CPPUNIT_ASSERT, and z.
{ MsqError err; Vector3D point( z.radius(), 0, 20 ); Vector3D close, normal; z.closest_point( 0, point, close, normal, err ); CPPUNIT_ASSERT( !err ); ASSERT_VECTORS_EQUAL( point, close ); ASSERT_VECTORS_EQUAL( Vector3D( 1, 0, 0 ), normal ); }
void CylinderDomainTest::test_z_normal_at | ( | ) |
Definition at line 96 of file CylinderDomainTest.cpp.
References ASSERT_VECTORS_EQUAL, CPPUNIT_ASSERT_DOUBLES_EQUAL, MBMesquite::EPSILON, MBMesquite::Vector3D::length(), MBMesquite::Vector3D::set(), z, and MBMesquite::Vector3D::z().
{ Vector3D vect; vect.set( 0.5, 0, 1 ); z.vertex_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 1, 0, 0 ), vect ); vect.set( 0, 100, -5 ); z.vertex_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 1, 0 ), vect ); vect = z.center(); z.vertex_normal_at( 0, vect ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, vect.z(), EPSILON ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, vect.length(), EPSILON ); vect.set( 0.5, 0, 1 ); z.element_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 1, 0, 0 ), vect ); vect.set( 0, 100, -5 ); z.element_normal_at( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, 1, 0 ), vect ); vect = z.center(); z.element_normal_at( 0, vect ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, vect.z(), EPSILON ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, vect.length(), EPSILON ); }
void CylinderDomainTest::test_z_snap_to | ( | ) |
Definition at line 60 of file CylinderDomainTest.cpp.
References ASSERT_VECTORS_EQUAL, CPPUNIT_ASSERT_DOUBLES_EQUAL, MBMesquite::EPSILON, MBMesquite::length(), MBMesquite::Vector3D::set(), z, and MBMesquite::Vector3D::z().
{ Vector3D vect; vect.set( 0.5, 0, 1 ); z.snap_to( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( z.radius(), 0, 1 ), vect ); vect.set( 0, 100, -5 ); z.snap_to( 0, vect ); ASSERT_VECTORS_EQUAL( Vector3D( 0, z.radius(), -5 ), vect ); vect = z.center(); z.snap_to( 0, vect ); CPPUNIT_ASSERT_DOUBLES_EQUAL( 0, vect.z(), EPSILON ); CPPUNIT_ASSERT_DOUBLES_EQUAL( z.radius(), ( vect - z.center() ).length(), EPSILON ); }
CylinderDomain CylinderDomainTest::x [private] |
Definition at line 25 of file CylinderDomainTest.cpp.
CylinderDomain CylinderDomainTest::z [private] |
Definition at line 25 of file CylinderDomainTest.cpp.