Actual source code: bqnkls.c

petsc-3.15.0 2021-04-05
Report Typos and Errors
  1: #include <../src/tao/bound/impls/bqnk/bqnk.h>

  3: /*MC
  4:   TAOBQNKLS - Bounded Quasi-Newton-Krylov Line Search method for nonlinear minimization with
  5:               bound constraints. This method approximates the Hessian-vector product using a
  6:               limited-memory quasi-Newton formula, and iteratively inverts the Hessian with a
  7:               Krylov solver. The quasi-Newton matrix and its settings can be accessed via the
  8:               prefix `-tao_bqnk_`

 10:   Options Database Keys:
 11: + -tao_bqnk_max_cg_its - maximum number of bounded conjugate-gradient iterations taken in each Newton loop
 12: . -tao_bqnk_init_type - trust radius initialization method ("constant", "direction", "interpolation")
 13: . -tao_bqnk_update_type - trust radius update method ("step", "direction", "interpolation")
 14: - -tao_bqnk_as_type - active-set estimation method ("none", "bertsekas")

 16:   Level: beginner
 17: M*/
 18: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKLS(Tao tao)
 19: {
 20:   TAO_BNK        *bnk;
 21:   TAO_BQNK       *bqnk;

 25:   TaoCreate_BQNK(tao);
 26:   bnk = (TAO_BNK*)tao->data;
 27:   bnk->update_type = BNK_UPDATE_STEP;
 28:   bqnk = (TAO_BQNK*)bnk->ctx;
 29:   bqnk->solve = TaoSolve_BNLS;
 30:   return(0);
 31: }