# PCBDDCSetDivergenceMat
Sets the linear operator representing \int_\Omega \div {\bf u} \cdot p dx 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCBDDCSetDivergenceMat(PC pc, Mat divudotp, PetscBool trans, IS vl2l)
```
Collective


## Input Parameters

- ***pc -*** the preconditioning context
- ***divudotp -*** the matrix (must be of type `MATIS`)
- ***trans -*** if trans if false (resp. true), then pressures are in the test (trial) space and velocities are in the trial (test) space.
- ***vl2l -*** optional index set describing the local (wrt the local matrix in divudotp) to local (wrt the local matrix
in the preconditioning matrix) map for the velocities





## Notes
This auxiliary matrix is used to compute quadrature weights representing the net-flux across subdomain boundaries

If vl2l is NULL, the local ordering for velocities in divudotp should match that of the preconditioning matrix


## See Also
 `PCBDDC`, `PCBDDCSetDiscreteGradient()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bddc/bddc.c.html#PCBDDCSetDivergenceMat">src/ksp/pc/impls/bddc/bddc.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex43.c.html">src/ksp/ksp/tutorials/ex43.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bddc/bddc.c.html#PCBDDCSetDivergenceMat_BDDC">PCBDDCSetDivergenceMat_BDDC in src/ksp/pc/impls/bddc/bddc.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/bddc/bddc.c)


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