PetscDSSetResidual#
Set the pointwise residual function for a given test field
Synopsis#
#include "petscds.h"
PetscErrorCode PetscDSSetResidual(PetscDS ds, PetscInt f, PetscPointFn *f0, PetscPointFn *f1)
Not Collective
Input Parameters#
ds - The
PetscDS
f - The test field number
f0 - integrand for the test function term, see
PetscPointFn
f1 - integrand for the test function gradient term, see
PetscPointFn
Note#
We are using a first order FEM model for the weak form: \( \int_\Omega \phi f_0(u, u_t, \nabla u, x, t) + \nabla\phi \cdot {\vec f}_1(u, u_t, \nabla u, x, t)\)
See Also#
Level#
intermediate
Location#
Examples#
src/snes/tutorials/ex8.c
src/snes/tutorials/ex64.c
src/snes/tutorials/ex62.c
src/snes/tutorials/ex26.c
src/snes/tutorials/ex17.c
src/snes/tutorials/ex71.c
src/snes/tutorials/ex36.c
src/snes/tutorials/ex63.c
src/snes/tutorials/ex13.c
src/snes/tutorials/ex12.c
Index of all DT routines
Table of Contents for all manual pages
Index of all manual pages