37 #include "MsqTimer.hpp"
38 #include "PatchData.hpp"
85 temp_list.merge(temp_list2);
136 double obj_2_val=0.0;
150 for(i=0;i<num_vert;++
i){
152 grad[
i]+=(second_grad[
i]*OF_val);
156 delete []second_grad;
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.
virtual msq_std::list< QualityMetric * > get_quality_metric_list()
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.
CompositeOFMultiply(ObjectiveFunction *, ObjectiveFunction *)
QualityMetric * get_quality_metric()
virtual msq_std::list< QualityMetric * > get_quality_metric_list()
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
ObjectiveFunction * objFunc2
virtual ~CompositeOFMultiply()
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...
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.
ObjectiveFunction * objFunc1
#define MSQ_FUNCTION_TIMER(NAME)
virtual bool concrete_evaluate(PatchData &patch, double &fval, MsqError &err)
Base class for concrete Objective Functions ObjectiveFunction contains a pointer to a QualityMetric...
bool compute_analytical_gradient(PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size)
Implement the scalar multiply analytic gradient.