MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Element size (area or volume) More...
#include <SizeMetric.hpp>
Public Member Functions | |
virtual MESQUITE_EXPORT | ~SizeMetric () |
virtual MESQUITE_EXPORT std::string | get_name () const |
virtual MESQUITE_EXPORT int | get_negate_flag () const |
1 if metric should be minimized, -1 if metric should be maximized. | |
virtual MESQUITE_EXPORT bool | evaluate (PatchData &pd, size_t handle, double &value, MsqError &err) |
Get metric value at a logical location in the patch. |
Element size (area or volume)
This metric is intended primarily for use with QualityAssessor for obtaining a summary of the element sizes in the mesh.
Definition at line 46 of file SizeMetric.hpp.
MBMesquite::SizeMetric::~SizeMetric | ( | ) | [virtual] |
Definition at line 39 of file SizeMetric.cpp.
{}
bool MBMesquite::SizeMetric::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 51 of file SizeMetric.cpp.
References MBMesquite::MsqMeshEntity::compute_unsigned_area(), and MBMesquite::PatchData::element_by_index().
{ value = pd.element_by_index( handle ).compute_unsigned_area( pd, err ); return true; }
std::string MBMesquite::SizeMetric::get_name | ( | ) | const [virtual] |
Implements MBMesquite::QualityMetric.
Definition at line 41 of file SizeMetric.cpp.
{ return "Size"; }
int MBMesquite::SizeMetric::get_negate_flag | ( | ) | const [virtual] |
1 if metric should be minimized, -1 if metric should be maximized.
Implements MBMesquite::QualityMetric.
Definition at line 46 of file SizeMetric.cpp.
{
return 1;
}