Lines Matching refs:fx
10 static PetscErrorCode Tao_mcstep(TaoLineSearch ls, PetscReal *stx, PetscReal *fx, PetscReal *dx, PetscReal *sty, PetscReal *fy, PetscReal *dy, PetscReal *stp, PetscReal *fp, PetscReal *dp);
28 PetscCall(PetscViewerASCIIPrintf(ls->viewer, "stx: %g, fx: %g, dgx: %g\n", (double)mt->stx, (double)mt->fx, (double)mt->dgx));
38 PetscReal dgx, dgy, dg, dg2, fx, fy, stx, sty, dgtest;
100 stx, fx, dgx - the step, function, and derivative at the best step
106 fx = finit;
161 mt->fx = fx;
227 if (stage1 && *f <= fx && *f > ftest1) {
229 fxm = fx - stx * dgtest; /* and derivatives */
239 fx = fxm + stx * dgtest; /* Reset the function and */
245 PetscCall(Tao_mcstep(ls, &stx, &fx, &dgx, &sty, &fy, &dgy, &ls->step, f, &dg));
320 subroutine mcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,bracket,
325 stx, fx, and dx are variables which specify the step,
363 static PetscErrorCode Tao_mcstep(TaoLineSearch ls, PetscReal *stx, PetscReal *fx, PetscReal *dx, PetscReal *sty, PetscReal *fy, PetscReal *dy, PetscReal *stp, PetscReal *fp, PetscReal *dp)
379 if (*fp > *fx) {
387 theta = 3 * (*fx - *fp) / (*stp - *stx) + *dx + *dp;
397 stpq = *stx + ((*dx / ((*fx - *fp) / (*stp - *stx) + *dx)) * 0.5) * (*stp - *stx);
410 theta = 3 * (*fx - *fp) / (*stp - *stx) + *dx + *dp;
436 theta = 3 * (*fx - *fp) / (*stp - *stx) + *dx + *dp;
488 if (*fp > *fx) {
495 *fy = *fx;
499 *fx = *fp;