|
| HiopOptimizationProblem (const OptimizationProblem &prob) |
|
| HiopOptimizationProblem (const MPI_Comm &comm_, const OptimizationProblem &prob) |
|
void | setStartingPoint (const Vector &x0) |
|
virtual bool | get_prob_sizes (hiop::size_type &n, hiop::size_type &m) |
|
virtual bool | get_starting_point (const hiop::size_type &n, double *x0) |
|
virtual bool | get_vars_info (const hiop::size_type &n, double *xlow, double *xupp, NonlinearityType *type) |
|
virtual bool | get_cons_info (const hiop::size_type &m, double *clow, double *cupp, NonlinearityType *type) |
|
virtual bool | eval_f (const hiop::size_type &n, const double *x, bool new_x, double &obj_value) |
|
virtual bool | eval_grad_f (const hiop::size_type &n, const double *x, bool new_x, double *gradf) |
|
virtual bool | eval_cons (const hiop::size_type &n, const hiop::size_type &m, const hiop::size_type &num_cons, const hiop::index_type *idx_cons, const double *x, bool new_x, double *cons) |
|
virtual bool | eval_Jac_cons (const hiop::size_type &n, const hiop::size_type &m, const hiop::size_type &num_cons, const hiop::index_type *idx_cons, const double *x, bool new_x, double *Jac) |
|
virtual bool | get_vecdistrib_info (hiop::size_type global_n, hiop::index_type *cols) |
|
virtual void | solution_callback (hiop::hiopSolveStatus status, hiop::size_type n, const double *x, const double *z_L, const double *z_U, hiop::size_type m, const double *g, const double *lambda, double obj_value) |
|
virtual bool | iterate_callback (int iter, double obj_value, double logbar_obj_value, int n, const double *x, const double *z_L, const double *z_U, int m_ineq, const double *s, int m, const double *g, const double *lambda, double inf_pr, double inf_du, double onenorm_pr_, double mu, double alpha_du, double alpha_pr, int ls_trials) |
|
virtual bool | get_MPI_comm (MPI_Comm &comm_out) |
|
Internal class - adapts the OptimizationProblem class to HiOp's interface.
Definition at line 32 of file hiop.hpp.
bool mfem::HiopOptimizationProblem::eval_cons |
( |
const hiop::size_type & | n, |
|
|
const hiop::size_type & | m, |
|
|
const hiop::size_type & | num_cons, |
|
|
const hiop::index_type * | idx_cons, |
|
|
const double * | x, |
|
|
bool | new_x, |
|
|
double * | cons ) |
|
virtual |
Evaluates a subset of the constraints cons(x). The subset is of size num_cons and is described by indexes in the idx_cons array, i.e. cons[c] = C(x)[idx_cons[c]] where c = 0 .. num_cons-1. The methods may be called multiple times, each time for a subset of the constraints, for example, for the subset containing the equalities and for the subset containing the inequalities. However, each constraint will be inquired EXACTLY once. This is done for performance considerations, to avoid temporary holders and memory copying.
Parameters:
- n, m: the global number of variables and constraints
- num_cons, idx_cons (array of size num_cons): the number and indexes of constraints to be evaluated
- x: the point where the constraints are to be evaluated
- new_x: whether x has been changed from the previous call to f, grad_f, or Jac
- cons: array of size num_cons containing the value of the constraints indicated by idx_cons
When MPI enabled, every rank populates cons, since the constraints are not distributed.
Definition at line 113 of file hiop.cpp.
bool mfem::HiopOptimizationProblem::eval_Jac_cons |
( |
const hiop::size_type & | n, |
|
|
const hiop::size_type & | m, |
|
|
const hiop::size_type & | num_cons, |
|
|
const hiop::index_type * | idx_cons, |
|
|
const double * | x, |
|
|
bool | new_x, |
|
|
double * | Jac ) |
|
virtual |
Evaluates the Jacobian of the subset of constraints indicated by idx_cons. The idx_cons is assumed to be of size num_cons. Example: if cons[c] = C(x)[idx_cons[c]] where c = 0 .. num_cons-1, then one needs to do Jac[c][j] = d cons[c] / dx_j, j = 1 .. n_loc. Jac is computed and stored in a contiguous vector (offset by rows).
Parameters: see eval_cons().
When MPI enabled, each rank computes only the local columns of the Jacobian, that is the partials with respect to local variables.
Definition at line 140 of file hiop.cpp.
bool mfem::HiopOptimizationProblem::get_vecdistrib_info |
( |
hiop::size_type | global_n, |
|
|
hiop::index_type * | cols ) |
|
virtual |
Specifies column partitioning for distributed memory vectors. Process p owns vector entries with indices cols[p] to cols[p+1]-1, where p = 0 .. nranks-1. The cols array is of size nranks + 1. Example: for a vector x of 6 entries (globally) on 3 ranks, the uniform column partitioning is cols=[0,2,4,6].
Definition at line 172 of file hiop.cpp.