smooth
A C++ library for Lie theory
|
Compile-time quadrature scheme generation. More...
#include <array>
#include <numbers>
#include <utility>
#include "basis.hpp"
#include "static_matrix.hpp"
Go to the source code of this file.
Functions | |
template<std::size_t K> | |
SMOOTH_BEGIN_NAMESPACE constexpr std::array< double, K > | cgr_nodes () |
Chebyshev-Gauss-Radau nodes on [-1, 1]. | |
template<std::size_t K, std::size_t I = 8> requires (K <= 40) | |
constexpr std::pair< std::array< double, K >, std::array< double, K > > | lgr_nodes () |
Legendre-Gauss-Radau (LGR) nodes and weights on [-1, 1]. | |
Compile-time quadrature scheme generation.
Definition in file quadrature.hpp.
|
constexpr |
Chebyshev-Gauss-Radau nodes on [-1, 1].
K | number of points to generate |
Definition at line 58 of file quadrature.hpp.
|
constexpr |
Legendre-Gauss-Radau (LGR) nodes and weights on [-1, 1].
K | number of points to generate |
I | number of Newton-Rhapson iterations |
LGR nodes xs are the K roots of
\[ p_{K-1)(t)} + p_K(t), \]
where $p_i$ are Legendre polynomials. This functions obtains the LGR nodes via a fixed number of Newton iterations, using the CGR points as initial guesses.
The weight ws[0] for node 0 is 2 / K^2, for the remaining nodes the weights ws[k] are
\[ w_k = \frac{1}{(1 - x_k) [p_{K-1}(x_k)]^2} \]
Definition at line 88 of file quadrature.hpp.