Searched refs:vtol (Results 1 – 6 of 6) sorted by relevance
| /petsc/src/ts/event/tests/ |
| H A D | ex5.c | 39 PetscReal vtol[MAX_NFUNC]; // vtol array, with extra storage member 45 …IInt rank, PetscMPIInt size, PetscReal tol0, PetscReal tolsin, PetscReal *vtol); // helper functio… 153 SetVtols(ctx.rank, ctx.size, 1e-8, 1e-8, ctx.vtol); in main() 154 PetscCall(TSSetEventTolerances(ts, PETSC_DECIDE, ctx.vtol)); in main() 233 …SetVtols(Ctx->rank, Ctx->size, 1e-8, 1e-26, Ctx->vtol); // for better resolution of sin-event at t… in Postevent() 234 PetscCall(TSSetEventTolerances(ts, PETSC_DECIDE, Ctx->vtol)); in Postevent() 237 SetVtols(Ctx->rank, Ctx->size, 1e-8, 1e-8, Ctx->vtol); // back to normal in Postevent() 238 PetscCall(TSSetEventTolerances(ts, PETSC_DECIDE, Ctx->vtol)); in Postevent() 246 …oid SetVtols(PetscMPIInt rank, PetscMPIInt size, PetscReal tol0, PetscReal tolsin, PetscReal *vtol) in SetVtols() argument 250 if (rank == (i + 3) % size) vtol[n++] = tol0; // pos-polynomials in SetVtols() [all …]
|
| H A D | ex3.c | 44 PetscReal vtol[MAX_NFUNC]; // vtol array, with extra storage member 127 ctx.vtol[n] = tol * 10; in main() 133 ctx.vtol[n] = tol * 10; in main() 139 ctx.vtol[n] = tol; in main() 150 PetscCall(TSSetEventTolerances(ts, tol, ctx.vtol)); in main() 229 …if (Ctx->flg) PetscCall(PetscPrintf(PETSC_COMM_SELF, "vtol for sin: %g -> ", (double)Ctx->vtol[n])… in Postevent() 230 Ctx->vtol[n] *= 4; in Postevent() 231 if (PetscAbsReal(t - (PetscReal)5.0) < 0.01) Ctx->vtol[n] /= 100; // one-off decrease in Postevent() 232 if (Ctx->flg) PetscCall(PetscPrintf(PETSC_COMM_SELF, "%g\n", (double)Ctx->vtol[n])); in Postevent() 235 PetscCall(TSSetEventTolerances(ts, 0, Ctx->vtol)); in Postevent()
|
| /petsc/src/ts/event/ |
| H A D | tsevent.c | 7 static inline void TSEventCalcSigns(PetscInt nev, const PetscReal *f, const PetscReal *vtol, PetscI… in TSEventCalcSigns() argument 10 if (PetscAbsReal(f[i]) < vtol[i]) sign[i] = 0; in TSEventCalcSigns() 30 …TSEventCalcSigns(event->nevents, event->fvalue_prev, event->vtol, event->fsign_prev); // by this t… in TSEventInitialize() 57 PetscCall(PetscFree((*event)->vtol)); in TSEventDestroy() 233 PetscErrorCode TSSetEventTolerances(TS ts, PetscReal tol, PetscReal vtol[]) in TSSetEventTolerances() argument 239 if (vtol) PetscAssertPointer(vtol, 3); in TSSetEventTolerances() 243 if (vtol) { in TSSetEventTolerances() 244 for (PetscInt i = 0; i < event->nevents; i++) event->vtol[i] = vtol[i]; in TSSetEventTolerances() 247 for (PetscInt i = 0; i < event->nevents; i++) event->vtol[i] = tol; in TSSetEventTolerances() 341 PetscCall(PetscMalloc1(nevents, &event->vtol)); in TSSetEventHandler() [all …]
|
| /petsc/src/binding/petsc4py/demo/legacy/ode/ |
| H A D | bouncing_ball.py | 86 ts.setEventTolerances(1e-6, vtol=[1e-9])
|
| /petsc/include/petsc/private/ |
| H A D | tsimpl.h | 495 …PetscReal *vtol; /* array… member
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | TS.pyx | 2312 …def setEventTolerances(self, tol: float | None = None, vtol: Sequence[float] | None = None) -> Non… 2323 vtol 2342 if vtol is not None: 2344 vtol = iarray_r(vtol, &ntolr, &vtolr)
|