Lines Matching refs:Ctx
217 AppCtx *Ctx = (AppCtx *)ctx; in EventFunction() local
222 if (Ctx->rank == 0) { in EventFunction()
228 if (Ctx->rank == Ctx->size - 1) { in EventFunction()
234 if (Ctx->rank == 1 % Ctx->size) gval[n++] = PetscSinReal(Ctx->pi * t); in EventFunction()
243 AppCtx *Ctx = (AppCtx *)ctx; in Postevent() local
247 if (Ctx->flg) { in Postevent()
248 PetscCallBack("EventFunction", EventFunction(ts, t, U, Ctx->fvals, ctx)); in Postevent()
249 …LD, "[%d] At t = %20.16g : %" PetscInt_FMT " events triggered, fvalues =", Ctx->rank, (double)t, n… in Postevent()
250 …; j++) PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "\t%g", (double)Ctx->fvals[evs_zero[j]]… in Postevent()
255 if (Ctx->cnt + nev_zero < MAX_NEV) in Postevent()
256 …for (PetscInt i = 0; i < nev_zero; i++) Ctx->evres[Ctx->cnt++] = t; // save the repeating zeros se… in Postevent()
259 Ctx->postcnt++; // sync in Postevent()
260 if (Ctx->dtpost > 0) { in Postevent()
261 if (Ctx->postcnt % 2 == 0) PetscCall(TSSetPostEventStep(ts, Ctx->dtpost)); in Postevent()
267 … (PetscAbsReal(t - (PetscReal)6.0) < 0.01 && Ctx->dt2_at6 != -2) PetscCall(TSSetPostEventSecondSte… in Postevent()
270 if (PetscAbsReal(t - 7) < 0.01 && Ctx->mult7 != 1) { in Postevent()
271 PetscCallBack("Fill_mat", Fill_mat(0.2 * Ctx->mult7, Ctx->m, Ctx->A)); in Postevent()
272 PetscCall(TSSetRHSJacobian(ts, Ctx->A, Ctx->A, TSComputeRHSJacobianConstant, NULL)); in Postevent()
276 if (Ctx->restart || mat_changed) PetscCall(TSRestartStep(ts)); in Postevent()