PETSc version 3.16.5
Fix/Edit manual page

# DMComputeExactSolution

Compute the exact solution for a given DM, using the PetscDS information.

### Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMComputeExactSolution(DM dm, PetscReal time, Vec u, Vec u_t)

Collective on DM

### Input Parameters

| dm | - The DM
| time | - The time

### Output Parameters

| u | - The vector will be filled with exact solution values, or NULL
| u_t | - The vector will be filled with the time derivative of exact solution values, or NULL

Note: The user must call PetscDSSetExactSolution() beforehand

### See Also

PetscDSSetExactSolution()

### Level

developer

### Location

src/dm/interface/dm.c

### Examples

src/ts/tutorials/ex45.c.html
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages