37 #include "MsqTimer.hpp"
38 #include "MsqError.hpp"
39 #include "MsqDebug.hpp"
40 #include "PatchData.hpp"
63 MSQ_DBGOUT(1) <<
"ObjectiveFunction being scaled by zero.";
126 for(i=0;i<num_vert;++
i){
127 grad[
i]*=scale_factor;
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.
void set_quality_metric(QualityMetric *qm)
Set the value of qMetric.
Used to hold the error state and return it to the application.
bool evaluate(PatchData &patch, double &fval, MsqError &err)
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
every differentiable function should have an analytical gradient implemented.
virtual msq_std::list< QualityMetric * > get_quality_metric_list()
Returns the QualityMetric list assossiated with objFunc.
bool compute_analytical_gradient(PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size)
Implement the scalar multiply analytic gradient.
QualityMetric * get_quality_metric()
virtual msq_std::list< QualityMetric * > get_quality_metric_list()
CompositeOFScalarMultiply(double, ObjectiveFunction *)
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
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 grad...
virtual ~CompositeOFScalarMultiply()
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.
int get_negate_flag()
Returns negateFlag.
virtual bool concrete_evaluate(PatchData &patch, double &fval, MsqError &err)
#define MSQ_FUNCTION_TIMER(NAME)
ObjectiveFunction * objFunc
#define MSQ_DBGOUT(flag)
Check debug flag and return ostream associated with flag.
Base class for concrete Objective Functions ObjectiveFunction contains a pointer to a QualityMetric...