xref: /petsc/src/tao/leastsquares/impls/brgn/brgn.h (revision 7cea06e17344f68ea9d5d5c2ae263aead5001856)
1 /*
2 Context for Bounded Regularized Gauss-Newton algorithm
3 */
4 
5 #if !defined(__TAO_BRGN_H)
6 #define __TAO_BRGN_H
7 
8 #include <../src/tao/bound/impls/bnk/bnk.h>
9 
10 typedef struct {
11   Mat J, H, D;  /* XH: gn->J is not used?, D matrix added for ||D*x||_1 */
12   Vec x_old, x_work, r_work, diag, y, y_work;  /* XH: Dx_work added, Dx_work=D*x whose dimension maybe different from x and r_work*/
13   Tao subsolver, parent;
14   PetscReal lambda, epsilon; /* lambda is regularizer weight for both L2-norm Gaussian-Newton and L1-norm, ||x||_1 is approximated with sum(sqrt(x.^2+epsilon^2)-epsilon)*/
15 } TAO_BRGN;
16 
17 #endif /* if !defined(__TAO_BRGN_H) */
18