triangle_lyness_rule, an Octave code which produces the Lyness-Jespersen family of quadrature rules over the interior of a triangle in 2D.
The rules have the following orders (number of points) and precisions (maximum degree of polynomials whose integrals they can compute exactly):
| Rule | Order | Precision |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 3 | 2 |
| 2 | 4 | 2 |
| 3 | 4 | 3 |
| 4 | 7 | 3 |
| 5 | 6 | 4 |
| 6 | 10 | 4 |
| 7 | 9 | 4 |
| 8 | 7 | 5 |
| 9 | 10 | 5 |
| 10 | 12 | 6 |
| 11 | 16 | 6 |
| 12 | 13 | 6 |
| 13 | 13 | 7 |
| 14 | 16 | 7 |
| 15 | 16 | 8 |
| 16 | 21 | 8 |
| 17 | 16 | 8 |
| 18 | 19 | 9 |
| 19 | 22 | 9 |
| 20 | 27 | 11 |
| 21 | 28 | 11 |
The information on this web page is distributed under the MIT license.
triangle_lyness_rule is available in a C++ version and a Fortran90 version and a MATLAB version and an Octave version.
octave_rule, an Octave code which computes a quadrature rule which estimates the integral of a function f(x), which might be defined over a one dimensional region (a line) or more complex shapes such as a circle, a triangle, a quadrilateral, a polygon, or a higher dimensional region, and which might include an associated weight function w(x).