| /petsc/src/ksp/pc/impls/pbjacobi/ |
| H A D | pbjacobi.c | 11 PetscScalar *yy, x0, x1, x2, x3, x4, x5, x6; in PCApply_PBJacobi() local 23 x0 = xx[2 * i]; in PCApply_PBJacobi() 25 yy[2 * i] = diag[0] * x0 + diag[2] * x1; in PCApply_PBJacobi() 26 yy[2 * i + 1] = diag[1] * x0 + diag[3] * x1; in PCApply_PBJacobi() 32 x0 = xx[3 * i]; in PCApply_PBJacobi() 36 yy[3 * i] = diag[0] * x0 + diag[3] * x1 + diag[6] * x2; in PCApply_PBJacobi() 37 yy[3 * i + 1] = diag[1] * x0 + diag[4] * x1 + diag[7] * x2; in PCApply_PBJacobi() 38 yy[3 * i + 2] = diag[2] * x0 + diag[5] * x1 + diag[8] * x2; in PCApply_PBJacobi() 44 x0 = xx[4 * i]; in PCApply_PBJacobi() 49 yy[4 * i] = diag[0] * x0 + diag[4] * x1 + diag[8] * x2 + diag[12] * x3; in PCApply_PBJacobi() [all …]
|
| /petsc/src/ksp/pc/impls/vpbjacobi/ |
| H A D | vpbjacobi.c | 11 PetscScalar *yy, x0, x1, x2, x3, x4, x5, x6; in PCApply_VPBJacobi() local 26 x0 = xx[ncnt]; in PCApply_VPBJacobi() 28 yy[ncnt] = diag[0] * x0 + diag[2] * x1; in PCApply_VPBJacobi() 29 yy[ncnt + 1] = diag[1] * x0 + diag[3] * x1; in PCApply_VPBJacobi() 32 x0 = xx[ncnt]; in PCApply_VPBJacobi() 35 yy[ncnt] = diag[0] * x0 + diag[3] * x1 + diag[6] * x2; in PCApply_VPBJacobi() 36 yy[ncnt + 1] = diag[1] * x0 + diag[4] * x1 + diag[7] * x2; in PCApply_VPBJacobi() 37 yy[ncnt + 2] = diag[2] * x0 + diag[5] * x1 + diag[8] * x2; in PCApply_VPBJacobi() 40 x0 = xx[ncnt]; in PCApply_VPBJacobi() 44 yy[ncnt] = diag[0] * x0 + diag[4] * x1 + diag[8] * x2 + diag[12] * x3; in PCApply_VPBJacobi() [all …]
|
| /petsc/src/vec/vec/impls/seq/ |
| H A D | dvec2.c | 87 PetscScalar sum0 = 0.0, sum1 = 0.0, sum2 = 0.0, sum3, x0, x1, x2, x3; in VecMDot_Seq() local 115 x0 = x[0]; in VecMDot_Seq() 116 sum0 += x0 * PetscConj(yy0[0]); in VecMDot_Seq() 117 sum1 += x0 * PetscConj(yy1[0]); in VecMDot_Seq() 118 sum2 += x0 * PetscConj(yy2[0]); /* fall through */ in VecMDot_Seq() 128 x0 = x[0]; in VecMDot_Seq() 134 …sum0 += x0 * PetscConj(yy0[0]) + x1 * PetscConj(yy0[1]) + x2 * PetscConj(yy0[2]) + x3 * PetscConj(… in VecMDot_Seq() 136 …sum1 += x0 * PetscConj(yy1[0]) + x1 * PetscConj(yy1[1]) + x2 * PetscConj(yy1[2]) + x3 * PetscConj(… in VecMDot_Seq() 138 …sum2 += x0 * PetscConj(yy2[0]) + x1 * PetscConj(yy2[1]) + x2 * PetscConj(yy2[2]) + x3 * PetscConj(… in VecMDot_Seq() 162 x0 = x[0]; in VecMDot_Seq() [all …]
|
| /petsc/share/petsc/datafiles/meshes/ |
| H A D | pyr_tet.geo | 1 x0 = 0; x1 = 1; 20 Point(1) = {x0, y0, z0}; 22 Point(3) = {x0, y1, z0}; 24 Point(5) = {x0, y0, z1}; 26 Point(7) = {x0, y1, z1};
|
| H A D | gmsh-3d.geo | 5 x0 = 0; x1 = 1; 24 Point(1) = {x0, y0, z0}; 26 Point(3) = {x0, y1, z0}; 28 Point(5) = {x0, y0, z1}; 30 Point(7) = {x0, y1, z1};
|
| H A D | gmsh-hex.geo | 1 x0 = 0; x1 = 1; 20 Point(1) = {x0, y0, z0}; 22 Point(3) = {x0, y1, z0}; 24 Point(5) = {x0, y0, z1}; 26 Point(7) = {x0, y1, z1};
|
| /petsc/src/mat/impls/sbaij/seq/ |
| H A D | sbaijfact2.c | 222 PetscScalar *x, x0, x1, x2, x3, x4, x5, x6, *t, *tp; in MatSolve_SeqSBAIJ_7_inplace() local 249 x0 = tp[0]; in MatSolve_SeqSBAIJ_7_inplace() 259 tp[0] += v[0] * x0 + v[1] * x1 + v[2] * x2 + v[3] * x3 + v[4] * x4 + v[5] * x5 + v[6] * x6; in MatSolve_SeqSBAIJ_7_inplace() 260 … tp[1] += v[7] * x0 + v[8] * x1 + v[9] * x2 + v[10] * x3 + v[11] * x4 + v[12] * x5 + v[13] * x6; in MatSolve_SeqSBAIJ_7_inplace() 261 … tp[2] += v[14] * x0 + v[15] * x1 + v[16] * x2 + v[17] * x3 + v[18] * x4 + v[19] * x5 + v[20] * x6; in MatSolve_SeqSBAIJ_7_inplace() 262 … tp[3] += v[21] * x0 + v[22] * x1 + v[23] * x2 + v[24] * x3 + v[25] * x4 + v[26] * x5 + v[27] * x6; in MatSolve_SeqSBAIJ_7_inplace() 263 … tp[4] += v[28] * x0 + v[29] * x1 + v[30] * x2 + v[31] * x3 + v[32] * x4 + v[33] * x5 + v[34] * x6; in MatSolve_SeqSBAIJ_7_inplace() 264 … tp[5] += v[35] * x0 + v[36] * x1 + v[37] * x2 + v[38] * x3 + v[39] * x4 + v[40] * x5 + v[41] * x6; in MatSolve_SeqSBAIJ_7_inplace() 265 … tp[6] += v[42] * x0 + v[43] * x1 + v[44] * x2 + v[45] * x3 + v[46] * x4 + v[47] * x5 + v[48] * x6; in MatSolve_SeqSBAIJ_7_inplace() 274 tp[0] = d[0] * x0 + d[7] * x1 + d[14] * x2 + d[21] * x3 + d[28] * x4 + d[35] * x5 + d[42] * x6; in MatSolve_SeqSBAIJ_7_inplace() [all …]
|
| /petsc/src/ts/tutorials/multirate/ |
| H A D | ex5.c | 76 PetscReal *a = ctx->a, x0; in PhysicsSample_Advect() local 82 x0 = x - a[0] * t; in PhysicsSample_Advect() 85 x0 = RangeMod(x - a[0] * t, xmin, xmax); in PhysicsSample_Advect() 92 u[0] = (x0 < 0) ? 1 : -1; in PhysicsSample_Advect() 95 u[0] = (x0 < 0) ? -1 : 1; in PhysicsSample_Advect() 98 u[0] = (0 < x0 && x0 < 1) ? 1 : 0; in PhysicsSample_Advect() 101 u[0] = PetscSinReal(2 * PETSC_PI * x0); in PhysicsSample_Advect() 104 u[0] = PetscAbs(x0); in PhysicsSample_Advect() 107 u[0] = (x0 < 0 || x0 > 0.5) ? 0 : PetscSqr(PetscSinReal(2 * PETSC_PI * x0)); in PhysicsSample_Advect() 110 u[0] = (x0 < 0) ? 0 : ((x0 < 1) ? x0 : ((x0 < 2) ? 2 - x0 : 0)); in PhysicsSample_Advect() [all …]
|
| H A D | ex7.c | 102 PetscReal a = ctx->a, x0; in PhysicsSample_Advect() local 107 x0 = x - a * t; in PhysicsSample_Advect() 110 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect() 117 u[0] = (x0 < 0) ? 1 : -1; in PhysicsSample_Advect() 120 u[0] = (x0 < 0) ? -1 : 1; in PhysicsSample_Advect() 123 u[0] = (0 < x0 && x0 < 1) ? 1 : 0; in PhysicsSample_Advect() 126 u[0] = PetscSinReal(2 * PETSC_PI * x0); in PhysicsSample_Advect() 129 u[0] = PetscAbs(x0); in PhysicsSample_Advect() 132 u[0] = (x0 < 0 || x0 > 0.5) ? 0 : PetscSqr(PetscSinReal(2 * PETSC_PI * x0)); in PhysicsSample_Advect() 135 u[0] = (x0 < 0) ? 0 : ((x0 < 1) ? x0 : ((x0 < 2) ? 2 - x0 : 0)); in PhysicsSample_Advect() [all …]
|
| /petsc/src/ts/tutorials/output/ |
| H A D | ex30_annulus.out | 11 x0 : (0.25,0.25) 13 x0 : (0.25,0.25)
|
| H A D | ex30_hdf5_diagnostic.out | 11 x0 : (0.25,0.25) 13 x0 : (0.25,0.25)
|
| H A D | ex30_vtk_diagnostic.out | 11 x0 : (0.25,0.25) 13 x0 : (0.25,0.25)
|
| H A D | ex30_full_cdisc_minres.out | 11 x0 : (0.25,0.25)
|
| H A D | ex30_full_cdisc.out | 11 x0 : (0.25,0.25)
|
| /petsc/src/ts/tutorials/ |
| H A D | ex10.c | 241 …ts, Vec X, Vec Xdot, PetscReal *Theta, PetscReal *dt, Vec *X0loc, RDNode **x0, Vec *Xloc, RDNode *… in RDGetLocalArrays() argument 268 PetscCall(DMDAVecGetArray(rd->da, *X0loc, x0)); in RDGetLocalArrays() 274 static PetscErrorCode RDRestoreLocalArrays(RD rd, Vec *X0loc, RDNode **x0, Vec *Xloc, RDNode **x, V… in RDRestoreLocalArrays() argument 277 PetscCall(DMDAVecRestoreArray(rd->da, *X0loc, x0)); in RDRestoreLocalArrays() 314 RDNode *x, *x0, *xdot, *f; in RDIFunction_FD() local 321 PetscCall(RDGetLocalArrays(rd, ts, X, Xdot, &Theta, &dt, &X0loc, &x0, &Xloc, &x, &Xloc_t, &xdot)); in RDIFunction_FD() 332 rad = (1. - Theta) * RDRadiation(rd, &x0[i], 0) + Theta * RDRadiation(rd, &x[i], 0); in RDIFunction_FD() 335 RDMaterialEnergy(rd, &x0[i], &Em0, NULL); in RDIFunction_FD() 351 n.E = (1. - bcTheta) * x0[0].E + bcTheta * x[0].E; in RDIFunction_FD() 352 n.T = (1. - bcTheta) * x0[0].T + bcTheta * x[0].T; in RDIFunction_FD() [all …]
|
| H A D | ex29.c | 171 PetscReal x0, x1; in FormInitialGuess() local 181 x0 = 10.0 * (i - 0.5 * (Mx - 1)) / (Mx - 1); in FormInitialGuess() 183 x[j][i].u = PetscCosReal(2.0 * PetscSqrtReal(x1 * x1 + x0 * x0)); in FormInitialGuess() 195 PetscReal x1, x0; in FormDiffusionCoefficient() local 210 x0 = 10.0 * (i - 0.5 * (Mx - 1)) / (Mx - 1); in FormDiffusionCoefficient() 214 x[j][i].beta = 0.05 + 0.05 * PetscSqrtReal(x0 * x0 + x1 * x1); in FormDiffusionCoefficient()
|
| H A D | ex77.c | 70 Vec x0; /* The initial particle positions at t = 0 */ member 118 const PetscReal x0 = X[0]; in trig_trig_x() local 120 const PetscReal R0 = PetscSqrtReal(x0 * x0 + y0 * y0); in trig_trig_x() 121 const PetscReal theta0 = PetscAtan2Real(y0, x0); in trig_trig_x() 779 PetscCall(VecGetArrayRead(adv->x0, &xp0)); in ComputeParticleError() 784 PetscReal x0[3]; in ComputeParticleError() local 787 for (d = 0; d < dim; ++d) x0[d] = PetscRealPart(xp0[p * dim + d]); in ComputeParticleError() 788 PetscCall(adv->exact(dim, time, x0, 1, x, param)); in ComputeParticleError() 791 PetscCall(VecRestoreArrayRead(adv->x0, &xp0)); in ComputeParticleError() 813 PetscCall(VecGetArrayRead(adv->x0, &xp0)); in MonitorParticleError() [all …]
|
| H A D | ex8.py | 22 x0 = ts.getSolution() 34 x0 = ts.getSolution()
|
| /petsc/src/ts/tutorials/autodiff/adolc-utils/ |
| H A D | matfree.cxx | 34 const PetscScalar *x0; in PetscAdolcIJacobianVectorProduct() local 53 PetscCall(VecGetArrayRead(mctx->localX0, &x0)); in PetscAdolcIJacobianVectorProduct() 59 fos_forward(mctx->tag1, m, n, 0, x0, x1, NULL, action); in PetscAdolcIJacobianVectorProduct() 75 fos_forward(mctx->tag2, m, n, 0, x0, x1, NULL, action); in PetscAdolcIJacobianVectorProduct() 94 PetscCall(VecRestoreArrayRead(mctx->localX0, &x0)); in PetscAdolcIJacobianVectorProduct() 116 const PetscScalar *x0; in PetscAdolcIJacobianVectorProductIDMass() local 135 PetscCall(VecGetArrayRead(mctx->localX0, &x0)); in PetscAdolcIJacobianVectorProductIDMass() 141 fos_forward(mctx->tag1, m, n, 0, x0, x1, NULL, action); in PetscAdolcIJacobianVectorProductIDMass() 158 PetscCall(VecRestoreArrayRead(mctx->localX0, &x0)); in PetscAdolcIJacobianVectorProductIDMass()
|
| /petsc/src/snes/utils/dm/ |
| H A D | dminterpolatesnes.c | 456 const PetscScalar x0 = vertices[0]; in QuadMap_Private() local 464 const PetscScalar f_1 = x1 - x0; in QuadMap_Private() 466 const PetscScalar f_3 = x3 - x0; in QuadMap_Private() 468 const PetscScalar f_01 = x2 - x1 - x3 + x0; in QuadMap_Private() 480 real[0] = x0 + f_1 * p0 + f_3 * p1 + f_01 * p0 * p1; in QuadMap_Private() 493 const PetscScalar x0 = vertices[0]; in QuadJacobian_Private() local 501 const PetscScalar f_01 = x2 - x1 - x3 + x0; in QuadJacobian_Private() 513 values[0] = (x1 - x0 + f_01 * y) * 0.5; in QuadJacobian_Private() 514 values[1] = (x3 - x0 + f_01 * x) * 0.5; in QuadJacobian_Private() 626 const PetscScalar x0 = vertices[0]; in HexMap_Private() local [all …]
|
| /petsc/src/ts/tutorials/hamiltonian/output/ |
| H A D | ex3_landau_damping_3d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000…
|
| H A D | ex3_landau_damping_2d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000…
|
| H A D | ex2_none_1d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 0.000…
|
| H A D | ex3_landau_damping_1d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000…
|
| H A D | ex2_coulomb_1d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 0.000…
|