Skip to main content
`Ctrl`+`K`

# PetscDSSetExactSolutionTimeDerivative

Set the pointwise time derivative of the exact solution function for a given test field

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscDSSetExactSolutionTimeDerivative(PetscDS prob, PetscInt f, PetscErrorCode (*sol)(PetscInt dim, PetscReal t, const PetscReal x[], PetscInt Nc, PetscScalar u[], void *ctx), void *ctx)

Not Collective

## Input Parameters

- prob - The `PetscDS`

- f - The test field number

- sol - time derivative of the solution function for the test fields

- ctx - time derivative of the solution context or `NULL`

## Calling sequence of `sol`

- dim - the spatial dimension

- t - current time

- x - coordinates of the current point

- Nc - the number of field components

- u - the solution field evaluated at the current point

- ctx - a user context

## See Also

`PetscDS`, `PetscDSGetExactSolutionTimeDerivative()`, `PetscDSSetExactSolution()`

## Level

intermediate

## Location

src/dm/dt/interface/dtds.c

## Examples

src/ts/tutorials/ex76.c
src/ts/tutorials/ex53.c
src/ts/tutorials/ex45.c
src/ts/tutorials/ex77.c

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