70 for (index=0; index<num_elements;index++){
78 temp_value = fabs(temp_value);
89 for (index=0; index<num_vertices;index++){
97 temp_value = fabs(temp_value);
111 MSQ_SETERR(err)(
"The LInfTemplate is not sufficient for methods requiring\n"
112 " gradient information. If you neeed to try this anyway, \n"
113 " set the gradient type to numerical.\n",
void set_gradient_type(GRADIENT_TYPE grad)
Set gradType to either NUMERICAL_GRADIENT or ANALYTICAL_GRADIENT.
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
MetricType get_metric_type()
void set_quality_metric(QualityMetric *qm)
Set the value of qMetric.
int get_negate_flag()
Returns negateFlag.
Used to hold the error state and return it to the application.
Base class for concrete quality metrics.
virtual bool concrete_evaluate(PatchData &patch, double &fval, MsqError &err)
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...
every differentiable function should have an analytical gradient implemented.
QualityMetric * get_quality_metric()
virtual msq_std::list< QualityMetric * > get_quality_metric_list()
size_t num_elements() const
number of elements in the Patch.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
void set_negate_flag(int neg)
Set the value of ObjectiveFunction's negateFlag. Unless composite, concrete ObjectiveFunctions should...
size_t num_vertices() const
number of vertices in the patch.
virtual bool evaluate_element(PatchData &, MsqMeshEntity *, double &, MsqError &err)
Evaluate the metric for an element.
virtual bool evaluate_vertex(PatchData &, MsqVertex *, double &, MsqError &err)
Evaluate the metric for a vertex.
virtual bool compute_analytical_gradient(PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size)
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
object is in an invalid state
LInfTemplate(QualityMetric *)
const MsqMeshEntity * get_element_array(MsqError &err) const
Returns a pointer to the start of the element array.
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...