MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
NumericQM (QualityMetric *real_metric) | |
virtual MetricType | get_metric_type () const |
virtual std::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 &pd, std::vector< size_t > &handles, bool free_vertices_only, MsqError &err) |
Get locations at which metric can be evaluated. | |
virtual bool | evaluate (PatchData &pd, size_t handle, double &value, MsqError &err) |
Get metric value at a logical location in the patch. | |
virtual bool | evaluate_with_indices (PatchData &pd, size_t handle, double &value, std::vector< size_t > &indices, MsqError &err) |
Get metric value at a logical location in the patch. | |
Private Attributes | |
QualityMetric * | realMetric |
Definition at line 108 of file idft_time_test.cpp.
NumericQM::NumericQM | ( | QualityMetric * | real_metric | ) | [inline] |
Definition at line 114 of file idft_time_test.cpp.
: realMetric( real_metric ) {}
bool NumericQM::evaluate | ( | PatchData & | pd, |
size_t | handle, | ||
double & | value, | ||
MsqError & | err | ||
) | [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 478 of file idft_time_test.cpp.
{ return realMetric->evaluate( pd, handle, value, err ); }
bool NumericQM::evaluate_with_indices | ( | PatchData & | pd, |
size_t | handle, | ||
double & | value, | ||
std::vector< size_t > & | indices, | ||
MsqError & | err | ||
) | [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. |
indices | The free vertices that the evaluation is a function of, specified as vertex indices in the PatchData. |
Implements MBMesquite::QualityMetric.
Definition at line 483 of file idft_time_test.cpp.
{ return realMetric->evaluate_with_indices( pd, handle, value, indices, err ); }
void NumericQM::get_evaluations | ( | PatchData & | pd, |
std::vector< size_t > & | handles, | ||
bool | free_vertices_only, | ||
MsqError & | err | ||
) | [virtual] |
Get locations at which metric can be evaluated.
Different metrics are evaluated for different things within a patch. For example, an element-based metric will be evaluated once for each element in patch, a vertex-based metric once for each veretx, and a target/sample-point based metric will be evaluated once for each samle point in each element. This method returns a list of handles, one for each location in the patch at which the metric can be evaluated. The handle values are used as input to the evaluate methods.
pd | The patch |
handles | Output list of handles |
free_vertices_only | If true, only pass back evaluation points that depend on at least one free vertex. |
Implements MBMesquite::QualityMetric.
Definition at line 473 of file idft_time_test.cpp.
{ realMetric->get_evaluations( pd, handles, free_vertices_only, err ); }
QualityMetric::MetricType NumericQM::get_metric_type | ( | ) | const [virtual] |
Implements MBMesquite::QualityMetric.
Definition at line 129 of file idft_time_test.cpp.
{ return realMetric->get_metric_type(); }
std::string NumericQM::get_name | ( | ) | const [virtual] |
Implements MBMesquite::QualityMetric.
Definition at line 133 of file idft_time_test.cpp.
{ std::string r = realMetric->get_name(); r += " (FD)"; return r; }
int NumericQM::get_negate_flag | ( | ) | const [virtual] |
1 if metric should be minimized, -1 if metric should be maximized.
Implements MBMesquite::QualityMetric.
Definition at line 468 of file idft_time_test.cpp.
{ return realMetric->get_negate_flag(); }
QualityMetric* NumericQM::realMetric [private] |
Definition at line 111 of file idft_time_test.cpp.