1: #include <petsc-private/tsimpl.h> /*I "petscts.h" I*/ 5: static PetscErrorCode TSAdaptChoose_None(TSAdapt adapt,TS ts,PetscReal h,PetscInt *next_sc,PetscReal *next_h,PetscBool *accept,PetscReal *wlte) 6: { 9: *accept = PETSC_TRUE; 10: *next_sc = 0; /* Reuse the same order scheme */ 11: *next_h = h; /* Reuse the old step */ 12: *wlte = -1; /* Weighted local truncation error was not evaluated */ 13: return(0); 14: } 16: EXTERN_C_BEGIN 19: /*MC 20: TSADAPTNONE - Time stepping controller that always accepts the current step and does not change it 22: Level: intermediate 24: .seealso: TS, TSAdapt, TSSetAdapt() 25: M*/ 26: PetscErrorCode TSAdaptCreate_None(TSAdapt adapt) 27: { 30: adapt->ops->choose = TSAdaptChoose_None; 31: return(0); 32: } 33: EXTERN_C_END