Home
last modified time | relevance | path

Searched refs:sc (Results 1 – 25 of 44) sorted by relevance

12

/petsc/src/ts/impls/implicit/glle/
H A Dglle.c286 static PetscErrorCode TSGLLESchemeDestroy(TSGLLEScheme sc) in TSGLLESchemeDestroy() argument
289 PetscCall(PetscFree5(sc->c, sc->a, sc->b, sc->u, sc->v)); in TSGLLESchemeDestroy()
290 PetscCall(PetscFree6(sc->alpha, sc->beta, sc->gamma, sc->phi, sc->psi, sc->stage_error)); in TSGLLESchemeDestroy()
291 PetscCall(PetscFree(sc)); in TSGLLESchemeDestroy()
329 static PetscErrorCode TSGLLESchemeView(TSGLLEScheme sc, PetscBool view_details, PetscViewer viewer) in TSGLLESchemeView() argument
336 …scInt_FMT ",%" PetscInt_FMT ",%" PetscInt_FMT ",%" PetscInt_FMT "\n", sc->p, sc->q, sc->r, sc->s)); in TSGLLESchemeView()
338 …ASCIIPrintf(viewer, "Stiffly accurate: %s, FSAL: %s\n", sc->stiffly_accurate ? "yes" : "no", sc->… in TSGLLESchemeView()
339 …0.3e %10.3e\n", (double)PetscRealPart(sc->alpha[0]), (double)PetscRealPart(sc->beta[0]), (double)… in TSGLLESchemeView()
340 PetscCall(TSGLLEViewTable_Private(viewer, 1, sc->s, sc->c, "Abscissas c")); in TSGLLESchemeView()
342 PetscCall(TSGLLEViewTable_Private(viewer, sc->s, sc->s, sc->a, "A")); in TSGLLESchemeView()
[all …]
/petsc/src/ts/tests/
H A Dex12.c326 PetscScalar *copyptr, sc; in RHSFunction() local
352 sc = 1.0 / (appctx->h * appctx->h * 2.0 * (1.0 + t) * (1.0 + t)); in RHSFunction()
381 …for (i = 1; i < localsize - 1; i++) copyptr[i] = localptr[i] * sc * (localptr[i + 1] + localptr[i … in RHSFunction()
430 PetscScalar v[3], sc; in RHSJacobian() local
489 sc = 1.0 / (appctx->h * appctx->h * 2.0 * (1.0 + t) * (1.0 + t)); in RHSJacobian()
495 v[0] = sc * localptr[is]; in RHSJacobian()
496 v[1] = sc * (localptr[is + 1] + localptr[is - 1] - 4.0 * localptr[is]); in RHSJacobian()
497 v[2] = sc * localptr[is]; in RHSJacobian()
/petsc/src/dm/dt/space/impls/tensor/
H A Dspacetensor.c351 for (PetscInt sc = 0; sc < sNc; sc++) { in PetscSpaceEvaluate_Tensor() local
353 PetscInt c = (l * sNc + sc) * cstep + m; in PetscSpaceEvaluate_Tensor()
355 …r (PetscInt p = 0; p < npoints; p++) B[(pdim * p + i) * Nc + c] *= sB[(spdim * p + si) * sNc + sc]; in PetscSpaceEvaluate_Tensor()
370 for (PetscInt sc = 0; sc < sNc; sc++) { in PetscSpaceEvaluate_Tensor() local
372 PetscInt c = (l * sNc + sc) * cstep + m; in PetscSpaceEvaluate_Tensor()
376 … p++) D[((pdim * p + i) * Nc + c) * Nv + der] *= sD[((spdim * p + si) * sNc + sc) * sNv + der - d]; in PetscSpaceEvaluate_Tensor()
378 … = 0; p < npoints; p++) D[((pdim * p + i) * Nc + c) * Nv + der] *= sB[(spdim * p + si) * sNc + sc]; in PetscSpaceEvaluate_Tensor()
395 for (PetscInt sc = 0; sc < sNc; sc++) { in PetscSpaceEvaluate_Tensor() local
397 PetscInt c = (l * sNc + sc) * cstep + m; in PetscSpaceEvaluate_Tensor()
402 …p + i) * Nc + c) * Nv + der) * Nv + der2] *= sH[(((spdim * p + si) * sNc + sc) * sNv + der - d) * … in PetscSpaceEvaluate_Tensor()
[all …]
/petsc/src/ts/tutorials/
H A Dex2.c415 PetscScalar *copyptr, sc; in RHSFunction() local
441 sc = 1.0 / (appctx->h * appctx->h * 2.0 * (1.0 + t) * (1.0 + t)); in RHSFunction()
470 …for (i = 1; i < localsize - 1; i++) copyptr[i] = localptr[i] * sc * (localptr[i + 1] + localptr[i … in RHSFunction()
525 PetscScalar v[3], sc; in RHSJacobian() local
584 sc = 1.0 / (appctx->h * appctx->h * 2.0 * (1.0 + t) * (1.0 + t)); in RHSJacobian()
590 v[0] = sc * localptr[is]; in RHSJacobian()
591 v[1] = sc * (localptr[is + 1] + localptr[is - 1] - 4.0 * localptr[is]); in RHSJacobian()
592 v[2] = sc * localptr[is]; in RHSJacobian()
H A Dex21.c472 PetscScalar *copyptr, sc; in RHSFunction() local
498 sc = 1.0 / (appctx->h * appctx->h * 2.0 * (1.0 + t) * (1.0 + t)); in RHSFunction()
527 …for (i = 1; i < localsize - 1; i++) copyptr[i] = localptr[i] * sc * (localptr[i + 1] + localptr[i … in RHSFunction()
582 PetscScalar v[3], sc; in RHSJacobian() local
641 sc = 1.0 / (appctx->h * appctx->h * 2.0 * (1.0 + t) * (1.0 + t)); in RHSJacobian()
647 v[0] = sc * localptr[is]; in RHSJacobian()
648 v[1] = sc * (localptr[is + 1] + localptr[is - 1] - 4.0 * localptr[is]); in RHSJacobian()
649 v[2] = sc * localptr[is]; in RHSJacobian()
H A Dex1.c218 PetscScalar ut, ub, ul, ur, u, uxx, uyy, sc, *f; in FormFunction() local
228 sc = hx * hy; in FormFunction()
248 f[row] = -uxx + -uyy + sc * lambda * PetscExpScalar(u); in FormFunction()
269 PetscScalar two = 2.0, one = 1.0, lambda, v[5], sc; in FormJacobian() local
280 sc = hx * hy; in FormJacobian()
296 v[2] = -two * (hydhx + hxdhy) + sc * lambda * PetscExpScalar(x[row]); in FormJacobian()
H A Dex1f.F9038 PetscScalar uxx, uyy, sc
50 sc = hx*hy
69 ff(row) = -uxx - uyy + sc*lambda*exp(u)
91 PetscScalar v(5), sc
109 sc = hx*hy
127 v(3) = -two*(hydhx + hxdhy) + sc*lambda*exp(xx(row(1)))
/petsc/src/snes/tutorials/
H A Dex5m.m8 sc = hx*hy*lambda; hxdhy = hx/hy; hydhx = hy/hx; variable
22 localF(2:m-1,2:n-1) = uxx + uyy - sc*exp(u);
H A Dex5f.F90170 PetscScalar hxdhy, hydhx, sc
185 sc = hx*hy*lambda
199 f(i, j) = uxx + uyy - sc*exp(u)
258 PetscScalar hxdhy, hydhx, sc
268 sc = hx*hy
302 v(3) = two*(hydhx + hxdhy) - sc*lambda*exp(x(i, j))
H A Dex15.c411 PetscReal hx, hy, dhx, dhy, sc; in FormFunctionLocal() local
418 sc = hx * hy * user->lambda; in FormFunctionLocal()
431 if (sc) eu = PetscExpScalar(u); in FormFunctionLocal()
437 f[j][i] = uxx + uyy - sc * eu; in FormFunctionLocal()
452 PetscReal hx, hy, sc; in FormFunctionPicardLocal() local
458 sc = hx * hy * user->lambda; in FormFunctionPicardLocal()
466 f[j][i] = sc * PetscExpScalar(u); in FormFunctionPicardLocal()
484 PetscReal hx, hy, hxdhy, hydhx, dhx, dhy, sc; in FormJacobianLocal() local
490 sc = hx * hy * user->lambda; in FormJacobianLocal()
527 v[2] = 2.0 * (hydhx + hxdhy) - sc * PetscExpScalar(u); in FormJacobianLocal()
[all …]
H A Dex5f90t.F90229 PetscScalar two, one, hx, hy, hxdhy, hydhx, sc
237 sc = hx*hy*ctx%lambda
251 f(i, j) = uxx + uyy - sc*exp(u)
397 PetscScalar hydhx, sc, v(5)
406 sc = hx*hy
435 v(3) = two*(hydhx + hxdhy) - sc*ctx%lambda*exp(x(i, j))
H A Dex5f90.F90239 PetscScalar two, one, hx, hy, hxdhy, hydhx, sc
247 sc = hx*hy*ctx%lambda
261 f(i, j) = uxx + uyy - sc*exp(u)
408 PetscScalar hydhx, sc, v(5)
417 sc = hx*hy
446 v(3) = two*(hydhx + hxdhy) - sc*ctx%lambda*exp(x(i, j))
H A Dex55k.kokkos.cxx119 PetscReal lambda, hx, hy, hxdhy, hydhx, sc, lobj = 0; in FormObjectiveLocalVec() local
131 sc = hx * hy * lambda; in FormObjectiveLocalVec()
162 update += PetscRealPart(0.5 * (uxux + uyuy) - sc * PetscExpScalar(u)); in FormObjectiveLocalVec()
178 PetscScalar lambda, hx, hy, hxdhy, hydhx, sc; in FormJacobianLocalVec() local
196 sc = hx * hy * lambda; in FormJacobianLocalVec()
274 coo_v(p + 2) = 2.0 * (hydhx + hxdhy) - sc * PetscExpScalar(xv(j, i)); in FormJacobianLocalVec()
H A Dex14.c274 PetscReal two = 2.0, lambda, hx, hy, hz, hxhzdhy, hyhzdhx, hxhydhz, sc; in FormFunctionLocal() local
286 sc = hx * hy * hz * lambda; in FormFunctionLocal()
321 f[k][j][i] = u_xx + u_yy + u_zz - sc * PetscExpScalar(u); in FormFunctionLocal()
390 PetscScalar lambda, v[7], hx, hy, hz, hxhzdhy, hyhzdhx, hxhydhz, sc, ***x; in FormJacobian() local
402 sc = hx * hy * hz * lambda; in FormJacobian()
461 v[3] = 2.0 * (hyhzdhx + hxhzdhy + hxhydhz) - sc * PetscExpScalar(x[k][j][i]); in FormJacobian()
H A Dex5.c320 PetscReal lambda, hx, hy, hxdhy, hydhx, sc, lobj = 0; in FormObjectiveLocal() local
330 sc = hx * hy * lambda; in FormObjectiveLocal()
357 lobj += PetscRealPart(0.5 * (uxux + uyuy) - sc * PetscExpScalar(u)); in FormObjectiveLocal()
373 PetscScalar lambda, v[5], hx, hy, hxdhy, hydhx, sc; in FormJacobianLocal() local
389 sc = hx * hy * lambda; in FormJacobianLocal()
426 v[k] = 2.0 * (hydhx + hxdhy) - sc * PetscExpScalar(x[j][i]); in FormJacobianLocal()
518 PetscReal lambda, hx, hy, hxdhy, hydhx, sc; in NonlinearGS() local
537 sc = hx * hy * lambda; in NonlinearGS()
585 F = uxx + uyy - sc * eu - bij; in NonlinearGS()
587 J = 2.0 * (hydhx + hxdhy) - sc * eu; in NonlinearGS()
H A Dex55.c263 PetscReal lambda, hx, hy, hxdhy, hydhx, sc, lobj = 0; in FormObjectiveLocal() local
273 sc = hx * hy * lambda; in FormObjectiveLocal()
300 lobj += PetscRealPart(0.5 * (uxux + uyuy) - sc * PetscExpScalar(u)); in FormObjectiveLocal()
316 PetscScalar lambda, v[5], hx, hy, hxdhy, hydhx, sc; in FormJacobianLocal() local
332 sc = hx * hy * lambda; in FormJacobianLocal()
369 v[k] = 2.0 * (hydhx + hxdhy) - sc * PetscExpScalar(x[j][i]); in FormJacobianLocal()
462 PetscReal lambda, hx, hy, hxdhy, hydhx, sc; in NonlinearGS() local
481 sc = hx * hy * lambda; in NonlinearGS()
529 F = uxx + uyy - sc * eu - bij; in NonlinearGS()
531 J = 2.0 * (hydhx + hxdhy) - sc * eu; in NonlinearGS()
/petsc/src/binding/petsc4py/demo/legacy/wrap-f2py/
H A DBratu2D.F9096 PetscReal hx, hy, hxdhy, hydhx, sc, one, two
103 sc = hx*hy
117 f(i, j) = uxx + uyy - lambda*exp(u)*sc
135 PetscReal hx, hy, hxdhy, hydhx, sc, v(5), one, two
143 sc = hx*hy
160 v(3) = two*(hydhx + hxdhy) - lambda*exp(x(i, j))*sc
/petsc/src/binding/petsc4py/demo/legacy/wrap-swig/
H A DBratu3D.c85 PetscReal two = 2.0,lambda,hx,hy,hz,hxhzdhy,hyhzdhx,hxhydhz,sc; in FormFunction() local
95 sc = hx*hy*hz*lambda; in FormFunction()
143 f[k][j][i] = u_xx + u_yy + u_zz - sc*PetscExpScalar(u); in FormFunction()
162 PetscReal lambda,hx,hy,hz,hxhzdhy,hyhzdhx,hxhydhz,sc; in FormJacobian() local
173 sc = hx*hy*hz*lambda; in FormJacobian()
227 …v[3] = 2.0*(hyhzdhx+hxhzdhy+hxhydhz)-sc*PetscExpScalar(x[k][j][i]);col[3].k=row.k;col[3].j=row.j;c… in FormJacobian()
/petsc/src/binding/petsc4py/demo/legacy/wrap-cython/
H A DBratu3Dimpl.c86 PetscReal two = 2.0,lambda,hx,hy,hz,hxhzdhy,hyhzdhx,hxhydhz,sc; in FormFunction() local
96 sc = hx*hy*hz*lambda; in FormFunction()
147 f[k][j][i] = u_xx + u_yy + u_zz - sc*PetscExpScalar(u); in FormFunction()
166 PetscReal lambda,hx,hy,hz,hxhzdhy,hyhzdhx,hxhydhz,sc; in FormJacobian() local
177 sc = hx*hy*hz*lambda; in FormJacobian()
234 …v[3] = 2.0*(hyhzdhx+hxhzdhy+hxhydhz)-sc*PetscExpScalar(x[k][j][i]);col[3].k=row.k;col[3].j=row.j;c… in FormJacobian()
/petsc/src/ksp/ksp/tutorials/
H A Dex14f.F90152 PetscReal hy, hxdhy, hydhx, sc
162 sc = hx*hy*lambda
200 ff(rowf) = uxx + uyy - sc*exp(u)
239 PetscScalar hydhx, sc
250 sc = hx*hy
301 v(3) = two*(hydhx + hxdhy) - sc*lambda*exp(xx(row))
/petsc/src/sys/classes/draw/interface/
H A Ddtext.c119 PetscErrorCode PetscDrawStringBoxed(PetscDraw draw, PetscReal sxl, PetscReal syl, int sc, int bc, c… in PetscDrawStringBoxed() argument
131 PetscUseTypeMethod(draw, boxedstring, sxl, syl, sc, bc, text, w, h); in PetscDrawStringBoxed()
162 …for (i = 0; i < cnt; i++) PetscCall(PetscDrawString(draw, left + tw, top - (1.5 + i) * th, sc, arr… in PetscDrawStringBoxed()
/petsc/src/snes/tests/
H A Dex1f.F90254 PetscScalar hxdhy, hydhx, sc
263 sc = hx*hy*lambda
277 f(i, j) = uxx + uyy - sc*exp(u)
374 PetscScalar hxdhy, hydhx, sc, v(5)
384 sc = hx*hy
404 v(3) = two*(hydhx + hxdhy) - sc*lambda*exp(x(i, j))
H A Dex1.c372 PetscScalar ut, ub, ul, ur, u, uxx, uyy, sc, *f; in FormFunction() local
381 sc = hx * hy; in FormFunction()
408 f[row] = uxx + uyy - sc * lambda * PetscExpScalar(u); in FormFunction()
437 PetscScalar two = 2.0, one = 1.0, lambda, v[5], sc; in FormJacobian() local
447 sc = hx * hy; in FormJacobian()
470 v[2] = two * (hydhx + hxdhy) - sc * lambda * PetscExpScalar(x[row]); in FormJacobian()
/petsc/src/ksp/ksp/tests/
H A Dex14.c344 PetscReal two = 2.0, one = 1.0, lambda, hx, hy, hxdhy, hydhx, sc; in ComputeFunction() local
353 sc = hx * hy * lambda; in ComputeFunction()
392 f[row] = uxx + uyy - sc * PetscExpScalar(u); in ComputeFunction()
428 PetscScalar two = 2.0, one = 1.0, lambda, v[5], hx, hy, hxdhy, hydhx, sc, *x; in ComputeJacobian() local
436 sc = hx * hy; in ComputeJacobian()
493 v[2] = two * (hydhx + hxdhy) - sc * lambda * PetscExpScalar(x[row]); in ComputeJacobian()
/petsc/src/dm/impls/plex/tests/
H A Dex56.c216 VecScatter sc; in VertexCoordinatesToAll() local
238 PetscCall(VecScatterCreateToAll(coords, &sc, &allCoords_)); in VertexCoordinatesToAll()
239 PetscCall(VecScatterBegin(sc, coords, allCoords_, INSERT_VALUES, SCATTER_FORWARD)); in VertexCoordinatesToAll()
240 PetscCall(VecScatterEnd(sc, coords, allCoords_, INSERT_VALUES, SCATTER_FORWARD)); in VertexCoordinatesToAll()
241 PetscCall(VecScatterDestroy(&sc)); in VertexCoordinatesToAll()

12