| /petsc/src/tao/bound/impls/bncg/ |
| H A D | bncg.c | 413 PetscErrorCode TaoBNCGCheckDynamicRestart(Tao tao, PetscReal stepsize, PetscReal gd, PetscReal gd_o… in TaoBNCGCheckDynamicRestart() argument 423 quadinterp = 2.0 * (cg->f - fold) / (stepsize * (gd + gd_old)); in TaoBNCGCheckDynamicRestart() 440 PetscReal tmp = 1.0, ynorm, ynorm2 = 1.0, snorm = 1.0, dk_yk = 1.0, gd; in TaoBNCGStepDirectionUpdate() local 592 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gd)); in TaoBNCGStepDirectionUpdate() 595 beta = tau_k * gnorm2 / (gd - gd_old); in TaoBNCGStepDirectionUpdate() 613 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gd)); in TaoBNCGStepDirectionUpdate() 618 …if (cg->use_dynamic_restart) PetscCall(TaoBNCGCheckDynamicRestart(tao, step, gd, gd_old, &cg->dyna… in TaoBNCGStepDirectionUpdate() 626 tmp = gd / dk_yk; in TaoBNCGStepDirectionUpdate() 627 beta = tau_k * (gkp1_yk / dk_yk - ynorm2 * gd / (dk_yk * dk_yk)); in TaoBNCGStepDirectionUpdate() 629 …x(beta, cg->hz_eta * tau_k * gd_old / (dnorm * dnorm)), cg->dk_eta * tau_k * gd / (dnorm * dnorm)); in TaoBNCGStepDirectionUpdate() [all …]
|
| /petsc/src/snes/tests/ |
| H A D | ex20.c | 452 PetscScalar ***x, bn, bs, be, bw, bu, bd, gn, gs, ge, gw, gu, gd; in FormJacobian() local 523 gd = coef * bd * (t0 - td); in FormJacobian() 535 v[0] = -hxhydhz * (dd - gd); in FormJacobian() 547 … = hzhxdhy * (ds + dn + gs - gn) + hyhzdhx * (dw + de + gw - ge) + hxhydhz * (dd + du + gd - gu); in FormJacobian() 628 gd = coef * bd * (td - t0); in FormJacobian() 633 v[0] = -hxhydhz * (dd - gd); in FormJacobian() 637 … v[1] = hzhxdhy * (dn - gn) + hyhzdhx * (dw + de + gw - ge) + hxhydhz * (dd + du + gd - gu); in FormJacobian() 659 gd = coef * bd * (td - t0); in FormJacobian() 664 v[0] = -hxhydhz * (dd - gd); in FormJacobian() 668 v[1] = hzhxdhy * (dn - gn) + hyhzdhx * (dw + de + gw - ge) + hxhydhz * (dd + gd); in FormJacobian() [all …]
|
| /petsc/src/tao/unconstrained/impls/cg/ |
| H A D | taocg.c | 17 PetscReal step = 1.0, f, gnorm, gnorm2, delta, gd, ginner, beta; in TaoSolve_CG() local 64 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gd)); in TaoSolve_CG() 65 if ((gd >= 0) || PetscIsInfOrNanReal(gd)) { in TaoSolve_CG() 168 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gd)); in TaoSolve_CG() 170 beta = (gnorm2 - ginner) / (gd - gd_old); in TaoSolve_CG() 174 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gd)); in TaoSolve_CG() 176 beta = gnorm2 / (gd - gd_old); in TaoSolve_CG()
|
| /petsc/src/vec/vec/tests/ |
| H A D | ex48.c | 278 int gd = 0; in CapsuleReadAndCompareAttributes() local 286 PetscCall(hasGroupOrDataset(v, parent, &gd)); in CapsuleReadAndCompareAttributes() 296 …PetscCheck(gd || !hasAttr, comm, PETSC_ERR_PLIB, "Attribute %s/%s/%s exists while its parent %s/%s… in CapsuleReadAndCompareAttributes() 320 if (verbose && gd) PetscCall(PetscPrintf(comm, "\n")); in CapsuleReadAndCompareAttributes() 584 int gd; in testAttributesPushedPath() local 610 PetscCall(hasGroupOrDataset(viewer, datasets[s], &gd)); in testAttributesPushedPath() 611 if (!gd) continue; in testAttributesPushedPath() 634 PetscCall(hasGroupOrDataset(viewer, datasets[s], &gd)); in testAttributesPushedPath() 635 …if (verbose) PetscCall(PetscPrintf(comm, "%s/%s %s\n", group, datasets[s], gd ? (gd == 1 ? "is g… in testAttributesPushedPath() 639 flg = (PetscBool)!!gd; in testAttributesPushedPath()
|
| /petsc/src/tao/unconstrained/impls/bmrm/ |
| H A D | bmrm.c | 12 PetscReal gd, max, ak, bk, akold, bkold, lamnew, alpha, kktlam = 0.0, lam_ext; in solve() local 94 gd = 0.0; in solve() 97 gd += d[i] * g[i]; in solve() 134 if (bk > EPS * ak && gd < 0.0) lamnew = -gd / bk; in solve()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex76.c | 227 const PetscInt gd = (PetscInt)PetscRealPart(constants[G_DIR]); in f0_conduct_quadratic_v() local 231 f0[gd] -= rho / PetscSqr(F); in f0_conduct_quadratic_v() 573 const PetscInt gd = (PetscInt)PetscRealPart(constants[G_DIR]); in f0_conduct_pipe_v() local 575 f0[gd] -= rho / PetscSqr(F); in f0_conduct_pipe_v() 690 const PetscInt gd = (PetscInt)PetscRealPart(constants[G_DIR]); in f0_conduct_pipe_wiggly_v() local 693 f0[gd] -= rho / PetscSqr(F); in f0_conduct_pipe_wiggly_v()
|
| /petsc/doc/manual/ |
| H A D | tao.md | 1867 `-tao_bncg_type <gd,fr,pr,prp,hs,dy,hz,dk,kd,ssml_bfgs,ssml_dfp,ssml_brdn>`,
|