xref: /petsc/src/ts/adapt/impls/none/adaptnone.c (revision e6e75211d226c622f451867f53ce5d558649ff4f)
1 #include <petsc/private/tsimpl.h> /*I "petscts.h" I*/
2 
3 #undef __FUNCT__
4 #define __FUNCT__ "TSAdaptChoose_None"
5 static PetscErrorCode TSAdaptChoose_None(TSAdapt adapt,TS ts,PetscReal h,PetscInt *next_sc,PetscReal *next_h,PetscBool *accept,PetscReal *wlte)
6 {
7 
8   PetscFunctionBegin;
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   PetscFunctionReturn(0);
14 }
15 
16 #undef __FUNCT__
17 #define __FUNCT__ "TSAdaptCreate_None"
18 /*MC
19    TSADAPTNONE - Time stepping controller that always accepts the current step and does not change it
20 
21    Level: intermediate
22 
23 .seealso: TS, TSAdapt, TSSetAdapt()
24 M*/
25 PETSC_EXTERN PetscErrorCode TSAdaptCreate_None(TSAdapt adapt)
26 {
27 
28   PetscFunctionBegin;
29   adapt->ops->choose = TSAdaptChoose_None;
30   PetscFunctionReturn(0);
31 }
32