#pragma once // Gaussian quadrature schemes for the interval [0,1] of node count p, 1 <= p <= 100. #include #include #include template struct GLIntegrator { static_assert(std::is_floating_point_v); static constexpr int pMax = 100; // Corresponding to the degree p Gaussian quadrature scheme for the interval [0,1], position of node i, 0 <= i < p. static inline constexpr T x(int p, int i) { assert(1 <= p && p <= pMax && 0 <= i && i < p); return data[p * (p - 1) + i]; } // Corresponding to the degree p Gaussian quadrature scheme for the interval [0,1], weight of node i, 0 <= i < p. static inline constexpr T w(int p, int i) { assert(1 <= p && p <= pMax && 0 <= i && i < p); return data[p * p + i]; } static constexpr std::array data = { // clang-format off #include "data_cache/GL_weights.hpp" // clang-format on }; };