Lines Matching refs:dg
38 PetscReal dgx, dgy, dg, dg2, fx, fy, stx, sty, dgtest;
103 step, f, dg - the step, function, and derivative at the current step */
144 PetscCall(TaoLineSearchComputeObjectiveAndGTS(ls, mt->work, f, &dg));
150 PetscCall(VecDot(g, x, &dg));
152 dg = (dg2 - dg) / ls->step;
154 PetscCall(VecDot(g, s, &dg));
170 if (PetscIsInfOrNanReal(*f) || PetscIsInfOrNanReal(dg)) {
175 dg = PETSC_INFINITY;
182 if ((*f - ftest1 <= PETSC_SMALL * PetscAbsReal(finit)) && (PetscAbsReal(dg) + ls->gtol * dginit <= 0.0)) {
201 if (ls->step == ls->stepmax && *f <= ftest1 && dg <= dgtest) {
206 if (ls->step == ls->stepmin && *f >= ftest1 && dg >= dgtest) {
219 if (stage1 && *f <= ftest1 && dg >= dginit * PetscMin(ls->ftol, ls->gtol)) stage1 = 0;
231 dgm = dg - dgtest;
245 PetscCall(Tao_mcstep(ls, &stx, &fx, &dgx, &sty, &fy, &dgy, &ls->step, f, &dg));