Computes the L_infinity objective function for a given patch, i.e., LInfTemplate::concrete_evaluate returns the maximum absolute value of the quality metric values on 'patch'. More...
#include <LInfTemplate.hpp>


Public Member Functions | |
| LInfTemplate (QualityMetric *) | |
| virtual | ~LInfTemplate () |
| virtual bool | concrete_evaluate (PatchData &patch, double &fval, MsqError &err) |
| LInfTemplate (QualityMetric *) | |
| virtual | ~LInfTemplate () |
| virtual bool | concrete_evaluate (PatchData &patch, double &fval, MsqError &err) |
Public Member Functions inherited from ObjectiveFunction | |
| ObjectiveFunction () | |
| virtual | ~ObjectiveFunction () |
| bool | evaluate (PatchData &patch, double &fval, MsqError &err) |
| void | set_gradient_type (GRADIENT_TYPE grad) |
| Set gradType to either NUMERICAL_GRADIENT or ANALYTICAL_GRADIENT. More... | |
| bool | compute_gradient (PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size=0) |
| Calls either compute_numerical_gradient or compute_analytical_gradient depending on the value of gradType. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'. More... | |
| bool | compute_hessian (PatchData &patch, MsqHessian &hessian, Vector3D *const &grad, double &OF_val, MsqError &err) |
| Calls compute_analytical_hessian. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'. More... | |
| QualityMetric * | get_quality_metric () |
| virtual msq_std::list < QualityMetric * > | get_quality_metric_list () |
| void | set_quality_metric (QualityMetric *qm) |
| Set the value of qMetric. More... | |
| void | set_negate_flag (int neg) |
| Set the value of ObjectiveFunction's negateFlag. Unless composite, concrete ObjectiveFunctions should set this flag to to the value of the associated QualityMetric's negateFLag. More... | |
| int | get_negate_flag () |
| Returns negateFlag. More... | |
| ObjectiveFunction () | |
| virtual | ~ObjectiveFunction () |
| bool | evaluate (PatchData &patch, double &fval, MsqError &err) |
| void | set_gradient_type (GRADIENT_TYPE grad) |
| Set gradType to either NUMERICAL_GRADIENT or ANALYTICAL_GRADIENT. More... | |
| bool | compute_gradient (PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size=0) |
| Calls either compute_numerical_gradient or compute_analytical_gradient depending on the value of gradType. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'. More... | |
| bool | compute_hessian (PatchData &patch, MsqHessian &hessian, Vector3D *const &grad, double &OF_val, MsqError &err) |
| Calls compute_analytical_hessian. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'. More... | |
| QualityMetric * | get_quality_metric () |
| virtual msq_std::list < QualityMetric * > | get_quality_metric_list () |
| void | set_quality_metric (QualityMetric *qm) |
| Set the value of qMetric. More... | |
| void | set_negate_flag (int neg) |
| Set the value of ObjectiveFunction's negateFlag. Unless composite, concrete ObjectiveFunctions should set this flag to to the value of the associated QualityMetric's negateFLag. More... | |
| int | get_negate_flag () |
| Returns negateFlag. More... | |
Protected Member Functions | |
| virtual bool | compute_analytical_gradient (PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size) |
| virtual bool | compute_analytical_gradient (PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size) |
Protected Member Functions inherited from ObjectiveFunction | |
| bool | compute_numerical_gradient (PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size) |
| Non-virtual function which numerically computes the gradient of the Objective Function. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'. More... | |
| virtual bool | compute_analytical_hessian (PatchData &, MsqHessian &, Vector3D *const &, double &, MsqError &) |
| double | get_eps (PatchData &pd, double &local_val, int k, MsqVertex *vertex, MsqError &err) |
| Returns eps used in the numerical gradient calculation. More... | |
| void | set_use_local_gradient (bool new_bool) |
| Sets useLocalGradient This variable determines whether compute_numercial_gradient can use the most efficient gradient calculation. More... | |
| bool | compute_numerical_gradient (PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size) |
| Non-virtual function which numerically computes the gradient of the Objective Function. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'. More... | |
| virtual bool | compute_analytical_hessian (PatchData &, MsqHessian &, Vector3D *const &, double &, MsqError &) |
| double | get_eps (PatchData &pd, double &local_val, int k, MsqVertex *vertex, MsqError &err) |
| Returns eps used in the numerical gradient calculation. More... | |
| void | set_use_local_gradient (bool new_bool) |
| Sets useLocalGradient This variable determines whether compute_numercial_gradient can use the most efficient gradient calculation. More... | |
Additional Inherited Members | |
Public Types inherited from ObjectiveFunction | |
| enum | GRADIENT_TYPE { NUMERICAL_GRADIENT, ANALYTICAL_GRADIENT, NUMERICAL_GRADIENT, ANALYTICAL_GRADIENT } |
| enum | GRADIENT_TYPE { NUMERICAL_GRADIENT, ANALYTICAL_GRADIENT, NUMERICAL_GRADIENT, ANALYTICAL_GRADIENT } |
Computes the L_infinity objective function for a given patch, i.e., LInfTemplate::concrete_evaluate returns the maximum absolute value of the quality metric values on 'patch'.
Definition at line 55 of file includeLinks/LInfTemplate.hpp.
| LInfTemplate | ( | QualityMetric * | qualitymetric | ) |
Definition at line 42 of file ObjectiveFunction/LInfTemplate.cpp.
References ObjectiveFunction::ANALYTICAL_GRADIENT, QualityMetric::get_negate_flag(), ObjectiveFunction::set_gradient_type(), ObjectiveFunction::set_negate_flag(), and ObjectiveFunction::set_quality_metric().

|
virtual |
Definition at line 50 of file ObjectiveFunction/LInfTemplate.cpp.
| LInfTemplate | ( | QualityMetric * | ) |
|
virtual |
|
protectedvirtual |
Fills an array of Vector3D, grad, with the gradient of the objective function computed using the gradient of the quality metric. If the function has not been over-riden in the concrete Objective Function, the base class implementation prints a warning and then defaults to numerical gradient. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'.
| patch | The PatchData object for which the objective function gradient is computed. |
| grad | An array of Vector3D, at least the size of the number of vertices in the patch. |
| OF_val | is set to the value of the objective function. |
| array_size | is the size of the grad Vector3D[] array and must correspond to the number of vertices in the patch. |
Reimplemented from ObjectiveFunction.
Definition at line 105 of file ObjectiveFunction/LInfTemplate.cpp.
References MsqError::INVALID_STATE, and MSQ_SETERR.
|
protectedvirtual |
Fills an array of Vector3D, grad, with the gradient of the objective function computed using the gradient of the quality metric. If the function has not been over-riden in the concrete Objective Function, the base class implementation prints a warning and then defaults to numerical gradient. Function returns 'false' if the patch is not within a required feasible regeion. Otherwise, it returns 'true'.
| patch | The PatchData object for which the objective function gradient is computed. |
| grad | An array of Vector3D, at least the size of the number of vertices in the patch. |
| OF_val | is set to the value of the objective function. |
| array_size | is the size of the grad Vector3D[] array and must correspond to the number of vertices in the patch. |
Reimplemented from ObjectiveFunction.
Evaluate the objective function on a given patch.
Implements ObjectiveFunction.
Evaluate the objective function on a given patch.
Implements ObjectiveFunction.
Definition at line 54 of file ObjectiveFunction/LInfTemplate.cpp.
References QualityMetric::ELEMENT_BASED, QualityMetric::evaluate_element(), QualityMetric::evaluate_vertex(), PatchData::get_element_array(), QualityMetric::get_metric_type(), ObjectiveFunction::get_quality_metric(), ObjectiveFunction::get_quality_metric_list(), PatchData::get_vertex_array(), MSQ_ERRZERO, PatchData::num_elements(), and PatchData::num_vertices().
