| /petsc/src/ts/tutorials/phasefield/ |
| H A D | biharmonic.c | 59 PetscReal theta, theta_c; member 93 ctx.theta = .001; in main() 95 PetscCall(PetscOptionsGetReal(NULL, NULL, "-theta", &ctx.theta, NULL)); in main() 205 …PetscReal tol = ctx->tol, theta = ctx->theta, theta_c = ctx->theta_c, a, b; /* a and b are used… in FormFunction() local 260 …if (PetscRealPart(x[i]) < -1.0 + 2.0 * tol) f[i] += (.25 * theta / (tol - tol * tol)) * (x[i - 1] … in FormFunction() 261 …else if (PetscRealPart(x[i]) > 1.0 - 2.0 * tol) f[i] += (.25 * theta / (tol - tol * tol)) * (x[i -… in FormFunction() 262 …[i] += 2.0 * theta * x[i] / ((1.0 - x[i] * x[i]) * (1.0 - x[i] * x[i])) * .25 * (x[i + 1] - x[i - … in FormFunction() 264 a = 2.0 * theta * (1.0 - 2.0 * tol) / (16.0 * tol * tol * (1.0 - tol) * (1.0 - tol)); in FormFunction() 265 b = theta / (4.0 * tol * (1.0 - tol)) - a * (1.0 - 2.0 * tol); in FormFunction() 268 …[i] += 2.0 * theta * x[i] / ((1.0 - x[i] * x[i]) * (1.0 - x[i] * x[i])) * .25 * (x[i + 1] - x[i - … in FormFunction() [all …]
|
| H A D | biharmonic3.c | 39 PetscReal theta; member 72 ctx.theta = .001; in main() 74 PetscCall(PetscOptionsGetReal(NULL, NULL, "-theta", &ctx.theta, NULL)); in main() 238 …if (x[i].u < -1.0 + 2.0 * ctx->tol) f[i].w += .5 * ctx->theta * (-PetscLogScalar(ctx->tol) + Petsc… in FormFunction() 239 …else if (x[i].u > 1.0 - 2.0 * ctx->tol) f[i].w += .5 * ctx->theta * (-PetscLogScalar((1.0 + x[i].u… in FormFunction() 240 …else f[i].w += .5 * ctx->theta * (-PetscLogScalar((1.0 + x[i].u) / 2.0) + PetscLogScalar((1.0 - x[… in FormFunction() 253 … (x[i + 1].u - x[i - 1].u) * (x[i + 1].u - x[i - 1].u) * .25 * sx - (ctx->theta - ctx->theta_c * (… in FormFunction()
|
| H A D | biharmonic2.c | 39 PetscReal theta; member 74 ctx.theta = .001; in main() 76 PetscCall(PetscOptionsGetReal(NULL, NULL, "-theta", &ctx.theta, NULL)); in main() 238 …if (PetscRealPart(x[i].u) < -1.0 + 2.0 * ctx->tol) f[i].w += .5 * ctx->theta * (-PetscLogReal(ctx-… in FormFunction() 239 …else if (PetscRealPart(x[i].u) > 1.0 - 2.0 * ctx->tol) f[i].w += .5 * ctx->theta * (-PetscLogScala… in FormFunction() 240 …else f[i].w += .5 * ctx->theta * (-PetscLogScalar((1.0 + x[i].u) / 2.0) + PetscLogScalar((1.0 - x[… in FormFunction()
|
| /petsc/src/ksp/ksp/tests/output/ |
| H A D | ex5_mat_type-lmvmbfgs.out | 22 Rescale convex factor: theta=0.125 39 Rescale convex factor: theta=0.125 56 Rescale convex factor: theta=0.125 73 Rescale convex factor: theta=0.125 90 Rescale convex factor: theta=0.125 107 Rescale convex factor: theta=0.125 124 Rescale convex factor: theta=0.125 141 Rescale convex factor: theta=0.125 158 Rescale convex factor: theta=0.125 175 Rescale convex factor: theta=0.125 [all …]
|
| H A D | ex5_mat_type-lmvmsymbroyden.out | 23 Rescale convex factor: theta=0.125 41 Rescale convex factor: theta=0.125 59 Rescale convex factor: theta=0.125 77 Rescale convex factor: theta=0.125 95 Rescale convex factor: theta=0.125 113 Rescale convex factor: theta=0.125 131 Rescale convex factor: theta=0.125 149 Rescale convex factor: theta=0.125 167 Rescale convex factor: theta=0.125 185 Rescale convex factor: theta=0.125 [all …]
|
| H A D | ex5_mat_type-lmvmdfp.out | 22 Rescale convex factor: theta=0.125 39 Rescale convex factor: theta=0.125 56 Rescale convex factor: theta=0.125 73 Rescale convex factor: theta=0.125 90 Rescale convex factor: theta=0.125 107 Rescale convex factor: theta=0.125 124 Rescale convex factor: theta=0.125 141 Rescale convex factor: theta=0.125 158 Rescale convex factor: theta=0.125 175 Rescale convex factor: theta=0.125 [all …]
|
| H A D | ex5_mat_type-lmvmdiagbroyden.out | 22 Rescale convex factor: theta=0. 39 Rescale convex factor: theta=0. 56 Rescale convex factor: theta=0. 73 Rescale convex factor: theta=0. 90 Rescale convex factor: theta=0. 107 Rescale convex factor: theta=0. 124 Rescale convex factor: theta=0. 141 Rescale convex factor: theta=0. 158 Rescale convex factor: theta=0. 175 Rescale convex factor: theta=0. [all …]
|
| H A D | ex5_mat_type-lmvmsymbadbroyden.out | 23 Rescale convex factor: theta=0.125 41 Rescale convex factor: theta=0.125 59 Rescale convex factor: theta=0.125 77 Rescale convex factor: theta=0.125 95 Rescale convex factor: theta=0.125 113 Rescale convex factor: theta=0.125 131 Rescale convex factor: theta=0.125 149 Rescale convex factor: theta=0.125 167 Rescale convex factor: theta=0.125 185 Rescale convex factor: theta=0.125 [all …]
|
| /petsc/src/tao/linesearch/impls/morethuente/ |
| H A D | morethuente.c | 366 PetscReal gamma1, p, q, r, s, sgnd, stpc, stpf, stpq, theta; in Tao_mcstep() local 387 theta = 3 * (*fx - *fp) / (*stp - *stx) + *dx + *dp; in Tao_mcstep() 388 s = PetscMax(PetscAbsReal(theta), PetscAbsReal(*dx)); in Tao_mcstep() 390 gamma1 = s * PetscSqrtScalar(PetscPowScalar(theta / s, 2.0) - (*dx / s) * (*dp / s)); in Tao_mcstep() 393 p = (gamma1 - *dx) + theta; in Tao_mcstep() 410 theta = 3 * (*fx - *fp) / (*stp - *stx) + *dx + *dp; in Tao_mcstep() 411 s = PetscMax(PetscAbsReal(theta), PetscAbsReal(*dx)); in Tao_mcstep() 413 gamma1 = s * PetscSqrtScalar(PetscPowScalar(theta / s, 2.0) - (*dx / s) * (*dp / s)); in Tao_mcstep() 415 p = (gamma1 - *dp) + theta; in Tao_mcstep() 436 theta = 3 * (*fx - *fp) / (*stp - *stx) + *dx + *dp; in Tao_mcstep() [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex54f.F90 | 37 PetscReal::theta, eps, h, x, y, xsj 40 common/ex54_theta/theta 59 theta = 90.0 61 …PetscCallA(PetscOptionsGetReal(PETSC_NULL_OPTIONS, PETSC_NULL_CHARACTER, '-theta', theta, flg, ier… 62 theta = theta/57.2957795 235 write (1, 2002) eps, theta*57.2957795 412 PetscReal x, y, theta 413 common/ex54_theta/theta 414 ex54_psi = theta 415 if (theta < 0.) then ! circular
|
| /petsc/src/ksp/ksp/utils/lmvm/rescale/ |
| H A D | symbrdnrescale.c | 65 …nRescale ldb, Vec D, Vec s, Vec y, Vec V, Vec W, Vec BFGS, Vec DFP, PetscReal theta, PetscReal yts) in DiagonalUpdate() argument 82 if (theta != 1.0) { in DiagonalUpdate() 93 if (theta != 0.0) { in DiagonalUpdate() 111 if (theta == 0.0) { in DiagonalUpdate() 113 } else if (theta == 1.0) { in DiagonalUpdate() 117 PetscCall(VecAXPBYPCZ(D, 1.0 - theta, theta / yts, 1.0, BFGS, DFP)); in DiagonalUpdate() 145 …, ldb->invDnew, s_last, y_last, ldb->V, ldb->W, ldb->BFGS, ldb->DFP, ldb->theta, PetscRealPart(yts… in SymBroydenRescaleUpdateDiagonal() 151 …>invDnew, y_last, s_last, ldb->V, ldb->W, ldb->DFP, ldb->BFGS, 1.0 - ldb->theta, PetscRealPart(yts… in SymBroydenRescaleUpdateDiagonal() 374 mctx->theta = bctx->theta; in SymBroydenRescaleCopy() 416 …o between BFGS and DFP components of the diagonal J0 scaling", "", ldb->theta, &ldb->theta, NULL)); in SymBroydenRescaleSetFromOptions() [all …]
|
| /petsc/src/ksp/ksp/impls/bcgs/qmrcgs/ |
| H A D | qmrcgs.c | 20 PetscReal dp = 0.0, final, tau, tau2, theta, theta2, c, F, NV, vv; in KSPSolve_QMRCGS() local 78 theta = 1.0; in KSPSolve_QMRCGS() 117 cf = eta * theta * theta / alpha; in KSPSolve_QMRCGS() 169 theta = dp / tau2; in KSPSolve_QMRCGS() 170 c = 1.0 / PetscSqrtReal(1.0 + theta * theta); in KSPSolve_QMRCGS()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex74fcomd.h | 1 integer probnum, ihod, mx, my, neq, ientro, gorder parameter(neq = 3) double precision theta, pi, t… 23 zero, theta, dx, xl0, damfac, kappa0, kappaa, kappab, visc0,
|
| H A D | ex76.c | 36 PetscReal theta; /* Angle of pipe wall to x-axis */ member 311 PetscCall(PetscBagRegisterReal(bag, &p->theta, 0.0, "theta", "Angle of pipe wall to x-axis")); in SetupParameters() 325 PetscReal theta; in CreateMesh() local 335 theta = param->theta; in CreateMesh() 340 coords[i + 0] = PetscCosReal(theta) * x - PetscSinReal(theta) * y; in CreateMesh() 341 coords[i + 1] = PetscSinReal(theta) * x + PetscCosReal(theta) * y; in CreateMesh() 398 constants[2] = param->theta; in SetupProblem() 461 PetscCall(DMPlexCreateBasisRotation(cdm, param->theta, 0.0, 0.0)); in SetupDiscretization()
|
| /petsc/src/ksp/ksp/tutorials/amrex/ |
| H A D | MyEB.H | 40 amrex::Real theta = std::atan2(posy, posx); in operator() local 41 return m_sign*(r - m_r - m_dr * std::cos(m_npetals*theta)); in operator()
|
| /petsc/src/dm/impls/network/tests/ |
| H A D | ex2.c | 49 PetscReal theta; in StarGraphSetCoordinates() local 67 theta = 2 * PETSC_PI / (NVert - 1); in StarGraphSetCoordinates() 76 coord[off] = PetscCosReal(theta * (vglobal - 1)); in StarGraphSetCoordinates() 77 coord[off + 1] = PetscSinReal(theta * (vglobal - 1)); in StarGraphSetCoordinates()
|
| /petsc/src/ksp/ksp/impls/tcqmr/ |
| H A D | tcqmr.c | 13 PetscScalar theta, ep, cl1, sl1, cl, sl, sprod, tau_n1, f; in KSPSolve_TCQMR() local 39 theta = 0.0; in KSPSolve_TCQMR() 103 theta = sl1 * beta; in KSPSolve_TCQMR() 124 PetscCall(VecAXPY(pvec, -theta, pvec2)); in KSPSolve_TCQMR()
|
| /petsc/doc/overview/ |
| H A D | integrator_table.md | 40 * - theta* 41 - theta-method
|
| /petsc/src/tao/unconstrained/impls/ntr/ |
| H A D | ntr.c | 360 tau_1 = tr->theta * beta / (tr->theta * beta - (1.0 - tr->theta) * prered + actred); in TaoSolve_NTR() 361 tau_2 = tr->theta * beta / (tr->theta * beta + (1.0 + tr->theta) * prered - actred); in TaoSolve_NTR() 481 PetscCall(PetscOptionsReal("-tao_ntr_theta", "", "", tr->theta, &tr->theta, NULL)); in TaoSetFromOptions_NTR() 575 tr->theta = 0.05; in TaoCreate_NTR()
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | ex19.c | 247 PetscReal xold, yold, zold, rold, phi, theta; in main() local 255 theta = PetscAtan2Real(PetscSqrtReal(xold * xold + yold * yold), zold); in main() 280 …ordData[faceCPStartRow + (3 * ii) + 0] += -0.05 * deltaR * PetscCosReal(phi) * PetscSinReal(theta); in main() 281 …ordData[faceCPStartRow + (3 * ii) + 1] += -0.05 * deltaR * PetscSinReal(phi) * PetscSinReal(theta); in main() 282 cpCoordData[faceCPStartRow + (3 * ii) + 2] += -0.05 * deltaR * PetscCosReal(theta); in main()
|
| /petsc/src/snes/linesearch/impls/nleqerr/ |
| H A D | linesearchnleqerr.c | 42 PetscReal theta, mudash, lambdadash; in SNESLineSearchApply_NLEQERR() local 183 theta = wnorm / ynorm; in SNESLineSearchApply_NLEQERR() 191 if (theta >= 1.0) { in SNESLineSearchApply_NLEQERR() 195 …CIIPrintf(monitor, " Line search: monotonicity check failed, ratio: %14.12e\n", (double)theta)); in SNESLineSearchApply_NLEQERR()
|
| /petsc/src/snes/tests/output/ |
| H A D | ex1_2c_snes_tr_qn-different.out | 46 Rescale convex factor: theta=0.125 64 Rescale convex factor: theta=0.125
|
| /petsc/src/ts/tutorials/power_grid/stability_9bus/ |
| H A D | ex9busopt.c | 162 PetscScalar theta, Vd, Vq, SE; in SetInitialGuess() local 191 theta = PETSC_PI / 2.0 - delta; in SetInitialGuess() 193 Id = IGr * PetscCosScalar(theta) - IGi * PetscSinScalar(theta); /* d-axis stator current */ in SetInitialGuess() 194 Iq = IGr * PetscSinScalar(theta) + IGi * PetscCosScalar(theta); /* q-axis stator current */ in SetInitialGuess() 196 Vd = Vr * PetscCosScalar(theta) - Vi * PetscSinScalar(theta); in SetInitialGuess() 197 Vq = Vr * PetscSinScalar(theta) + Vi * PetscCosScalar(theta); in SetInitialGuess() 250 PetscScalar theta, Vd, Vq, SE; in InitialGuess() local 279 theta = PETSC_PI / 2.0 - delta; in InitialGuess() 281 Id = IGr * PetscCosScalar(theta) - IGi * PetscSinScalar(theta); /* d-axis stator current */ in InitialGuess() 282 Iq = IGr * PetscSinScalar(theta) + IGi * PetscCosScalar(theta); /* q-axis stator current */ in InitialGuess() [all …]
|
| H A D | ex9busoptfd.c | 125 PetscScalar theta, Vd, Vq, SE; in SetInitialGuess() local 154 theta = PETSC_PI / 2.0 - delta; in SetInitialGuess() 156 Id = IGr * PetscCosScalar(theta) - IGi * PetscSinScalar(theta); /* d-axis stator current */ in SetInitialGuess() 157 Iq = IGr * PetscSinScalar(theta) + IGi * PetscCosScalar(theta); /* q-axis stator current */ in SetInitialGuess() 159 Vd = Vr * PetscCosScalar(theta) - Vi * PetscSinScalar(theta); in SetInitialGuess() 160 Vq = Vr * PetscSinScalar(theta) + Vi * PetscCosScalar(theta); in SetInitialGuess() 802 PetscReal h, theta; in MonitorUpdateQ() local 806 theta = 0.5; in MonitorUpdateQ() 813 PetscCall(VecAXPY(ctx->vec_q, h * theta, C)); in MonitorUpdateQ() 814 PetscCall(CostIntegrand(ts, time + h * theta, Y[0], C, ctx)); in MonitorUpdateQ() [all …]
|
| /petsc/src/dm/tests/ |
| H A D | ex36.c | 15 PetscReal r, theta; in CCmplxPow() local 17 theta = PetscAtan2Real(a.imag, a.real); in CCmplxPow() 18 b.real = PetscPowReal(r, n) * PetscCosReal(n * theta); in CCmplxPow() 19 b.imag = PetscPowReal(r, n) * PetscSinReal(n * theta); in CCmplxPow() 32 PetscReal r, theta; in CCmplxSqrt() local 34 theta = PetscAtan2Real(a.imag, a.real); in CCmplxSqrt() 35 b.real = PetscSqrtReal(r) * PetscCosReal(0.5 * theta); in CCmplxSqrt() 36 b.imag = PetscSqrtReal(r) * PetscSinReal(0.5 * theta); in CCmplxSqrt()
|