14 template<
typename precision>
18 if (this->num_nodes < 2) {
19 throw invalid_argument(
"Gauss-Radau quadrature requires at least two quadrature nodes.");
25 template<
typename precision>
31 template<
typename precision>
37 template<
typename precision>
40 this->nodes = vector<precision>(this->num_nodes, precision(0.0));
44 for (
size_t i = 0; i < this->num_nodes; i++) {
47 auto roots = l.roots();
48 for (
size_t j = 1; j < this->num_nodes; j++) {
49 this->nodes[j - 1] = 0.5 * (1.0 - roots[this->num_nodes - j]);
51 this->nodes.back() = 1.0;
virtual bool left_is_node() const override
Interface for quadrature handlers.
Quadrature handler for Gauss-Radau quadrature.
virtual void compute_nodes() override
static Polynomial< CoeffT > legendre(const size_t order)
Computes the Legendre polynomial of given order.
virtual void compute_weights()
virtual bool right_is_node() const override