:orphan:
# PetscDTGaussLobattoLegendreQuadrature
creates a set of the locations and weights of the Gauss-Lobatto-Legendre nodes of a given size on the domain [-1,1] 
## Synopsis
```
#include "petscdt.h" 
PetscErrorCode PetscDTGaussLobattoLegendreQuadrature(PetscInt npoints, PetscGaussLobattoLegendreCreateType type, PetscReal *x, PetscReal *w)
```
Not Collective


## Input Parameters

- ***n -*** number of grid nodes
- ***type -*** `PETSCGAUSSLOBATTOLEGENDRE_VIA_LINEAR_ALGEBRA` or `PETSCGAUSSLOBATTOLEGENDRE_VIA_NEWTON`



## Output Parameters

- ***x -*** quadrature points
- ***w -*** quadrature weights





## Notes
For n > 30  the Newton approach computes duplicate (incorrect) values for some nodes because the initial guess is apparently not
close enough to the desired solution

These are useful for implementing spectral methods based on Gauss-Lobatto-Legendre (GLL) nodes

See  https://epubs.siam.org/doi/abs/10.1137/110855442  https://epubs.siam.org/doi/abs/10.1137/120889873 for better ways to compute GLL nodes


## See Also
 `PetscDTGaussQuadrature()`, `PetscGaussLobattoLegendreCreateType`


## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex68.c.html">src/ksp/ksp/tutorials/ex68.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex69.c.html">src/ksp/ksp/tutorials/ex69.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/unconstrained/tutorials/burgers_spectral.c.html">src/tao/unconstrained/tutorials/burgers_spectral.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/unconstrained/tutorials/spectraladjointassimilation.c.html">src/tao/unconstrained/tutorials/spectraladjointassimilation.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex50.c.html">src/ts/tutorials/ex50.c</A><BR>


---
[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)  
