MOAB: Mesh Oriented datABase  (version 5.4.1)
OFTestBadQM Class Reference
+ Inheritance diagram for OFTestBadQM:
+ Collaboration diagram for OFTestBadQM:

Public Member Functions

 OFTestBadQM (bool return_error)
virtual MetricType get_metric_type () const
virtual string get_name () const
virtual int get_negate_flag () const
 1 if metric should be minimized, -1 if metric should be maximized.
virtual void get_evaluations (PatchData &, vector< size_t > &h, bool, MsqError &)
virtual bool evaluate (PatchData &, size_t h, double &, MsqError &err)
 Get metric value at a logical location in the patch.
virtual bool evaluate_with_indices (PatchData &, size_t h, double &, vector< size_t > &, MsqError &err)
virtual bool evaluate_with_gradient (PatchData &, size_t h, double &, vector< size_t > &, vector< Vector3D > &, MsqError &err)
virtual bool evaluate_with_Hessian (PatchData &, size_t h, double &, vector< size_t > &, vector< Vector3D > &, vector< Matrix3D > &, MsqError &err)

Private Attributes

bool mError

Detailed Description

Definition at line 622 of file ObjectiveFunctionTests.cpp.


Constructor & Destructor Documentation

OFTestBadQM::OFTestBadQM ( bool  return_error) [inline]

Definition at line 625 of file ObjectiveFunctionTests.cpp.

: mError( return_error ) {}

Member Function Documentation

virtual bool OFTestBadQM::evaluate ( PatchData pd,
size_t  handle,
double &  value,
MsqError err 
) [inline, virtual]

Get metric value at a logical location in the patch.

Evaluate the metric at one location in the PatchData.

Parameters:
pdThe patch.
handleThe location in the patch (as passed back from get_evaluations).
valueThe output metric value.

Implements MBMesquite::QualityMetric.

Definition at line 648 of file ObjectiveFunctionTests.cpp.

References CPPUNIT_ASSERT_EQUAL, HANDLE_VAL, mError, and MSQ_SETERR.

    {
        CPPUNIT_ASSERT_EQUAL( HANDLE_VAL, h );
        if( mError ) MSQ_SETERR( err )( MsqError::INVALID_STATE );
        return false;
    }
virtual bool OFTestBadQM::evaluate_with_gradient ( PatchData ,
size_t  h,
double &  ,
vector< size_t > &  ,
vector< Vector3D > &  ,
MsqError err 
) [inline, virtual]

Definition at line 662 of file ObjectiveFunctionTests.cpp.

References CPPUNIT_ASSERT_EQUAL, HANDLE_VAL, mError, and MSQ_SETERR.

    {
        CPPUNIT_ASSERT_EQUAL( HANDLE_VAL, h );
        if( mError ) MSQ_SETERR( err )( MsqError::INVALID_STATE );
        return false;
    }
virtual bool OFTestBadQM::evaluate_with_Hessian ( PatchData ,
size_t  h,
double &  ,
vector< size_t > &  ,
vector< Vector3D > &  ,
vector< Matrix3D > &  ,
MsqError err 
) [inline, virtual]

Definition at line 674 of file ObjectiveFunctionTests.cpp.

References CPPUNIT_ASSERT_EQUAL, HANDLE_VAL, mError, and MSQ_SETERR.

    {
        CPPUNIT_ASSERT_EQUAL( HANDLE_VAL, h );
        if( mError ) MSQ_SETERR( err )( MsqError::INVALID_STATE );
        return false;
    }
virtual bool OFTestBadQM::evaluate_with_indices ( PatchData ,
size_t  h,
double &  ,
vector< size_t > &  ,
MsqError err 
) [inline, virtual]

Definition at line 655 of file ObjectiveFunctionTests.cpp.

References CPPUNIT_ASSERT_EQUAL, HANDLE_VAL, mError, and MSQ_SETERR.

    {
        CPPUNIT_ASSERT_EQUAL( HANDLE_VAL, h );
        if( mError ) MSQ_SETERR( err )( MsqError::INVALID_STATE );
        return false;
    }
virtual void OFTestBadQM::get_evaluations ( PatchData ,
vector< size_t > &  h,
bool  ,
MsqError  
) [inline, virtual]

Definition at line 642 of file ObjectiveFunctionTests.cpp.

References HANDLE_VAL.

    {
        h.clear();
        h.push_back( HANDLE_VAL );
    }
virtual MetricType OFTestBadQM::get_metric_type ( ) const [inline, virtual]
virtual string OFTestBadQM::get_name ( ) const [inline, virtual]

Implements MBMesquite::QualityMetric.

Definition at line 632 of file ObjectiveFunctionTests.cpp.

    {
        return "ObjectiveFunctionTests";
    }
virtual int OFTestBadQM::get_negate_flag ( ) const [inline, virtual]

1 if metric should be minimized, -1 if metric should be maximized.

Implements MBMesquite::QualityMetric.

Definition at line 637 of file ObjectiveFunctionTests.cpp.

    {
        return 1;
    }

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