Lines Matching refs:adapt
8 static PetscErrorCode TSAdaptChoose_GLEE(TSAdapt adapt, TS ts, PetscReal h, PetscInt *next_sc, Pets… in TSAdaptChoose_GLEE() argument
10 TSAdapt_GLEE *glee = (TSAdapt_GLEE *)adapt->data; in TSAdaptChoose_GLEE()
18 safety = adapt->safety; in TSAdaptChoose_GLEE()
20 order = adapt->candidates.order[0]; in TSAdaptChoose_GLEE()
26 if (!glee->Y && adapt->glee_use_local) { in TSAdaptChoose_GLEE()
34 …if (adapt->glee_use_local) PetscCall(VecAXPY(E, -1.0, glee->Y)); /* local error = current error - … in TSAdaptChoose_GLEE()
37 PetscCall(TSErrorWeightedENorm(ts, E, X, X, adapt->wnormtype, &enorm, &enorma, &enormr)); in TSAdaptChoose_GLEE()
45 PetscCall(TSErrorWeightedNorm(ts, X, Y, adapt->wnormtype, &enorm, &enorma, &enormr)); in TSAdaptChoose_GLEE()
58 …if (!*accept) safety *= adapt->reject_safety; /* The last attempt also failed, shorten more aggres… in TSAdaptChoose_GLEE()
59 if (h < (1 + PETSC_SQRT_MACHINE_EPSILON) * adapt->dt_min) { in TSAdaptChoose_GLEE()
60 …PetscCall(PetscInfo(adapt, "Estimated scaled truncation error [combined, absolute, relative]] [%g,… in TSAdaptChoose_GLEE()
62 } else if (adapt->always_accept) { in TSAdaptChoose_GLEE()
63 …PetscCall(PetscInfo(adapt, "Estimated scaled truncation error [combined, absolute, relative]] [%g,… in TSAdaptChoose_GLEE()
66 …PetscCall(PetscInfo(adapt, "Estimated scaled truncation error [combined, absolute, relative]] [%g,… in TSAdaptChoose_GLEE()
70 …PetscCall(PetscInfo(adapt, "Estimated scaled truncation error [combined, absolute, relative] [%g, … in TSAdaptChoose_GLEE()
75 if (*accept == PETSC_TRUE && adapt->glee_use_local) { in TSAdaptChoose_GLEE()
92 h_lte = h * PetscClipInterval(hfac_lte, adapt->clip[0], adapt->clip[1]); in TSAdaptChoose_GLEE()
93 *next_h = PetscClipInterval(h_lte, adapt->dt_min, adapt->dt_max); in TSAdaptChoose_GLEE()
106 h_lte = h * PetscClipInterval(hfac_lte, adapt->clip[0], adapt->clip[1]); in TSAdaptChoose_GLEE()
107 *next_h = PetscClipInterval(h_lte, adapt->dt_min, adapt->dt_max); in TSAdaptChoose_GLEE()
115 static PetscErrorCode TSAdaptReset_GLEE(TSAdapt adapt) in TSAdaptReset_GLEE() argument
117 TSAdapt_GLEE *glee = (TSAdapt_GLEE *)adapt->data; in TSAdaptReset_GLEE()
124 static PetscErrorCode TSAdaptDestroy_GLEE(TSAdapt adapt) in TSAdaptDestroy_GLEE() argument
127 PetscCall(TSAdaptReset_GLEE(adapt)); in TSAdaptDestroy_GLEE()
128 PetscCall(PetscFree(adapt->data)); in TSAdaptDestroy_GLEE()
139 PETSC_EXTERN PetscErrorCode TSAdaptCreate_GLEE(TSAdapt adapt) in TSAdaptCreate_GLEE() argument
145 adapt->data = (void *)glee; in TSAdaptCreate_GLEE()
146 adapt->ops->choose = TSAdaptChoose_GLEE; in TSAdaptCreate_GLEE()
147 adapt->ops->reset = TSAdaptReset_GLEE; in TSAdaptCreate_GLEE()
148 adapt->ops->destroy = TSAdaptDestroy_GLEE; in TSAdaptCreate_GLEE()