hummingbird
Solving the self-adjoint angular flux transport equation using spectral elements on Cartesian geometry
Loading...
Searching...
No Matches
gauss_legendre.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// Copyright (c) 2026, Liam Pohlmann
3
4#ifndef HUMMINGBIRD_QUADRATURE_GAUSS_LEGENDRE_H_
5#define HUMMINGBIRD_QUADRATURE_GAUSS_LEGENDRE_H_
6
8namespace hummingbird {
9
10/**
11 * @brief Defines a Gauss-Legendre quadrature set on the interval [-1,1]
12 *
13 */
14class GaussLegendre : public QuadratureBase<double> {
15 public:
16 /**
17 * @brief Construct a new GaussLegendre object
18 *
19 * @param n_points Number of quadrature points to be created
20 */
21 GaussLegendre(const unsigned int n_points);
22
23 private:
24 /**
25 * @brief Compute the weight for abscissa value k for a n-th order
26 * Gauss-Legendre polynomial
27 *
28 * @param k Abscissa number
29 * @param n Order of Gauss-Legendre polynomial
30 * @return Weight corresponding to the k-th abscissa values
31 */
32 double ComputeWeight(const size_t k, const size_t n) override;
33};
34} // namespace hummingbird
35
36#endif // HUMMINGBIRD_QUADRATURE_GAUSS_LEGENDRE_H_
GaussLegendre(const unsigned int n_points)
Construct a new GaussLegendre object.
double ComputeWeight(const size_t k, const size_t n) override
Compute the weight for abscissa value k for a n-th order Gauss-Legendre polynomial.