torch_harmonics.quadrature.lobatto_weights#

torch_harmonics.quadrature.lobatto_weights(n, a=-1.0, b=1.0, tol=1e-16, maxiter=100)[source]#

Helper routine which returns the Legendre-Gauss-Lobatto nodes and weights on the interval [a, b]

Parameters:
  • n (int) – Number of quadrature nodes

  • a (Optional[float]) – Lower bound of the interval

  • b (Optional[float]) – Upper bound of the interval

  • tol (Optional[float]) – Tolerance for the iteration

  • maxiter (Optional[int]) – Maximum number of iterations

Returns:

  • tlg (torch.Tensor) – Tensor of quadrature nodes

  • wlg (torch.Tensor) – Tensor of quadrature weights

Return type:

Tuple[Tensor, Tensor]