MOAB: Mesh Oriented datABase
(version 5.4.1)
|
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 |
Definition at line 622 of file ObjectiveFunctionTests.cpp.
OFTestBadQM::OFTestBadQM | ( | bool | return_error | ) | [inline] |
Definition at line 625 of file ObjectiveFunctionTests.cpp.
: mError( return_error ) {}
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.
pd | The patch. |
handle | The location in the patch (as passed back from get_evaluations). |
value | The 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] |
Implements MBMesquite::QualityMetric.
Definition at line 627 of file ObjectiveFunctionTests.cpp.
References MBMesquite::QualityMetric::ELEMENT_BASED.
{ return ELEMENT_BASED; }
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;
}
bool OFTestBadQM::mError [private] |
Definition at line 688 of file ObjectiveFunctionTests.cpp.
Referenced by evaluate(), evaluate_with_gradient(), evaluate_with_Hessian(), and evaluate_with_indices().