35 #include "Vector3D.hpp"
37 #include "QualityMetric.hpp"
40 #ifdef MSQ_USE_OLD_STD_HEADERS
49 using namespace Mesquite;
51 GeneralizedConditionNumberQualityMetric::GeneralizedConditionNumberQualityMetric()
54 set_metric_type(ELEMENT_BASED);
55 set_element_evaluation_mode(ELEMENT_VERTICES, err);
MSQ_CHKERR(err);
56 avgMethod=QualityMetric::LINEAR;
58 set_name(
"Generalized Condition Number");
103 bool GeneralizedConditionNumberQualityMetric::evaluate_element(
PatchData &pd,
108 int num_sample_points;
110 vector<Vector3D> sample_points;
113 vector<Vector3D>::iterator iter=sample_points.begin();
116 short num_jacobian_vectors;
118 num_sample_points=sample_points.size();
119 std::vector<double> metric_values(num_sample_points);
121 for(i=0;i<num_sample_points;++
i){
129 return_flag=compute_condition_number(pd, element, jacobian_vectors,
130 num_jacobian_vectors,
131 metric_values[i],err);
138 fval=average_metrics(&metric_values[0],num_sample_points,err);
MSQ_ERRZERO(err);
142 bool GeneralizedConditionNumberQualityMetric::evaluate_vertex(
PatchData &,
147 MSQ_SETERR(err)(
"Condition Number's evaluate_vertex is currently "
148 "being implemented", MsqError::NOT_IMPLEMENTED);
#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...
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
void compute_weighted_jacobian(PatchData &pd, Vector3D &sample_point, Vector3D jacobian_vectors[], short &num_jacobian_vectors, MsqError &err)
void get_sample_points(QualityMetric::ElementEvaluationMode mode, msq_std::vector< Vector3D > &coords, MsqError &err)
Returns a list of sample points given an evaluationmode.
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...