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> 
typedef enum {
  TS_DG_GONZALEZ,
  TS_DG_AVERAGE,
  TS_DG_NONE
} TSDGType;
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 TSDiscGradSetType(TS, TSDGType);
PETSC_EXTERN PetscErrorCode TSDiscGradGetType(TS, TSDGType *);

See Also#

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

Level#

beginner

Location#

include/petscts.h


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