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

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

QualityMetricrealMetric

Detailed Description

Definition at line 108 of file idft_time_test.cpp.


Constructor & Destructor Documentation

NumericQM::NumericQM ( QualityMetric real_metric) [inline]

Definition at line 114 of file idft_time_test.cpp.

: realMetric( real_metric ) {}

Member Function Documentation

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.

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

Implements MBMesquite::QualityMetric.

Definition at line 454 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.

Parameters:
pdThe patch.
handleThe location in the patch (as passed back from get_evaluations).
valueThe output metric value.
indicesThe free vertices that the evaluation is a function of, specified as vertex indices in the PatchData.

Implements MBMesquite::QualityMetric.

Definition at line 459 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.

Parameters:
pdThe patch
handlesOutput list of handles
free_vertices_onlyIf true, only pass back evaluation points that depend on at least one free vertex.

Implements MBMesquite::QualityMetric.

Definition at line 449 of file idft_time_test.cpp.

{
    realMetric->get_evaluations( pd, handles, free_vertices_only, err );
}

Implements MBMesquite::QualityMetric.

Definition at line 124 of file idft_time_test.cpp.

{
    return realMetric->get_metric_type();
}
std::string NumericQM::get_name ( ) const [virtual]

Implements MBMesquite::QualityMetric.

Definition at line 128 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 444 of file idft_time_test.cpp.

{
    return realMetric->get_negate_flag();
}

Member Data Documentation

Definition at line 111 of file idft_time_test.cpp.

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