Actual source code: adaptnone.c

  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: {
  5:   *accept  = PETSC_TRUE;
  6:   *next_sc = 0;                 /* Reuse the same order scheme */
  7:   *next_h  = h;                 /* Reuse the old step */
  8:   *wlte    = -1;                /* Weighted local truncation error was not evaluated */
  9:   *wltea   = -1;                /* Weighted absolute local truncation error was not evaluated */
 10:   *wlter   = -1;                /* Weighted relative local truncation error was not evaluated */
 11:   return 0;
 12: }

 14: /*MC
 15:    TSADAPTNONE - Time stepping controller that always accepts the current step and does not change it

 17:    Level: intermediate

 19: .seealso: TS, TSAdapt, TSAdaptChoose()
 20: M*/
 21: PETSC_EXTERN PetscErrorCode TSAdaptCreate_None(TSAdapt adapt)
 22: {
 23:   adapt->ops->choose = TSAdaptChoose_None;
 24:   return 0;
 25: }