MOAB: Mesh Oriented datABase  (version 5.4.0)
LocalSizeQualityMetric.cpp File Reference
+ Include dependency graph for LocalSizeQualityMetric.cpp:

Go to the source code of this file.

Functions

static 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.
static 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.

Detailed Description

Author:
Michael Brewer
Date:
April 9, 2003 Evaluates the corner volume (or areas) of the element corners attached to a given vertiex and then averages those values together.

Definition in file LocalSizeQualityMetric.cpp.


Function Documentation

static double compute_corner_area ( PatchData pd,
size_t  vert_1,
size_t  vert_2,
size_t  vert_3,
MsqError err 
) [inline, static]

Calculate the area of the triangle formed by the three vertices.

Definition at line 41 of file LocalSizeQualityMetric.cpp.

References MBMesquite::PatchData::get_vertex_array(), and MBMesquite::Vector3D::length().

Referenced by MBMesquite::LocalSizeQualityMetric::evaluate().

{
    const MsqVertex* verts = pd.get_vertex_array( err );
    Vector3D vec_1         = verts[vert_2] - verts[vert_1];
    Vector3D vec_2         = verts[vert_3] - verts[vert_1];
    Vector3D cross_vec     = vec_1 * vec_2;
    return ( cross_vec.length() / 2.0 );
}
static double compute_corner_volume ( PatchData pd,
size_t  vert_1,
size_t  vert_2,
size_t  vert_3,
size_t  vert_4,
MsqError err 
) [inline, static]

Calculate the volume of the tetrahedron formed by the four vertices.

Definition at line 51 of file LocalSizeQualityMetric.cpp.

References MBMesquite::PatchData::get_vertex_array().

Referenced by MBMesquite::LocalSizeQualityMetric::evaluate().

{
    const MsqVertex* verts = pd.get_vertex_array( err );
    Vector3D vec_1         = verts[vert_2] - verts[vert_1];
    Vector3D vec_2         = verts[vert_3] - verts[vert_1];
    Vector3D vec_3         = verts[vert_4] - verts[vert_1];
    return fabs( ( vec_3 % ( vec_1 * vec_2 ) ) / 6.0 );
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines