MOAB: Mesh Oriented datABase  (version 5.2.1)
CompositeMetricTestBase Class Reference
+ Inheritance diagram for CompositeMetricTestBase:
+ Collaboration diagram for CompositeMetricTestBase:

Public Member Functions

 CompositeMetricTestBase ()
void test_supported_types ()
void test_ideal_element_eval ()
void test_non_ideal_eval ()
void test_ideal_element_grad ()
void test_ideal_element_hess ()
void test_valid_hessian ()
void test_measures_quality ()
void test_gradient_reflects_quality ()
void test_domain_deviation ()
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_eval_with_gradient ()
void test_eval_with_hessian ()
void test_location_invariant ()
void test_scale_invariant ()
void test_orient_invariant ()

Protected Member Functions

virtual bool evaluate (PatchData &, size_t, double &, MsqError &)=0

Protected Attributes

QualityMetricTester tester
QualityMetricmMetric

Private Member Functions

void test_evaluate (bool ideal, EntityTopology type)

Detailed Description

Definition at line 49 of file CompositeMetricTest.cpp.


Constructor & Destructor Documentation


Member Function Documentation

void CompositeMetricTestBase::test_evaluate ( bool  ideal,
EntityTopology  type 
) [private]

Definition at line 183 of file CompositeMetricTest.cpp.

References ASSERT_NO_ERROR, CPPUNIT_ASSERT, CPPUNIT_ASSERT_DOUBLES_EQUAL, and mMetric.

{
    MsqPrintError err( std::cout );
    PatchData pd;
    double act, ex;
    bool rval;

    if( ideal )
        tester.get_ideal_element( type, false, pd, false );
    else
        tester.get_nonideal_element( type, pd );

    rval = mMetric->evaluate( pd, 0, act, err );
    ASSERT_NO_ERROR( err );
    CPPUNIT_ASSERT( rval );

    rval = this->evaluate( pd, 0, ex, err );
    ASSERT_NO_ERROR( err );
    CPPUNIT_ASSERT( rval );

    CPPUNIT_ASSERT_DOUBLES_EQUAL( ex, act, 1e-6 );
}

Definition at line 171 of file CompositeMetricTest.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