Skip to main content
`Ctrl`+`K`

# PetscDSSetExactSolution

Set the pointwise exact solution function for a given test field

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscDSSetExactSolution(PetscDS prob, PetscInt f, PetscPointExactSolutionFn *sol, PetscCtx ctx)

Not Collective

## Input Parameters

- prob - The `PetscDS`

- f - The test field number

- sol - solution function for the test fields, see `PetscPointExactSolutionFn`

- ctx - solution context or `NULL`

## See Also

`PetscDS`, `PetscPointExactSolutionFn`, `PetscDSGetExactSolution()`

## Level

intermediate

## Location

src/dm/dt/interface/dtds.c

## Examples

src/snes/tutorials/ex27.c
src/snes/tutorials/ex20.c
src/snes/tutorials/ex24.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex26.c
src/snes/tutorials/ex13.c
src/snes/tutorials/ex36.c
src/snes/tutorials/ex34.c
src/snes/tutorials/ex12.c
src/snes/tutorials/ex17.c

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