Lines Matching refs:Ctx
146 AppCtx *Ctx = (AppCtx *)ctx; in EventFunction() local
151 if (Ctx->rank == 0) gval[n++] = PetscSinReal(Ctx->pi * t); in EventFunction()
160 AppCtx *Ctx = (AppCtx *)ctx; in Postevent() local
163 if (Ctx->flg) { in Postevent()
164 PetscCallBack("EventFunction", EventFunction(ts, t, U, Ctx->fvals, ctx)); in Postevent()
165 …LD, "[%d] At t = %20.16g : %" PetscInt_FMT " events triggered, fvalues =", Ctx->rank, (double)t, n… in Postevent()
166 …; j++) PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "\t%g", (double)Ctx->fvals[evs_zero[j]]… in Postevent()
171 if (Ctx->cnt + nev_zero < MAX_NEV) in Postevent()
172 …for (PetscInt i = 0; i < nev_zero; i++) Ctx->evres[Ctx->cnt++] = t; // save the repeating zeros se… in Postevent()
175 Ctx->postcnt++; // sync in Postevent()
176 if (Ctx->dtpost > 0) { in Postevent()
177 if (Ctx->postcnt % 2 == 0) PetscCall(TSSetPostEventStep(ts, Ctx->dtpost)); in Postevent()
182 if (Ctx->restart) PetscCall(TSRestartStep(ts)); in Postevent()