PetscDSSetUpperBound — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscDSSetUpperBound

Set the pointwise upper bound function for a given field

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscDSSetUpperBound(PetscDS ds, PetscInt f, PetscErrorCode (*ub)(PetscInt dim, PetscReal t, const PetscReal x[], PetscInt Nc, PetscScalar u[], void *ctx), void *ctx)

Not Collective

## Input Parameters

- ds - The `PetscDS`

- f - The field number

- ub - solution function for the test fields

- ctx - solution context or `NULL`

## Calling sequence of `ub`

- dim - the coordinate dimension

- t - current time

- x - coordinates of the current point

- Nc - the number of field components

- u - the upper bound evaluated at the current point

- ctx - a user context

## See Also

`PetscDS`, `PetscDSGetUpperBound()`, `PetscDSGetLowerBound()`, `PetscDSGetExactSolution()`

## Level

intermediate

## Location

src/dm/dt/interface/dtds.c

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