|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
The N-point Clenshaw-Curtis rule on [-1, 1], exact for polynomials of degree at most N - 1 (N for odd N). More...
#include <ClenshawCurtis.hpp>
Public Types | |
| using | value_type = Scalar |
Static Public Member Functions | |
| static constexpr Kokkos::Array< Scalar, N > | nodes () |
| The N nodes in ascending order, from -1 to 1. 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 GaussLegendre, it integrates on [-1, 1]; map other intervals affinely.
| using mundy::ClenshawCurtis< Scalar, N >::value_type = Scalar |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
staticconstexpr |