Lines Matching refs:adapt
4 static PetscErrorCode TSAdaptChoose_Basic(TSAdapt adapt, TS ts, PetscReal h, PetscInt *next_sc, Pet… in TSAdaptChoose_Basic() argument
11 PetscReal safety = adapt->safety; in TSAdaptChoose_Basic()
20 PetscCall(TSEvaluateWLTE(ts, adapt->wnormtype, &order, &enorm)); in TSAdaptChoose_Basic()
21 …PetscCheck(enorm < 0 || order >= 1, PetscObjectComm((PetscObject)adapt), PETSC_ERR_ARG_OUTOFRANGE,… in TSAdaptChoose_Basic()
23 …PetscCheck(adapt->candidates.n >= 1, PetscObjectComm((PetscObject)adapt), PETSC_ERR_ARG_WRONGSTATE… in TSAdaptChoose_Basic()
24 …adapt->candidates.inuse_set, PetscObjectComm((PetscObject)adapt), PETSC_ERR_ARG_WRONGSTATE, "The c… in TSAdaptChoose_Basic()
25 order = adapt->candidates.order[0]; in TSAdaptChoose_Basic()
29 PetscCall(TSErrorWeightedNorm(ts, ts->vec_sol, Y, adapt->wnormtype, &enorm, &enorma, &enormr)); in TSAdaptChoose_Basic()
42 …if (!*accept) safety *= adapt->reject_safety; /* The last attempt also failed, shorten more aggres… in TSAdaptChoose_Basic()
43 if (h < (1 + PETSC_SQRT_MACHINE_EPSILON) * adapt->dt_min) { in TSAdaptChoose_Basic()
44 …PetscCall(PetscInfo(adapt, "Estimated scaled local truncation error %g, accepting because step siz… in TSAdaptChoose_Basic()
46 } else if (adapt->always_accept) { in TSAdaptChoose_Basic()
47 …PetscCall(PetscInfo(adapt, "Estimated scaled local truncation error %g, accepting step of size %g … in TSAdaptChoose_Basic()
50 …PetscCall(PetscInfo(adapt, "Estimated scaled local truncation error %g, rejecting step of size %g\… in TSAdaptChoose_Basic()
54 …PetscCall(PetscInfo(adapt, "Estimated scaled local truncation error %g, accepting step of size %g\… in TSAdaptChoose_Basic()
61 if (adapt->timestepjustdecreased) { in TSAdaptChoose_Basic()
63 adapt->timestepjustdecreased--; in TSAdaptChoose_Basic()
65 h_lte = h * PetscClipInterval(hfac_lte, adapt->clip[0], adapt->clip[1]); in TSAdaptChoose_Basic()
67 *next_h = PetscClipInterval(h_lte, adapt->dt_min, adapt->dt_max); in TSAdaptChoose_Basic()
79 PETSC_EXTERN PetscErrorCode TSAdaptCreate_Basic(TSAdapt adapt) in TSAdaptCreate_Basic() argument
82 adapt->ops->choose = TSAdaptChoose_Basic; in TSAdaptCreate_Basic()