PetscDSSetExactSolution#

Set the pointwise exact solution function for a given test field

Synopsis#

#include "petscds.h" 
PetscErrorCode PetscDSSetExactSolution(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 - solution function for the test fields

  • ctx - solution context or NULL

Calling sequence for solution functions#

  sol(PetscInt dim, PetscReal t, const PetscReal x[], PetscInt Nc, PetscScalar u[], void *ctx)
  • 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, PetscDSGetExactSolution()

Level#

intermediate

Location#

src/dm/dt/interface/dtds.c

Examples#

src/snes/tutorials/ex12.c.html
src/snes/tutorials/ex13.c.html
src/snes/tutorials/ex17.c.html
src/snes/tutorials/ex20.c.html
src/snes/tutorials/ex23.c.html
src/snes/tutorials/ex24.c.html
src/snes/tutorials/ex26.c.html
src/snes/tutorials/ex36.c.html
src/snes/tutorials/ex62.c.html
src/snes/tutorials/ex69.c.html
src/snes/tutorials/ex71.c.html


Edit on GitLab

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