29 #if MAST_ENABLE_DOT == 0 30 libmesh_error_msg(
"MAST configured without DOT support.");
39 #if MAST_ENABLE_DOT == 1 58 NRWK = std::max(NDV*NCON*10, 100000),
59 NRIWK = std::max(NDV*NCON*10, 300);
61 libmesh_assert_greater(NDV, 0);
62 libmesh_assert_greater(NCON, 0);
82 eval_grads(NCON,
false);
122 else if (INFO == 1) {
123 std::fill(eval_grads.begin(), eval_grads.end(),
false);
126 else if (INFO == 2) {
127 std::fill(eval_grads.begin(), eval_grads.end(),
true);
132 OBJ, obj_grad, DF0DX,
133 G, eval_grads, DFDX);
138 for (
unsigned int i=0; i<NDV; i++) WK[i] = DF0DX[i];
143 n_active_constrs = IPRM[19],
144 active_constr_id = 0;
148 for (
unsigned int i=0; i<n_active_constrs; i++) {
149 active_constr_id = IWK[i];
152 for (
unsigned int j=0; j<NDV; j++)
153 WK[(i+1)*NDV+j] = DFDX[j*NCON+active_constr_id-1];
164 #endif // MAST_ENABLE_DOT 1
virtual void init_dvar(std::vector< Real > &x, std::vector< Real > &xmin, std::vector< Real > &xmax)=0
virtual void evaluate(const std::vector< Real > &dvars, Real &obj, bool eval_obj_grad, std::vector< Real > &obj_grad, std::vector< Real > &fvals, std::vector< bool > &eval_grads, std::vector< Real > &grads)=0
grads(k): Derivative of f_i(x) with respect to x_j, where k = (j-1)*M + i.
unsigned int n_ineq() const
DOTOptimizationInterface()
void dot_(int *INFO, int *METHOD, int *IPRINT, int *NDV, int *NCON, double *X, double *XL, double *XU, double *OBJ, int *MINMAX, double *G, double *RPRM, int *IPRM, double *WK, int *NRWK, int *IWK, int *NRIWK)
Provides the basic interface API for classes the provide implement optimization problems.
unsigned int n_vars() const
virtual void _output_wrapper(unsigned int iter, const std::vector< Real > &x, Real obj, const std::vector< Real > &fval, bool if_write_to_optim_file)
This serves as a wrapper around evaluate() and makes sure that the derived class's implementation is ...
MAST::FunctionEvaluation * _feval
unsigned int n_eq() const