Date: 2025-03-29T05:58:48+00:00

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

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

     18:    Level: intermediate

     20: .seealso: [](ch_ts), `TS`, `TSAdapt`, `TSAdaptChoose()`, `TSAdaptType`
     21: M*/
     22: PETSC_EXTERN PetscErrorCode TSAdaptCreate_None(TSAdapt adapt)
     23: {
     24:   PetscFunctionBegin;
     25:   adapt->ops->choose = TSAdaptChoose_None;
     26:   PetscFunctionReturn(PETSC_SUCCESS);
     27: }