Actual source code: adaptnone.c
petsc-3.13.6 2020-09-29
1: #include <petsc/private/tsimpl.h>
3: static PetscErrorCode TSAdaptChoose_None(TSAdapt adapt,TS ts,PetscReal h,PetscInt *next_sc,PetscReal *next_h,PetscBool *accept,PetscReal *wlte,PetscReal *wltea,PetscReal *wlter)
4: {
7: *accept = PETSC_TRUE;
8: *next_sc = 0; /* Reuse the same order scheme */
9: *next_h = h; /* Reuse the old step */
10: *wlte = -1; /* Weighted local truncation error was not evaluated */
11: *wltea = -1; /* Weighted absolute local truncation error was not evaluated */
12: *wlter = -1; /* Weighted relative local truncation error was not evaluated */
13: return(0);
14: }
16: /*MC
17: TSADAPTNONE - Time stepping controller that always accepts the current step and does not change it
19: Level: intermediate
21: .seealso: TS, TSAdapt, TSSetAdapt()
22: M*/
23: PETSC_EXTERN PetscErrorCode TSAdaptCreate_None(TSAdapt adapt)
24: {
27: adapt->ops->choose = TSAdaptChoose_None;
28: return(0);
29: }