Home
last modified time | relevance | path

Searched refs:sy (Results 1 – 15 of 15) sorted by relevance

/petsc/src/ts/tutorials/advection-diffusion-reaction/
H A Dreaction_diffusion.c32 PetscReal hx, hy, sx, sy; in RHSFunction() local
44 sy = 1.0 / (hy * hy); in RHSFunction()
73 uyy = (-2.0 * uc + u[j - 1][i].u + u[j + 1][i].u) * sy; in RHSFunction()
76 vyy = (-2.0 * vc + u[j - 1][i].v + u[j + 1][i].v) * sy; in RHSFunction()
97 PetscReal hx, hy, sx, sy; in RHSJacobian() local
112 sy = 1.0 / (hy * hy); in RHSJacobian()
165 entries[0] = appctx->D1 * sy; in RHSJacobian()
168 entries[1] = appctx->D1 * sy; in RHSJacobian()
177 entries[4] = -2.0 * appctx->D1 * (sx + sy) - vc * vc - appctx->gamma; in RHSJacobian()
187 entries[0] = appctx->D2 * sy; in RHSJacobian()
[all …]
H A Dex5adj_mf.c64 PetscReal hx, hy, sx, sy; in MyRHSMatMultTranspose() local
78 sy = 1.0 / (hy * hy); in MyRHSMatMultTranspose()
101 uyy = (-2.0 * ucb + x[j - 1][i].u + x[j + 1][i].u) * sy; in MyRHSMatMultTranspose()
105 vyy = (-2.0 * vcb + x[j - 1][i].v + x[j + 1][i].v) * sy; in MyRHSMatMultTranspose()
123 PetscReal hx, hy, sx, sy; in MyIMatMultTranspose() local
137 sy = 1.0 / (hy * hy); in MyIMatMultTranspose()
160 uyy = (-2.0 * ucb + x[j - 1][i].u + x[j + 1][i].u) * sy; in MyIMatMultTranspose()
164 vyy = (-2.0 * vcb + x[j - 1][i].v + x[j + 1][i].v) * sy; in MyIMatMultTranspose()
184 PetscReal hx, hy, sx, sy; in MyIMatMult() local
198 sy = 1.0 / (hy * hy); in MyIMatMult()
[all …]
/petsc/src/ts/tutorials/autodiff/
H A Dadr_ex5adj.cxx364 PetscReal hx, hy, sx, sy; in IFunctionLocalPassive() local
371 sy = 1.0 / (hy * hy); in IFunctionLocalPassive()
384 uyy = (-2.0 * uc + u[j - 1][i].u + u[j + 1][i].u) * sy; in IFunctionLocalPassive()
387 vyy = (-2.0 * vc + u[j - 1][i].v + u[j + 1][i].v) * sy; in IFunctionLocalPassive()
404 PetscReal hx, hy, sx, sy; in IFunctionActive() local
416 sy = 1.0 / (hy * hy); in IFunctionActive()
480 uyy = (-2.0 * uc + u_a[j - 1][i].u + u_a[j + 1][i].u) * sy; in IFunctionActive()
483 vyy = (-2.0 * vc + u_a[j - 1][i].v + u_a[j + 1][i].v) * sy; in IFunctionActive()
531 PetscReal hx, hy, sx, sy; in RHSFunctionPassive() local
542 sy = 1.0 / (hy * hy); in RHSFunctionPassive()
[all …]
H A Dadr_ex5adj_mf.cxx252 PetscReal hx, hy, sx, sy; in IFunctionLocalPassive() local
259 sy = 1.0 / (hy * hy); in IFunctionLocalPassive()
272 uyy = (-2.0 * uc + u[j - 1][i].u + u[j + 1][i].u) * sy; in IFunctionLocalPassive()
275 vyy = (-2.0 * vc + u[j - 1][i].v + u[j + 1][i].v) * sy; in IFunctionLocalPassive()
292 PetscReal hx, hy, sx, sy; in IFunctionActive() local
304 sy = 1.0 / (hy * hy); in IFunctionActive()
368 uyy = (-2.0 * uc + u_a[j - 1][i].u + u_a[j + 1][i].u) * sy; in IFunctionActive()
371 vyy = (-2.0 * vc + u_a[j - 1][i].v + u_a[j + 1][i].v) * sy; in IFunctionActive()
/petsc/src/ts/tutorials/
H A Dex13.c121 PetscReal two = 2.0, hx, hy, sx, sy; in RHSFunction() local
133 sy = 1.0 / (hy * hy); in RHSFunction()
160 uyy = (-two * u + uarray[j - 1][i] + uarray[j + 1][i]) * sy; in RHSFunction()
193 PetscReal hx, hy, sx, sy; in RHSJacobian() local
201 sy = 1.0 / (hy * hy); in RHSJacobian()
222 val[nc++] = sy; in RHSJacobian()
225 val[nc++] = sy; in RHSJacobian()
228 val[nc++] = -2 * sx - 2 * sy; in RHSJacobian()
H A Dex15.c160 PetscReal hx, hy, sx, sy; in FormIFunction() local
171 sy = 1.0 / (hy * hy); in FormIFunction()
227 f[j][i] = udot[j][i] - (uxx * sx + uyy * sy); in FormIFunction()
252 PetscScalar vals[5], hx, hy, sx, sy; in FormIJacobian() local
261 sy = 1.0 / (hy * hy); in FormIJacobian()
304 vals[nc++] = -sy; in FormIJacobian()
310 vals[nc++] = 2.0 * (sx + sy) + a; in FormIJacobian()
316 vals[nc++] = -sy; in FormIJacobian()
H A Dex7.c128 PetscReal two = 2.0, hx, hy, sx, sy; in FormFunction() local
140 sy = 1.0 / (hy * hy); in FormFunction()
173 uyy = (two * u - x[j - 1][i] - x[j + 1][i]) * sy; in FormFunction()
175 … - x[j][i - 1]) * .25 * sx + (x[j + 1][i] - x[j - 1][i]) * (x[j + 1][i] - x[j - 1][i]) * .25 * sy); in FormFunction()
H A Dex12.c135 PetscReal hx, hy, /*hxdhy,hydhx,*/ sx, sy; in FormFunction() local
146 sy = 1.0 / (hy * hy); in FormFunction()
183 uyy = (-2.0 * u + x[j - 1][i][0] + x[j + 1][i][0]) * sy; in FormFunction()
/petsc/src/ts/tests/
H A Dex24.c21 PetscReal hx, hy, sx, sy; in RHSJacobian() local
36 sy = 1.0 / (hy * hy); in RHSJacobian()
89 entries[0] = appctx->D1 * sy; in RHSJacobian()
92 entries[1] = appctx->D1 * sy; in RHSJacobian()
101 entries[4] = -2.0 * appctx->D1 * (sx + sy) - vc * vc - appctx->gamma; in RHSJacobian()
110 entries[0] = appctx->D2 * sy; in RHSJacobian()
112 entries[1] = appctx->D2 * sy; in RHSJacobian()
118 entries[4] = -2.0 * appctx->D2 * (sx + sy) + 2.0 * uc * vc - appctx->gamma - appctx->kappa; in RHSJacobian()
/petsc/src/dm/tests/
H A Dex36.c58 PetscInt sx, nx, sy, ny, sz, nz, dim; in DAApplyConformalMapping() local
79 PetscCall(DMDAGetCorners(da, &sx, &sy, &sz, &nx, &ny, &nz)); in DAApplyConformalMapping()
198 PetscInt sx, nx, sy, ny, sz, nz; in DAApplyTrilinearMapping() local
210 PetscCall(DMDAGetCorners(da, &sx, &sy, &sz, &nx, &ny, &nz)); in DAApplyTrilinearMapping()
213 for (j = sy; j < sy + ny; j++) { in DAApplyTrilinearMapping()
253 PetscInt sx, nx, sy, ny; in DADefineXLinearField2D() local
266 PetscCall(DMDAGetCorners(da, &sx, &sy, 0, &nx, &ny, 0)); in DADefineXLinearField2D()
269 …for (j = sy; j < sy + ny; j++) FF[j][i] = 10.0 + 3.0 * XX[j][i].x + 5.5 * XX[j][i].y + 8.003 * XX[… in DADefineXLinearField2D()
280 PetscInt sx, nx, sy, ny, sz, nz; in DADefineXLinearField3D() local
293 PetscCall(DMDAGetCorners(da, &sx, &sy, &sz, &nx, &ny, &nz)); in DADefineXLinearField3D()
[all …]
/petsc/src/dm/impls/da/
H A Dgrglvis.c38 PetscInt sx, sy, sz, ien, jen, ken; in DMDAGetNumElementsGhosted() local
45 PetscCall(DMDAGetCorners(da, &sx, &sy, &sz, &ien, &jen, &ken)); in DMDAGetNumElementsGhosted()
52 if (!sy && dim > 1) jen--; in DMDAGetNumElementsGhosted()
59 if (sy + jen == N) jen--; in DMDAGetNumElementsGhosted()
97 PetscInt sx, sy, sz, gsx, gsy, gsz, ist, jst, kst, gm, gn, gp; in DMDASampleGLVisFields_Private() local
108 PetscCall(DMDAGetCorners(da, &sx, &sy, &sz, NULL, NULL, NULL)); in DMDASampleGLVisFields_Private()
113 jst = gsy != sy ? 1 : 0; in DMDASampleGLVisFields_Private()
343 PetscInt sx, sy, sz, ie, je, ke, ien, jen, ken, nel; in DMDAView_GLVis_ASCII() local
479 PetscCall(DMDAGetCorners(da, &sx, &sy, &sz, NULL, NULL, NULL)); in DMDAView_GLVis_ASCII()
485 jst = gsy != sy ? 1 : 0; in DMDAView_GLVis_ASCII()
/petsc/include/
H A Dpetscblaslapack.h166 …Int *n, const PetscScalar *x, const PetscBLASInt *sx, const PetscScalar *y, const PetscBLASInt *sy) in BLASdot_() argument
170 if (*sx == 1 && *sy == 1) { in BLASdot_()
173 for (i = 0, j = 0, k = 0; i < *n; i++, j += *sx, k += *sy) sum += PetscConj(x[j]) * y[k]; in BLASdot_()
177 …Int *n, const PetscScalar *x, const PetscBLASInt *sx, const PetscScalar *y, const PetscBLASInt *sy) in BLASdotu_() argument
181 if (*sx == 1 && *sy == 1) { in BLASdotu_()
184 for (i = 0, j = 0, k = 0; i < *n; i++, j += *sx, k += *sy) sum += x[j] * y[k]; in BLASdotu_()
/petsc/src/mat/impls/h2opus/cuda/
H A Dmath2opus.cu516 static PetscErrorCode MatMultKernel_H2OPUS(Mat A, Vec x, PetscScalar sy, Vec y, PetscBool trans) in MatMultKernel_H2OPUS() argument
540 if (sy == 0.0) { in MatMultKernel_H2OPUS()
551 if (sy != 0.0) { in MatMultKernel_H2OPUS()
563 …2Opus_Trans : H2Opus_NoTrans, */ h2opus->s, *h2opus->dist_hmatrix, uxx, n, sy, uyy, n, 1, h2opus->… in MatMultKernel_H2OPUS()
567 …hgemv(trans ? H2Opus_Trans : H2Opus_NoTrans, h2opus->s, *h2opus->hmatrix, uxx, n, sy, uyy, n, 1, h… in MatMultKernel_H2OPUS()
574 if (sy == 0.0) { in MatMultKernel_H2OPUS()
582 if (sy == 0.0) { in MatMultKernel_H2OPUS()
593 if (sy != 0.0) { in MatMultKernel_H2OPUS()
606 …s_Trans : H2Opus_NoTrans, */ h2opus->s, *h2opus->dist_hmatrix_gpu, uxx, n, sy, uyy, n, 1, h2opus->… in MatMultKernel_H2OPUS()
610 …hgemv(trans ? H2Opus_Trans : H2Opus_NoTrans, h2opus->s, *h2opus->hmatrix_gpu, uxx, n, sy, uyy, n, … in MatMultKernel_H2OPUS()
[all …]
/petsc/src/sys/classes/draw/impls/image/
H A Ddrawimage.h57 int dy = PetscAbs(y_2 - y_1), sy = (y_2 - y_1) >= 0 ? +1 : -1; in PetscImageDrawLine() local
69 y_1 += sy; in PetscImageDrawLine()
/petsc/src/ksp/ksp/utils/lmvm/symbrdn/
H A Dsymbrdn.c621 Vec sy[2] = {lmvm->Xprev, lmvm->Fprev}; in MatUpdate_LMVMSymBrdn() local
624 PetscCall(VecMDot(lmvm->Xprev, 2, sy, stsy)); in MatUpdate_LMVMSymBrdn()