:orphan:
# PetscDSGetBoundary
Gets a boundary condition to the model 
## Synopsis
```
#include "petscds.h" 
PetscErrorCode PetscDSGetBoundary(PetscDS ds, PetscInt bd, PetscWeakForm *wf, DMBoundaryConditionType *type, const char *name[], DMLabel *label, PetscInt *Nv, const PetscInt *values[], PetscInt *field, PetscInt *Nc, const PetscInt *comps[], void (**func)(void), void (**func_t)(void), void **ctx)
```

## Input Parameters

- ***ds          -*** The `PetscDS` object
- ***bd          -*** The BC number



## Output Parameters

- ***wf       -*** The `PetscWeakForm` holding the pointwise functions
- ***type     -*** The type of condition, e.g. `DM_BC_ESSENTIAL`/`DM_BC_ESSENTIAL_FIELD` (Dirichlet), or `DM_BC_NATURAL` (Neumann)
- ***name     -*** The BC name
- ***label    -*** The label defining constrained points
- ***Nv       -*** The number of `DMLabel` ids for constrained points
- ***values   -*** An array of ids for constrained points
- ***field    -*** The field to constrain
- ***Nc       -*** The number of constrained field components
- ***comps    -*** An array of constrained component numbers
- ***bcFunc   -*** A pointwise function giving boundary values
- ***bcFunc_t -*** A pointwise function giving the time derivative of the boundary values
- ***ctx      -*** An optional user context for bcFunc



## Options Database Keys

- ***-bc_<boundary name> <num> -*** Overrides the boundary ids
- ***-bc_<boundary name>_comp <num> -*** Overrides the boundary components





## See Also
 `PetscDS`, `PetscWeakForm`, `DMBoundaryConditionType`, `PetscDSAddBoundary()`, `DMLabel`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/interface/dtds.c.html#PetscDSGetBoundary">src/dm/dt/interface/dtds.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex12.c.html">src/snes/tutorials/ex12.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex17.c.html">src/snes/tutorials/ex17.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex24.c.html">src/snes/tutorials/ex24.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex56.c.html">src/snes/tutorials/ex56.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex71.c.html">src/snes/tutorials/ex71.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex77.c.html">src/snes/tutorials/ex77.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex53.c.html">src/ts/tutorials/ex53.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex76.c.html">src/ts/tutorials/ex76.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/interface/dtds.c)


[Index of all DT routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
