:orphan:
# PetscQuadratureSetData
Sets the data defining the quadrature 
## Synopsis
```
#include "petscdt.h" 
PetscErrorCode PetscQuadratureSetData(PetscQuadrature q, PetscInt dim, PetscInt Nc, PetscInt npoints, const PetscReal points[], const PetscReal weights[])
```
Not Collective


## Input Parameters

- ***q  -*** The `PetscQuadrature` object
- ***dim -*** The spatial dimension
- ***Nc -*** The number of components
- ***npoints -*** The number of quadrature points
- ***points -*** The coordinates of each quadrature point
- ***weights -*** The weight of each quadrature point





## Note
This routine owns the references to points and weights, so they must be allocated using `PetscMalloc()` and the user should not free them.


## See Also
 `PetscQuadrature`, `PetscQuadratureCreate()`, `PetscQuadratureGetData()`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/interface/dt.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)  
