MOAB: Mesh Oriented datABase  (version 5.3.1)
UntangleBetaTest Class Reference
+ Inheritance diagram for UntangleBetaTest:
+ Collaboration diagram for UntangleBetaTest:

Public Member Functions

 UntangleBetaTest ()
void test_supported_types ()
void test_ideal_element_eval ()
void test_inverted_elements ()
void test_degenerate_elements ()
void test_get_evaluations ()
void test_get_element_indices ()
void test_get_fixed_indices ()
void test_eval_with_indices ()
void test_location_invariant ()
void test_orient_invariant ()

Private Member Functions

 CPPUNIT_TEST_SUITE (UntangleBetaTest)
 CPPUNIT_TEST (test_supported_types)
 CPPUNIT_TEST (test_ideal_element_eval)
 CPPUNIT_TEST (test_inverted_elements)
 CPPUNIT_TEST (test_degenerate_elements)
 CPPUNIT_TEST (test_get_evaluations)
 CPPUNIT_TEST (test_get_element_indices)
 CPPUNIT_TEST (test_get_fixed_indices)
 CPPUNIT_TEST (test_eval_with_indices)
 CPPUNIT_TEST (test_location_invariant)
 CPPUNIT_TEST (test_orient_invariant)
 CPPUNIT_TEST_SUITE_END ()

Private Attributes

UntangleBetaQualityMetric mMetric
QualityMetricTester tester

Detailed Description

Definition at line 41 of file UntangleBetaTest.cpp.


Constructor & Destructor Documentation


Member Function Documentation

Definition at line 127 of file UntangleBetaTest.cpp.

References ASSERT_NO_ERROR, MBMesquite::HEXAHEDRON, mMetric, MBMesquite::PRISM, MBMesquite::PYRAMID, MBMesquite::QUADRILATERAL, MBMesquite::TETRAHEDRON, MBMesquite::TRIANGLE, and value().

    {
        MsqPrintError err( std::cout );
        double value;
        PatchData pd;
        char val_str[128];

        tester.get_zero_element( TRIANGLE, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_zero_element( QUADRILATERAL, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_zero_element( TETRAHEDRON, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_zero_element( HEXAHEDRON, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_zero_element( PRISM, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_zero_element( PYRAMID, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );
    }

Definition at line 176 of file UntangleBetaTest.cpp.

References mMetric.

Definition at line 171 of file UntangleBetaTest.cpp.

References mMetric.

Definition at line 181 of file UntangleBetaTest.cpp.

References mMetric.

Definition at line 83 of file UntangleBetaTest.cpp.

References ASSERT_NO_ERROR, MBMesquite::HEXAHEDRON, mMetric, MBMesquite::PRISM, MBMesquite::PYRAMID, MBMesquite::QUADRILATERAL, MBMesquite::TETRAHEDRON, MBMesquite::TRIANGLE, and value().

    {
        MsqPrintError err( std::cout );
        double value;
        PatchData pd;
        char val_str[128];

        tester.get_inverted_element( TRIANGLE, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_inverted_element( QUADRILATERAL, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_inverted_element( TETRAHEDRON, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_inverted_element( HEXAHEDRON, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_inverted_element( PRISM, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );

        tester.get_inverted_element( PYRAMID, pd );
        mMetric.evaluate( pd, 0, value, err );
        ASSERT_NO_ERROR( err );
        sprintf( val_str, "value: %f", value );
        CPPUNIT_ASSERT_MESSAGE( val_str, value > 1e-6 );
    }

Definition at line 198 of file UntangleBetaTest.cpp.

References mMetric.

Definition at line 68 of file UntangleBetaTest.cpp.

References mMetric.


Member Data Documentation

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines