Lines Matching refs:appctx

77   AppCtx         appctx;  in main()  local
91appctx.aijpc = PETSC_FALSE, adctx->no_an = PETSC_FALSE, adctx->sparse = PETSC_FALSE, adctx->sparse… in main()
93 PetscCall(PetscOptionsGetBool(NULL, NULL, "-aijpc", &appctx.aijpc, NULL)); in main()
98 appctx.D1 = 8.0e-5; in main()
99 appctx.D2 = 4.0e-5; in main()
100 appctx.gamma = .024; in main()
101 appctx.kappa = .06; in main()
102 appctx.adctx = adctx; in main()
129 PetscCall(TSSetRHSFunction(ts, NULL, RHSFunctionPassive, &appctx)); in main()
131 …ATSSetIFunctionLocal(da, INSERT_VALUES, (DMDATSIFunctionLocalFn *)IFunctionLocalPassive, &appctx)); in main()
143 PetscCall(RHSFunctionActive(ts, 1.0, x, r, &appctx)); in main()
145 PetscCall(IFunctionActive(ts, 1.0, x, xdot, r, &appctx)); in main()
212 PetscCall(TSSetRHSJacobian(ts, NULL, NULL, RHSJacobianAdolc, &appctx)); in main()
214 PetscCall(TSSetRHSJacobian(ts, NULL, NULL, RHSJacobianByHand, &appctx)); in main()
217 if (appctx.aijpc) { in main()
225 PetscCall(TSSetIJacobian(ts, A, B, IJacobianAdolc, &appctx)); in main()
227 PetscCall(TSSetIJacobian(ts, A, B, IJacobianByHand, &appctx)); in main()
233 PetscCall(TSSetIJacobian(ts, NULL, NULL, IJacobianAdolc, &appctx)); in main()
235 PetscCall(TSSetIJacobian(ts, NULL, NULL, IJacobianByHand, &appctx)); in main()
362 AppCtx *appctx = (AppCtx *)ptr; in IFunctionLocalPassive() local
388 … f[j][i].u = udot[j][i].u - appctx->D1 * (uxx + uyy) + uc * vc * vc - appctx->gamma * (1.0 - uc); in IFunctionLocalPassive()
389 …f[j][i].v = udot[j][i].v - appctx->D2 * (vxx + vyy) - uc * vc * vc + (appctx->gamma + appctx->kapp… in IFunctionLocalPassive()
398 AppCtx *appctx = (AppCtx *)ptr; in IFunctionActive() local
484 … f_a[j][i].u = udot[j][i].u - appctx->D1 * (uxx + uyy) + uc * vc * vc - appctx->gamma * (1.0 - uc); in IFunctionActive()
485 …f_a[j][i].v = udot[j][i].v - appctx->D2 * (vxx + vyy) - uc * vc * vc + (appctx->gamma + appctx->ka… in IFunctionActive()
528 AppCtx *appctx = (AppCtx *)ptr; in RHSFunctionPassive() local
580 f[j][i].u = appctx->D1 * (uxx + uyy) - uc * vc * vc + appctx->gamma * (1.0 - uc); in RHSFunctionPassive()
581 f[j][i].v = appctx->D2 * (vxx + vyy) + uc * vc * vc - (appctx->gamma + appctx->kappa) * vc; in RHSFunctionPassive()
608 AppCtx *appctx = (AppCtx *)ptr; in RHSFunctionActive() local
698 f_a[j][i].u = appctx->D1 * (uxx + uyy) - uc * vc * vc + appctx->gamma * (1.0 - uc); in RHSFunctionActive()
699 f_a[j][i].v = appctx->D2 * (vxx + vyy) + uc * vc * vc - (appctx->gamma + appctx->kappa) * vc; in RHSFunctionActive()
752 AppCtx *appctx = (AppCtx *)ctx; in IJacobianAdolc() local
776 PetscCall(PetscAdolcComputeIJacobianLocalIDMass(1, A, u_vec, a, appctx->adctx)); in IJacobianAdolc()
788 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in IJacobianByHand() local
859 entries[0] = -appctx->D1 * sy; in IJacobianByHand()
862 entries[1] = -appctx->D1 * sy; in IJacobianByHand()
865 entries[2] = -appctx->D1 * sx; in IJacobianByHand()
868 entries[3] = -appctx->D1 * sx; in IJacobianByHand()
871 entries[4] = 2.0 * appctx->D1 * (sx + sy) + vc * vc + appctx->gamma + a; in IJacobianByHand()
879 …if (appctx->aijpc) PetscCall(MatSetValuesStencil(B, 1, &rowstencil, 6, stencil, entries, INSERT_VA… in IJacobianByHand()
881 entries[0] = -appctx->D2 * sy; in IJacobianByHand()
883 entries[1] = -appctx->D2 * sy; in IJacobianByHand()
885 entries[2] = -appctx->D2 * sx; in IJacobianByHand()
887 entries[3] = -appctx->D2 * sx; in IJacobianByHand()
889 … entries[4] = 2.0 * appctx->D2 * (sx + sy) - 2.0 * uc * vc + appctx->gamma + appctx->kappa + a; in IJacobianByHand()
894 …if (appctx->aijpc) PetscCall(MatSetValuesStencil(B, 1, &rowstencil, 6, stencil, entries, INSERT_VA… in IJacobianByHand()
908 if (appctx->aijpc) { in IJacobianByHand()
918 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSJacobianByHand() local
990 entries[0] = appctx->D1 * sy; in RHSJacobianByHand()
993 entries[1] = appctx->D1 * sy; in RHSJacobianByHand()
996 entries[2] = appctx->D1 * sx; in RHSJacobianByHand()
999 entries[3] = appctx->D1 * sx; in RHSJacobianByHand()
1002 entries[4] = -2.0 * appctx->D1 * (sx + sy) - vc * vc - appctx->gamma; in RHSJacobianByHand()
1012 entries[0] = appctx->D2 * sy; in RHSJacobianByHand()
1014 entries[1] = appctx->D2 * sy; in RHSJacobianByHand()
1016 entries[2] = appctx->D2 * sx; in RHSJacobianByHand()
1018 entries[3] = appctx->D2 * sx; in RHSJacobianByHand()
1020 entries[4] = -2.0 * appctx->D2 * (sx + sy) + 2.0 * uc * vc - appctx->gamma - appctx->kappa; in RHSJacobianByHand()
1039 if (appctx->aijpc) { in RHSJacobianByHand()
1049 AppCtx *appctx = (AppCtx *)ctx; in RHSJacobianAdolc() local
1073 PetscCall(PetscAdolcComputeRHSJacobianLocal(1, A, u_vec, appctx->adctx)); in RHSJacobianAdolc()