36 #include "AspectRatioGammaQualityMetric.hpp"
38 #include "Vector3D.hpp"
39 #include "MsqMeshEntity.hpp"
40 #include "PatchData.hpp"
42 #ifdef MSQ_USE_OLD_STD_HEADERS
49 using namespace Mesquite;
62 bool return_val =
true;
65 vector<Vector3D> vert;
73 vol=(((vert[1]-vert[0])*(vert[2]-vert[0])).
length())/2.0;
80 temp_vec=vert[1]-vert[0];
81 fval=temp_vec.length_squared();
82 temp_vec=vert[2]-vert[0];
83 fval+=temp_vec.length_squared();
84 temp_vec=vert[1]-vert[2];
85 fval+=temp_vec.length_squared();
95 vol=(vert[1]-vert[0])%((vert[2]-vert[0])*(vert[3]-vert[0]))/6.0;
101 temp_vec=vert[1]-vert[0];
102 fval=temp_vec.length_squared();
103 temp_vec=vert[2]-vert[0];
104 fval+=temp_vec.length_squared();
105 temp_vec=vert[3]-vert[0];
106 fval+=temp_vec.length_squared();
107 temp_vec=vert[2]-vert[1];
108 fval+=temp_vec.length_squared();
109 temp_vec=vert[3]-vert[1];
110 fval+=temp_vec.length_squared();
111 temp_vec=vert[3]-vert[2];
112 fval+=temp_vec.length_squared();
125 "Entity type %d is not valid for Aspect Ratio Gamma\n",
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
Used to hold the error state and return it to the application.
MsqMeshEntity is the Mesquite object that stores information about the elements in the mesh...
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
double length(Vector3D *const v, int n)
invalid function argument passed
size_t get_element_index(MsqMeshEntity *element)
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
bool evaluate_element(PatchData &pd, MsqMeshEntity *element, double &fval, MsqError &err)
Computes the aspect ratio gamma of element.
EntityTopology get_element_type() const
Returns element type.
void get_element_vertex_coordinates(size_t elem_index, msq_std::vector< Vector3D > &coords, MsqError &err)
Get the coordinates of vertices attached to the specified element.