| /petsc/src/tao/linesearch/impls/owarmijo/ |
| H A D | owarmijo.c | 11 static PetscErrorCode ProjWork_OWLQN(Vec w, Vec x, Vec gv, PetscReal *gdx) in ProjWork_OWLQN() argument 22 *gdx = 0.0; in ProjWork_OWLQN() 29 *gdx = *gdx + gptr[i] * (wptr[i] - xptr[i]); in ProjWork_OWLQN() 116 PetscReal fact, ref, gdx; in TaoLineSearchApply_OWArmijo() local 217 PetscCallMPI(MPIU_Allreduce(&partgdx, &gdx, 1, MPIU_REAL, MPIU_SUM, comm)); in TaoLineSearchApply_OWArmijo() 220 if (PetscIsInfOrNanReal(gdx)) { in TaoLineSearchApply_OWArmijo() 221 … PetscCall(PetscInfo(ls, "Initial Line Search step * g is infinity or NaN (%g)\n", (double)gdx)); in TaoLineSearchApply_OWArmijo() 225 if (gdx >= 0.0) { in TaoLineSearchApply_OWArmijo() 226 …scCall(PetscInfo(ls, "Initial Line Search step is not descent direction (g's=%g)\n", (double)gdx)); in TaoLineSearchApply_OWArmijo() 246 if (!armP->nondescending && *f <= ref + armP->sigma * gdx) break; in TaoLineSearchApply_OWArmijo()
|
| H A D | owarmijo.h | 85 static PetscErrorCode ProjWork_OWLQN(Vec w, Vec x, Vec gv, PetscReal *gdx);
|
| /petsc/src/tao/linesearch/impls/armijo/ |
| H A D | armijo.c | 92 PetscReal fact, ref, gdx; in TaoLineSearchApply_Armijo() local 173 PetscCall(VecDot(g, s, &gdx)); in TaoLineSearchApply_Armijo() 175 if (PetscIsInfOrNanReal(gdx)) { in TaoLineSearchApply_Armijo() 176 PetscCall(PetscInfo(ls, "Initial Line Search step * g is infinity or NaN (%g)\n", (double)gdx)); in TaoLineSearchApply_Armijo() 180 if (gdx >= 0.0) { in TaoLineSearchApply_Armijo() 181 …scCall(PetscInfo(ls, "Initial Line Search step is not descent direction (g's=%g)\n", (double)gdx)); in TaoLineSearchApply_Armijo() 189 fact = armP->sigma * gdx; in TaoLineSearchApply_Armijo() 204 PetscCall(TaoLineSearchComputeObjectiveAndGTS(ls, armP->work, f, &gdx)); in TaoLineSearchApply_Armijo()
|
| /petsc/src/tao/linesearch/impls/gpcglinesearch/ |
| H A D | gpcglinesearch.c | 32 PetscReal d1, finit, actred, prered, rho, gdx; in TaoLineSearchApply_GPCG() local 67 PetscCall(VecDot(g, s, &gdx)); in TaoLineSearchApply_GPCG() 68 if (gdx > 0) { in TaoLineSearchApply_GPCG() 69 …ls, "Line search error: search direction is not descent direction. dot(g,s) = %g\n", (double)gdx)); in TaoLineSearchApply_GPCG() 110 PetscCall(TaoLineSearchComputeObjectiveAndGTS(ls, neP->W2, f, &gdx)); in TaoLineSearchApply_GPCG()
|
| /petsc/src/tao/unconstrained/impls/ntl/ |
| H A D | ntl.c | 39 PetscReal f, fold, gdx, gnorm; in TaoSolve_NTL() local 358 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gdx)); in TaoSolve_NTL() 368 tau_1 = tl->theta * gdx / (tl->theta * gdx - (1.0 - tl->theta) * prered + actred); in TaoSolve_NTL() 369 tau_2 = tl->theta * gdx / (tl->theta * gdx + (1.0 + tl->theta) * prered - actred); in TaoSolve_NTL() 418 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoSolve_NTL() 419 if ((gdx >= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_NTL() 435 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoSolve_NTL() 436 if ((gdx >= 0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_NTL() 499 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoSolve_NTL() 500 if ((gdx <= 0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_NTL()
|
| /petsc/src/tao/unconstrained/impls/nls/ |
| H A D | nls.c | 49 PetscReal f, fold, gdx, gnorm, pert; in TaoSolve_NLS() local 344 PetscCall(VecDot(nlsP->D, tao->gradient, &gdx)); in TaoSolve_NLS() 345 if ((gdx >= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_NLS() 373 PetscCall(VecDot(tao->gradient, nlsP->D, &gdx)); in TaoSolve_NLS() 374 if ((gdx >= 0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_NLS() 473 PetscCall(VecDot(tao->gradient, nlsP->D, &gdx)); in TaoSolve_NLS() 474 if ((gdx <= 0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_NLS() 631 … tau_1 = nlsP->theta * gdx / (nlsP->theta * gdx - (1.0 - nlsP->theta) * prered + actred); in TaoSolve_NLS() 632 … tau_2 = nlsP->theta * gdx / (nlsP->theta * gdx + (1.0 + nlsP->theta) * prered - actred); in TaoSolve_NLS()
|
| /petsc/src/tao/bound/impls/bnk/ |
| H A D | bnk.c | 560 PetscReal gdx, e_min; in TaoBNKSafeguardStep() local 566 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoBNKSafeguardStep() 567 if ((gdx >= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoBNKSafeguardStep() 597 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gdx)); in TaoBNKSafeguardStep() 598 if ((gdx <= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoBNKSafeguardStep() 660 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoBNKSafeguardStep() 661 if (gdx >= 0 || PetscIsInfOrNanReal(gdx)) { in TaoBNKSafeguardStep() 694 PetscReal e_min, gdx; in TaoBNKPerformLineSearch() local 737 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gdx)); in TaoBNKPerformLineSearch() 738 if ((gdx <= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoBNKPerformLineSearch() [all …]
|
| /petsc/src/tao/unconstrained/impls/lmvm/ |
| H A D | lmvm.c | 10 PetscReal f, fold, gdx, gnorm; in TaoSolve_LMVM() local 56 PetscCall(VecDotRealPart(lmP->D, tao->gradient, &gdx)); in TaoSolve_LMVM() 57 if ((gdx <= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_LMVM()
|
| /petsc/src/tao/quadratic/impls/gpcg/ |
| H A D | gpcg.c | 111 PetscReal actred, f, f_new, gnorm, gdx, stepsize, xtb; in TaoSolve_GPCG() local 187 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoSolve_GPCG() 223 PetscReal f_new, gdx, stepsize; in GPCGGradProjections() local 236 PetscCall(VecDot(DX, G, &gdx)); in GPCGGradProjections() 244 gtg = -gdx; in GPCGGradProjections()
|
| /petsc/src/tao/unconstrained/impls/owlqn/ |
| H A D | owlqn.c | 55 PetscReal f, fold, gdx, gnorm; in TaoSolve_OWLQN() local 100 PetscCall(VecDot(lmP->D, lmP->GV, &gdx)); in TaoSolve_OWLQN() 101 if ((gdx <= 0.0) || PetscIsInfOrNanReal(gdx)) { in TaoSolve_OWLQN()
|
| /petsc/src/tao/bound/impls/blmvm/ |
| H A D | blmvm.c | 9 PetscReal f, fold, gdx, gnorm, gnorm2; in TaoSolve_BLMVM() local 59 PetscCall(VecDot(blmP->unprojected_gradient, tao->gradient, &gdx)); in TaoSolve_BLMVM() 60 if (gdx <= 0) { in TaoSolve_BLMVM()
|
| /petsc/src/snes/impls/qn/ |
| H A D | qn.c | 125 PetscScalar gdx; in SNESSolve_QN() local 167 PetscCall(VecDot(F, Y, &gdx)); in SNESSolve_QN() 168 if (PetscAbsScalar(gdx) <= 0) { in SNESSolve_QN()
|
| /petsc/src/tao/bound/impls/tron/ |
| H A D | tron.c | 73 PetscReal prered, actred, delta, f, f_new, rhok, gdx, xdiff, stepsize; in TaoSolve_TRON() local 167 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gdx)); in TaoSolve_TRON()
|
| /petsc/src/vec/vec/impls/seq/cupm/ |
| H A D | vecseqcupm_impl.hpp | 1059 const auto gdx = gridDim.x; in MDot_kernel() local 1090 if (tx < N) results[bx + tx * gdx] = shmem[tx * MDOT_WORKGROUP_SIZE]; in MDot_kernel()
|
| /petsc/doc/manual/ |
| H A D | tao.md | 3120 PetscReal gnormPrev,gdx,f,gnorm,steplength=0; 3145 PetscCall(VecDot(s,g,&gdx)); 3146 if (gdx>=0){ /* If not a descent direction, use gradient */ 3149 gdx=-gnorm*gnorm;
|