Lines Matching refs:Ctx
147 AppCtx *Ctx = (AppCtx *)ctx; in EventFunction() local
152 if (Ctx->rank == 0) { in EventFunction()
158 if (Ctx->rank == Ctx->size - 1) { in EventFunction()
170 AppCtx *Ctx = (AppCtx *)ctx; in Postevent() local
173 if (Ctx->flg) { in Postevent()
174 PetscCallBack("EventFunction", EventFunction(ts, t, U, Ctx->fvals, ctx)); in Postevent()
175 …LD, "[%d] At t = %20.16g : %" PetscInt_FMT " events triggered, fvalues =", Ctx->rank, (double)t, n… in Postevent()
176 …; j++) PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "\t%g", (double)Ctx->fvals[evs_zero[j]]… in Postevent()
181 if (Ctx->cnt + nev_zero < MAX_NEV) in Postevent()
182 …for (PetscInt i = 0; i < nev_zero; i++) Ctx->evres[Ctx->cnt++] = t; // save the repeating zeros se… in Postevent()
185 Ctx->postcnt++; // sync in Postevent()
186 if (Ctx->dtpost > 0) { in Postevent()
187 if (Ctx->postcnt % 2 == 0) PetscCall(TSSetPostEventStep(ts, Ctx->dtpost)); in Postevent()
192 if (Ctx->restart) PetscCall(TSRestartStep(ts)); in Postevent()