Skip to main content
`Ctrl`+`K`

# PetscDSSetBdResidual

Get the pointwise boundary residual function for a given test field

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscDSSetBdResidual(PetscDS ds, PetscInt f, PetscBdPointFn *f0, PetscBdPointFn *f1)

Not Collective

## Input Parameters

- ds - The `PetscDS`

- f - The test field number

- f0 - boundary integrand for the test function term, see `PetscBdPointFn`

- f1 - boundary integrand for the test function gradient term, see `PetscBdPointFn`

## Note

We are using a first order FEM model for the weak form:

\[ \int_\Gamma \phi {\vec f}_0(u, u_t, \nabla u, x, t) \cdot \hat n + \nabla\phi \cdot {\overleftrightarrow f}_1(u, u_t, \nabla u, x, t) \cdot \hat n \]

## See Also

`PetscDS`, `PetscBdPointFn`, `PetscDSGetBdResidual()`

## Level

intermediate

## Location

src/dm/dt/interface/dtds.c

## Examples

src/ts/tutorials/ex53.c

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