Home
last modified time | relevance | path

Searched refs:xp (Results 1 – 25 of 32) sorted by relevance

12

/petsc/src/mat/impls/sbaij/seq/
H A Dsbaijfact2.c339 PetscScalar *xp, x0, x1, x2, x3, x4, x5, x6; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering() local
346 xp = x + k * 7; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
347 x0 = xp[0]; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
348 x1 = xp[1]; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
349 x2 = xp[2]; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
350 x3 = xp[3]; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
351 x4 = xp[4]; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
352 x5 = xp[5]; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
353 x6 = xp[6]; /* Dk*xk = k-th block of x */ in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
359 xp = x + (*vj) * 7; in MatForwardSolve_SeqSBAIJ_7_NaturalOrdering()
[all …]
/petsc/src/snes/tutorials/
H A Dex59.c32 PetscReal h, xp = 0.0; in main() local
92 xp = 0.0; in main()
94 … - a) * PetscPowScalar(xp, k - 2.) + SQR(a * xp) + SQR(b - a) * PetscPowScalar(xp, 2. * k) + 2. * … in main()
96 v2 = a * xp + (b - a) * PetscPowScalar(xp, k); in main()
98 xp += h; in main()
H A Dex2.c40 PetscScalar h, xp, v, none = -1.0; in main() local
131 xp = 0.0; in main()
133 v = 6.0 * xp + PetscPowScalar(xp + 1.e-12, 6.0); /* +1.e-12 is to prevent 0^6 */ in main()
135 v = xp * xp * xp; in main()
137 xp += h; in main()
H A Dex6.c31 PetscScalar h, xp, v; in main() local
115 xp = 0.0; in main()
117 v = 6.0 * xp + PetscPowScalar(xp + 1.e-12, 6.0); /* +1.e-12 is to prevent 0^6 */ in main()
119 v = xp * xp * xp; in main()
121 xp += h; in main()
H A Dex3k.kokkos.cxx304 PetscReal xp = i * ctx.h; in main()
305 FF(i) = 6.0 * xp + pow(xp + 1.e-12, 6.0); /* +1.e-12 is to prevent 0^6 */ in main()
306 UU(i) = xp * xp * xp; in main()
H A Dex3.c85 PetscScalar xp, *FF, *UU, none = -1.0; in main() local
250 xp = ctx.h * xs; in main()
252 FF[i] = 6.0 * xp + PetscPowScalar(xp + 1.e-12, 6.0); /* +1.e-12 is to prevent 0^6 */ in main()
253 UU[i] = xp * xp * xp; in main()
254 xp += ctx.h; in main()
/petsc/src/snes/tests/
H A Dex5.c30 PetscScalar h, xp, v, none = -1.0; in main() local
132 xp = 0.0; in main()
134 v = 6.0 * xp + PetscPowScalar(xp + 1.e-12, 6.0); /* +1.e-12 is to prevent 0^6 */ in main()
136 v = xp * xp * xp; in main()
138 xp += h; in main()
H A Dex12f.F90203 PetscScalar xp, FF, UU, h
239 xp = h*start
243 FF = 6.0*xp + (xp + 1.e-12)**6.e0
244 UU = xp*xp*xp
247 xp = xp + h
H A Dex7.c29 PetscScalar h, xp = 0.0, v; in main() local
52 v = 6.0 * xp + PetscPowScalar(xp + 1.e-12, 6.0); /* +1.e-12 is to prevent 0^6 */ in main()
54 v = xp * xp * xp; in main()
56 xp += h; in main()
/petsc/include/petsc/private/
H A Dcupmatomics.hpp65 double *xp = (double *)&x, *yp = (double *)&y; in operator ()() local
67 z[0] = op(xp[0], yp[0]); in operator ()()
68 z[1] = op(xp[1], yp[1]); in operator ()()
77 double *xp = (double *)&x, *yp = (double *)&y; in operator ()() local
79 return op(xp[0], yp[0]); in operator ()()
165 PetscReal *xp = (PetscReal *)&x, *yp = (PetscReal *)&y; in operator ()() local
167 z[0] = op(xp[0], yp[0]); in operator ()()
168 z[1] = op(xp[1], yp[1]); in operator ()()
514 double *xp = (double *)&x, *yp = (double *)&y;
516 z[0] = op(xp[0], yp[0]);
[all …]
/petsc/src/dm/tutorials/
H A Dswarm_ex1.c224 PetscReal xp, yp; in ex1_3() local
225 xp = PetscRealPart(LA_coor[j][i].x); in ex1_3()
227 array_x[4 * cnt + 0] = xp - 0.05; in ex1_3()
229 array_x[4 * cnt + 1] = xp + 0.05; in ex1_3()
231 array_x[4 * cnt + 2] = xp - 0.05; in ex1_3()
233 array_x[4 * cnt + 3] = xp + 0.05; in ex1_3()
390 PetscReal xp, yp; in ex1_4() local
392 xp = PetscRealPart(LA_coor[j][i].x); in ex1_4()
394 …array_x[4 * cnt + 0] = xp - dx * 0.1; /*if (array_x[4*cnt+0] < -1.0) array_x[4*cnt+0] = -1.0+1.0e-… in ex1_4()
395 …array_x[4 * cnt + 1] = xp + dx * 0.1; /*if (array_x[4*cnt+1] > 1.0) { array_x[4*cnt+1] = 1.0-1.0… in ex1_4()
[all …]
H A Dex10.c24 PetscScalar xm = -1.0, xp = 1.0; in main() local
33 dx = (xp - xm) / (Nx - 1); in main()
/petsc/src/ksp/pc/impls/pbjacobi/kokkos/
H A Dpbjacobi_kok.kokkos.cxx49 const PetscScalar *Ap, *xp; in PCApplyOrTranspose_PBJacobi_Kokkos()
56 xp = &xv(bs * k); in PCApplyOrTranspose_PBJacobi_Kokkos()
61 yp[i] += Ap[0] * xp[j]; in PCApplyOrTranspose_PBJacobi_Kokkos()
/petsc/src/ksp/pc/impls/telescope/
H A Dtelescope_dmda.c628 Vec xred, yred, xtmp, x, xp; in PCTelescopeSetUp_dmda_scatters() local
640 PetscCall(VecDuplicate(x, &xp)); in PCTelescopeSetUp_dmda_scatters()
666 ctx->xp = xp; in PCTelescopeSetUp_dmda_scatters()
807 PetscCall(MatMultTranspose(ctx->permutation, vecs[k], ctx->xp)); in PCTelescopeSubNullSpaceCreate_dmda_Telescope()
810 PetscCall(VecScatterBegin(sred->scatter, ctx->xp, sred->xtmp, INSERT_VALUES, SCATTER_FORWARD)); in PCTelescopeSubNullSpaceCreate_dmda_Telescope()
811 PetscCall(VecScatterEnd(sred->scatter, ctx->xp, sred->xtmp, INSERT_VALUES, SCATTER_FORWARD)); in PCTelescopeSubNullSpaceCreate_dmda_Telescope()
873 Vec xtmp, xp, xred, yred; in PCApply_Telescope_dmda() local
886 xp = ctx->xp; in PCApply_Telescope_dmda()
892 PetscCall(MatMultTranspose(perm, x, xp)); in PCApply_Telescope_dmda()
895 PetscCall(VecScatterBegin(scatter, xp, xtmp, INSERT_VALUES, SCATTER_FORWARD)); in PCApply_Telescope_dmda()
[all …]
H A Dtelescope_coarsedm.c34 Vec xp; member
43 Vec xred, yred, xtmp, x, xp; in PCTelescopeSetUp_scatters_CoarseDM() local
55 PetscCall(VecDuplicate(x, &xp)); in PCTelescopeSetUp_scatters_CoarseDM()
80 ctx->xp = xp; in PCTelescopeSetUp_scatters_CoarseDM()
355 PetscCall(VecDestroy(&ctx->xp)); in PCReset_Telescope_CoarseDM()
H A Dtelescope.h35 Vec xp; member
/petsc/src/ksp/pc/impls/pbjacobi/cuda/
H A Dpbjacobi_cuda.cu14 const PetscScalar *Ap, *xp; in MatMultBatched() local
21 xp = &x[bs * k]; in MatMultBatched()
26 yp[i] += Ap[0] * xp[j]; in MatMultBatched()
/petsc/src/ts/utils/dmplexlandau/
H A Dland_tensors.h111 static PETSC_DEVICE_FUNC_DECL void LandauTensor3D(const PetscReal x1[], const PetscReal xp, const P… in LandauTensor3D() argument
113 PetscReal dx[3], inorm3, inorm, inorm2, norm2, x2[] = {xp, yp, zp}; in LandauTensor3D()
129 …CL void LandauTensor3DRelativistic(const PetscReal a_x1[], const PetscReal xp, const PetscReal yp,… in LandauTensor3DRelativistic() argument
131 …const PetscReal x2[3] = {xp, yp, zp}, x1[3] = {a_x1[0], a_x1[1], a_x1[2]}, c02 = c0 * c0, g1 = GAM… in LandauTensor3DRelativistic()
/petsc/src/ksp/ksp/tutorials/
H A Dex73.c279 Vec xred, yred, xtmp, x, xp; in PCTelescopeSetUp_dmda_scatters() local
299 PetscCall(VecCreate(comm, &xp)); in PCTelescopeSetUp_dmda_scatters()
300 PetscCall(VecSetSizes(xp, m, M)); in PCTelescopeSetUp_dmda_scatters()
301 PetscCall(VecSetBlockSize(xp, bs)); in PCTelescopeSetUp_dmda_scatters()
302 PetscCall(VecSetType(xp, vectype)); in PCTelescopeSetUp_dmda_scatters()
328 PetscCall(PetscObjectCompose((PetscObject)dmf, "xp", (PetscObject)xp)); in PCTelescopeSetUp_dmda_scatters()
435 Vec xp = NULL, xtmp = NULL; in DMShellDAFieldScatter_Forward() local
442 PetscCall(PetscObjectQuery((PetscObject)dmf, "xp", (PetscObject *)&xp)); in DMShellDAFieldScatter_Forward()
446 …PetscCheck(xp, PETSC_COMM_SELF, PETSC_ERR_USER, "Require \"xp\" to be composed with the parent (fi… in DMShellDAFieldScatter_Forward()
450 PetscCall(MatMultTranspose(P, x, xp)); in DMShellDAFieldScatter_Forward()
[all …]
/petsc/src/ts/tutorials/
H A Dex11.h582 static int riemannsolver(PetscScalar *xcen, PetscScalar *xp, PetscScalar *dtt, PetscScalar *rl, Pet… in riemannsolver() argument
599 if (PetscRealPart(*xp) >= PetscRealPart(x2)) { in riemannsolver()
613 d__1 = *xp - x2; in riemannsolver()
645 cx = sgn0 * .5 * gasc1 / gasc2 * ((*xp - *xcen) / *dtt - ri); in riemannsolver()
651 d__1 = sgn0 * (x0 - *xp); in riemannsolver()
653 d__1 = sgn0 * (x0 - *xp); in riemannsolver()
655 d__1 = sgn0 * (x0 - *xp); in riemannsolver()
657 d__1 = sgn0 * (xstar - *xp); in riemannsolver()
659 d__1 = sgn0 * (xstar - *xp); in riemannsolver()
661 d__1 = sgn0 * (xstar - *xp); in riemannsolver()
[all …]
H A Dex77.c765 const PetscScalar *xp0, *xp; in ComputeParticleError() local
780 PetscCall(VecGetArrayRead(u, &xp)); in ComputeParticleError()
789 for (d = 0; d < dim; ++d) ep[p * dim + d] += x[d] - xp[p * dim + d]; in ComputeParticleError()
792 PetscCall(VecRestoreArrayRead(u, &xp)); in ComputeParticleError()
802 const PetscScalar *xp0, *xp; in MonitorParticleError() local
814 PetscCall(VecGetArrayRead(u, &xp)); in MonitorParticleError()
823 for (d = 0; d < dim; ++d) perror += PetscSqr(PetscRealPart(x[d] - xp[p * dim + d])); in MonitorParticleError()
827 PetscCall(VecRestoreArrayRead(u, &xp)); in MonitorParticleError()
/petsc/src/snes/interface/noise/
H A Dsnesnoise.c80 Vec w, xp, fvec; /* work vectors to use in computing h */ in SNESDiffParameterCompute_More() local
98 xp = neP->workv[1]; in SNESDiffParameterCompute_More()
120 PetscCall(VecWAXPY(xp, alpha, p, x)); in SNESDiffParameterCompute_More()
121 PetscCall(SNESComputeFunction(snes, xp, fvec)); in SNESDiffParameterCompute_More()
/petsc/src/dm/impls/stag/tutorials/
H A Dex1.c248 PetscScalar val[3], xp[2]; in main() local
262 PetscCall(DMStagVecGetValuesStencil(dmCoordSol, coordSolLocal, 2, col, xp)); in main()
263 h = xp[0] - xp[1]; in main()
/petsc/src/ksp/pc/impls/vpbjacobi/kokkos/
H A Dvpbjacobi_kok.kokkos.cxx109 const PetscScalar *Bp, *xp; in PCApplyOrTranspose_VPBJacobi_Kokkos()
117 xp = &xv(bs(k)); in PCApplyOrTranspose_VPBJacobi_Kokkos()
122 yp[i] += Bp[0] * xp[j]; in PCApplyOrTranspose_VPBJacobi_Kokkos()
/petsc/src/dm/impls/swarm/
H A Dswarmpic.c386 PetscReal xp[] = {0.0, 0.0, 0.0}; in DMSwarmSetPointsUniformCoordinates() local
393 for (b = 0; b < bs; b++) xp[b] = min[b] + ijk[b] * dx[b]; in DMSwarmSetPointsUniformCoordinates()
395 if (xp[b] < lmin[b]) point_inside = PETSC_FALSE; in DMSwarmSetPointsUniformCoordinates()
396 if (xp[b] > lmax[b]) point_inside = PETSC_FALSE; in DMSwarmSetPointsUniformCoordinates()
414 PetscReal xp[] = {0.0, 0.0, 0.0}; in DMSwarmSetPointsUniformCoordinates() local
421 for (b = 0; b < bs; b++) xp[b] = min[b] + ijk[b] * dx[b]; in DMSwarmSetPointsUniformCoordinates()
423 if (xp[b] < lmin[b]) point_inside = PETSC_FALSE; in DMSwarmSetPointsUniformCoordinates()
424 if (xp[b] > lmax[b]) point_inside = PETSC_FALSE; in DMSwarmSetPointsUniformCoordinates()
427 for (b = 0; b < bs; b++) _pos[bs * n_estimate + b] = xp[b]; in DMSwarmSetPointsUniformCoordinates()

12