Actual source code: adaptnone.c

petsc-3.4.5 2014-06-29
  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: }

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

 21:    Level: intermediate

 23: .seealso: TS, TSAdapt, TSSetAdapt()
 24: M*/
 25: PETSC_EXTERN PetscErrorCode TSAdaptCreate_None(TSAdapt adapt)
 26: {

 29:   adapt->ops->choose = TSAdaptChoose_None;
 30:   return(0);
 31: }