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
7
#include "
quadrature/quadrature_base.h
"
8
namespace
hummingbird
{
9
10
/**
11
* @brief Defines a Gauss-Legendre quadrature set on the interval [-1,1]
12
*
13
*/
14
class
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_
hummingbird::GaussLegendre::GaussLegendre
GaussLegendre(const unsigned int n_points)
Construct a new GaussLegendre object.
Definition
gauss_legendre.cc:6
hummingbird::GaussLegendre::ComputeWeight
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.
Definition
gauss_legendre.cc:11
hummingbird::QuadratureBase< double >::QuadratureBase
QuadratureBase()=default
hummingbird::QuadratureBase< double >::n_points
size_t n_points() const
Definition
quadrature_base.h:88
hummingbird
Definition
bank_base.h:13
quadrature_base.h
include
quadrature
gauss_legendre.h
Generated by
1.17.0