37 #include "Vector3D.hpp"
39 #include "QualityMetric.hpp"
41 using namespace Mesquite;
69 temp_vec[0]=vertices[v_i[1]]-vertices[v_i[0]];
70 temp_vec[2]=vertices[v_i[2]]-vertices[v_i[0]];
76 temp_vec[0]=vertices[v_i[1]]-vertices[v_i[0]];
77 temp_vec[1]=vertices[v_i[3]]-vertices[v_i[0]];
81 temp_vec[0]=vertices[v_i[2]]-vertices[v_i[1]];
82 temp_vec[1]=vertices[v_i[0]]-vertices[v_i[1]];
86 temp_vec[0]=vertices[v_i[3]]-vertices[v_i[2]];
87 temp_vec[1]=vertices[v_i[1]]-vertices[v_i[2]];
91 temp_vec[0]=vertices[v_i[0]]-vertices[v_i[3]];
92 temp_vec[1]=vertices[v_i[2]]-vertices[v_i[3]];
97 temp_vec[0]=vertices[v_i[1]]-vertices[v_i[0]];
98 temp_vec[3]=vertices[v_i[2]]-vertices[v_i[0]];
99 temp_vec[4]=vertices[v_i[3]]-vertices[v_i[0]];
102 temp_vec[2]=((3*temp_vec[4])-temp_vec[0]-temp_vec[3])/
160 temp_vec[0]=vertices[v_i[1]]-vertices[v_i[0]];
161 temp_vec[1]=vertices[v_i[3]]-vertices[v_i[0]];
162 temp_vec[2]=vertices[v_i[4]]-vertices[v_i[0]];
166 temp_vec[0]=vertices[v_i[2]]-vertices[v_i[1]];
167 temp_vec[1]=vertices[v_i[0]]-vertices[v_i[1]];
168 temp_vec[2]=vertices[v_i[5]]-vertices[v_i[1]];
172 temp_vec[0]=vertices[v_i[3]]-vertices[v_i[2]];
173 temp_vec[1]=vertices[v_i[1]]-vertices[v_i[2]];
174 temp_vec[2]=vertices[v_i[6]]-vertices[v_i[2]];
178 temp_vec[0]=vertices[v_i[0]]-vertices[v_i[3]];
179 temp_vec[1]=vertices[v_i[2]]-vertices[v_i[3]];
180 temp_vec[2]=vertices[v_i[7]]-vertices[v_i[3]];
184 temp_vec[0]=vertices[v_i[7]]-vertices[v_i[4]];
185 temp_vec[1]=vertices[v_i[5]]-vertices[v_i[4]];
186 temp_vec[2]=vertices[v_i[0]]-vertices[v_i[4]];
190 temp_vec[0]=vertices[v_i[4]]-vertices[v_i[5]];
191 temp_vec[1]=vertices[v_i[6]]-vertices[v_i[5]];
192 temp_vec[2]=vertices[v_i[1]]-vertices[v_i[5]];
196 temp_vec[0]=vertices[v_i[5]]-vertices[v_i[6]];
197 temp_vec[1]=vertices[v_i[7]]-vertices[v_i[6]];
198 temp_vec[2]=vertices[v_i[2]]-vertices[v_i[6]];
202 temp_vec[0]=vertices[v_i[6]]-vertices[v_i[7]];
203 temp_vec[1]=vertices[v_i[4]]-vertices[v_i[7]];
204 temp_vec[2]=vertices[v_i[3]]-vertices[v_i[7]];
bool condition_number_3d(Vector3D temp_vec[], PatchData &pd, double &fval, MsqError &err)
Given the 3-d jacobian matrix, compute the condition number, fval.
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
Used to hold the error state and return it to the application.
bool evaluate_element(PatchData &pd, MsqMeshEntity *element, double &fval, MsqError &err)
evaluate using mesquite objects
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...
const int MSQ_MAX_NUM_VERT_PER_ENT
ConditionNumberQualityMetric()
static const double MSQ_SQRT_TWO
void set_element_evaluation_mode(ElementEvaluationMode mode, MsqError &err)
Sets the evaluation mode for the ELEMENT_BASED metrics.
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
bool condition_number_2d(Vector3D temp_vec[], size_t v_ind, PatchData &pd, double &fval, MsqError &err)
Given the 2-d jacobian matrix, compute the condition number, fval.
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
EntityTopology get_element_type() const
Returns element type.
const msq_stdc::size_t * get_vertex_index_array() const
Very efficient retrieval of vertices indexes (corresponding to the PatchData vertex array)...
void set_metric_type(MetricType t)
This function should be used in the constructor of every concrete quality metric. ...
static const double MSQ_SQRT_THREE_INV
double average_metrics(const double metric_values[], const int &num_values, MsqError &err)
average_metrics takes an array of length num_values and averages the contents using averaging method ...
AveragingMethod avgMethod
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
void set_name(msq_std::string st)
Sets the name of this metric.
static const double MSQ_SQRT_THREE