Skip to main content
`Ctrl`+`K`

# TSDiscGradSetType

Sets discrete gradient formulation.

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSDiscGradSetType(TS ts, TSDGType dgtype)

Not Collective

## Input Parameters

- ts - timestepping context

- dgtype - Discrete gradient type <none, gonzalez, average>

## Options Database Key

- -ts_discgrad_type (gonzalez|average|none) - flag to choose discrete gradient type

## Notes

Without `dgtype` or with type `none`, the discrete gradients timestepper is just implicit midpoint.

## See Also

TS: Scalable ODE and DAE Solvers, `TSDISCGRAD`, `TSDGType`

## Level

intermediate

## Location

src/ts/impls/implicit/discgrad/tsdiscgrad.c

## Implementations

TSDiscGradSetType_DiscGrad() in src/ts/impls/implicit/discgrad/tsdiscgrad.c

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