|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
The N-point Gauss-Legendre rule on [-1, 1], exact for polynomials of degree at most 2N - 1. More...
#include <GaussLegendre.hpp>
Public Types | |
| using | value_type = Scalar |
Static Public Member Functions | |
| static constexpr Kokkos::Array< Scalar, N > | nodes () |
| The N nodes in ascending order. Node N - 1 - i is minus node i. | |
| static constexpr Kokkos::Array< Scalar, N > | weights () |
| The N weights, in the order of nodes(). | |
| template<class Function> | |
| static constexpr auto | integrate (const Function &f) |
| sum_i w_i f(x_i), approximating the integral of f over [-1, 1]. | |
Static Public Attributes | |
| static constexpr unsigned | num_points = N |
The nodes and weights are correctly rounded to Scalar and computed by the compiler, so every member is a constant expression and works on the device. Like Boost's rule, it integrates on [-1, 1]; map other intervals affinely.
| using mundy::GaussLegendre< Scalar, N >::value_type = Scalar |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
staticconstexpr |