TSDISCGRAD#

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#

#include <petscts.h> 
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 TSDiscGradGetFormulation(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);

See Also#

TS: Scalable ODE and DAE Solvers, TS, TSDiscGradSetFormulation(), TSDiscGradGetFormulation()`

Level#

beginner

Location#

include/petscts.h


Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages