38 #ifndef LocalSizeQualityMetric_hpp
39 #define LocalSizeQualityMetric_hpp
70 set_name(
"Local Size Quality Metric");
86 size_t vert_2,
size_t vert_3,
91 size_t vert_2,
size_t vert_3,
104 Vector3D vec_1=verts[vert_2]-verts[vert_1];
105 Vector3D vec_2=verts[vert_3]-verts[vert_1];
107 return (cross_vec.
length()/2.0);
119 Vector3D vec_1=verts[vert_2]-verts[vert_1];
120 Vector3D vec_2=verts[vert_3]-verts[vert_1];
121 Vector3D vec_3=verts[vert_4]-verts[vert_1];
122 return fabs((vec_3%(vec_1*vec_2))/6.0);
130 #endif // LocalSizeQualityMetric_hpp
Used to hold the error state and return it to the application.
double compute_corner_area(PatchData &pd, size_t vert_1, size_t vert_2, size_t vert_3, MsqError &err)
Calculate the area of the triangle formed by the three vertices.
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
virtual ~LocalSizeQualityMetric()
bool evaluate_vertex(PatchData &pd, MsqVertex *vert, double &fval, MsqError &err)
For the given vertex, vert, calculate the local size metric value.
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
double compute_corner_volume(PatchData &pd, size_t vert_1, size_t vert_2, size_t vert_3, size_t vert_4, MsqError &err)
Calculate the volume of the tetrahedron formed by the four vertices.
void set_metric_type(MetricType t)
This function should be used in the constructor of every concrete quality metric. ...
AveragingMethod avgMethod
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
Computes the local size metric for a given vertex.
void set_name(msq_std::string st)
Sets the name of this metric.