PETSc version 3.17.4
Fix/Edit manual page

# TSDiscreteGradient

The Discrete Gradient integrator is a timestepper for hamiltonian systems designed to conserve the first integral (energy), but also has the property for some systems of monotonicity in a functional.

### Synopsis

    PETSC_EXTERN PetscErrorCode TSDiscGradSetFormulation(TS, PetscErrorCode(*)(TS, PetscReal, Vec, Mat, void *), PetscErrorCode(*)(TS, PetscReal, Vec, PetscScalar *, void *), PetscErrorCode(*)(TS, PetscReal, Vec, Vec, void *), void *);
    PETSC_EXTERN PetscErrorCode TSDiscGradIsGonzalez(TS,PetscBool*);
    PETSC_EXTERN PetscErrorCode TSDiscGradUseGonzalez(TS,PetscBool);

.seealso: TS, TSDISCGRAD, TSDiscGradSetFormulation(), TSDiscGradGetFormulation

### Level

beginner

### Location

src/ts/../../include/petscts.h
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages