xref: /petsc/src/tao/bound/impls/bqnk/bqnkls.c (revision 31d78bcd2b98084dc1368b20eb1129c8b9fb39fe)
1 #include <../src/tao/bound/impls/bqnk/bqnk.h>
2 
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_`. For options database, see `TAOBNK`
9 
10   Level: beginner
11 
12 .seealso: `Tao`, `TaoType`, `TAOBNK`, `TAOBQNKTR`, `TAOBQNKTL`
13 M*/
TaoCreate_BQNKLS(Tao tao)14 PETSC_EXTERN PetscErrorCode TaoCreate_BQNKLS(Tao tao)
15 {
16   TAO_BNK  *bnk;
17   TAO_BQNK *bqnk;
18 
19   PetscFunctionBegin;
20   PetscCall(TaoCreate_BQNK(tao));
21   bnk              = (TAO_BNK *)tao->data;
22   bnk->update_type = BNK_UPDATE_STEP;
23   bqnk             = (TAO_BQNK *)bnk->ctx;
24   bqnk->solve      = TaoSolve_BNLS;
25   PetscFunctionReturn(PETSC_SUCCESS);
26 }
27