Date: 2016-07-24T17:15:23+00:00

Actual source code: ntr.h
petsc-3.7.3 2016-07-24
Report Typos and Errors

      1: /*
      2:   Context for a Newton trust region method (unconstrained minimization)
      3: */

      5: #ifndef __TAO_NTR_H
      7: #include <petsc/private/taoimpl.h>

      9: typedef struct {
     10:   Mat M;

     12:   Vec D;
     13:   Vec W;

     15:   Vec Diag;
     16:   PetscReal radius;
     17:   /*  Parameters when updating the trust-region radius based on reduction */
     18:   PetscReal eta1;          /*  used to compute trust-region radius */
     19:   PetscReal eta2;          /*  used to compute trust-region radius */
     20:   PetscReal eta3;          /*  used to compute trust-region radius */
     21:   PetscReal eta4;          /*  used to compute trust-region radius */

     23:   PetscReal alpha1;     /*  factor used for trust-region update */
     24:   PetscReal alpha2;     /*  factor used for trust-region update */
     25:   PetscReal alpha3;     /*  factor used for trust-region update */
     26:   PetscReal alpha4;     /*  factor used for trust-region update */
     27:   PetscReal alpha5;     /*  factor used for trust-region update */

     29:   /*
     30:      kappa = ared / pred
     31:      if   kappa < eta1          (very bad step)
     32:        radius = alpha1 * min(norm(d), radius)
     33:      elif kappa < eta2          (bad step)
     34:        radius = alpha2 * min(norm(d), radius)
     35:      elif kappa < eta3          (okay step)
     36:        radius = alpha3 * radius;
     37:      elif kappa < eta4          (good step)
     38:        radius = max(alpha4 * norm(d), radius)
     39:      else                       (very good step)
     40:        radius = max(alpha5 * norm(d), radius)
     41:      fi
     42:   */
     43:   /*  Parameters when updating the trust-region radius based on interpolation */
     44:   PetscReal mu1;                /*  used for model agreement in radius update */
     45:   PetscReal mu2;                /*  used for model agreement in radius update */

     47:   PetscReal gamma1;     /*  factor used for radius update */
     48:   PetscReal gamma2;     /*  factor used for radius update */
     49:   PetscReal gamma3;     /*  factor used for radius update */
     50:   PetscReal gamma4;     /*  factor used for radius update */

     52:   PetscReal theta;              /*  factor used for radius update */

     54:   /*
     55:      kappa = ared / pred
     56:      if   kappa >= 1.0 - mu1    (very good step)
     57:        choose tau in [gamma3, gamma4]
     58:        radius = max(tau * norm(d), radius)
     59:      elif kappa >= 1.0 - mu2    (good step)
     60:        choose tau in [gamma2, gamma3]
     61:        if (tau >= 1.0)
     62:          radius = max(tau * norm(d), radius)
     63:        else
     64:          radius = tau * min(norm(d), radius)
     65:        fi
     66:      else                       (bad step)
     67:        choose tau in [gamma1, 1.0]
     68:        radius = tau * min(norm(d), radius)
     69:      fi
     70:   */

     72:   /*  Parameters when initializing trust-region radius based on interpolation */
     73:   PetscReal mu1_i;         /*  used for model agreement in interpolation */
     74:   PetscReal mu2_i;         /*  used for model agreement in interpolation */

     76:   PetscReal gamma1_i;      /*  factor used for interpolation */
     77:   PetscReal gamma2_i;      /*  factor used for interpolation */
     78:   PetscReal gamma3_i;      /*  factor used for interpolation */
     79:   PetscReal gamma4_i;      /*  factor used for interpolation */

     81:   PetscReal theta_i;       /*  factor used for interpolation */

     83:   PetscReal min_radius; /*  lower bound on initial radius value */
     84:   PetscReal max_radius; /*  upper bound on trust region radius */
     85:   PetscReal epsilon;    /*  tolerance used when computing actred/prered */

     87:   PetscInt ksp_type;         /*  KSP method for the code */
     88:   PetscInt pc_type;          /*  Preconditioner for the code */
     89:   PetscInt bfgs_scale_type;  /*  Scaling matrix for the bfgs preconditioner */
     90:   PetscInt init_type;   /*  Trust-region initialization method */
     91:   PetscInt update_type; /*  Trust-region update method */
     92: } TAO_NTR;

     94: #endif /* ifndef __TAO_NTR_H */