**triangle_witherden_rule**,
a MATLAB code which
returns a symmetric Witherden quadrature rule for the triangle,
with exactness up to total degree 20.

The data is given for the following triangle:

(0,1) | \ | \ | \ | \ (0,0)--(1,0)

We suppose we are given a triangle T with vertices A, B, C. We call a rule with n points, returning barycentric coordinates a, b, c, and weights w. Then the integral I of f(x,y) over T is approximated by Q as follows:

(x,y) = a(1:n) * A + b(1:n) * B + c(1:n) * C Q = area(T) * sum ( 1 <= i <= n ) w(i) * f(x(i),y(i))

The computer code and data files made available on this web page are distributed under the MIT license

**triangle_witherden_rule** is available in
a C version and
a C++ version and
a MATLAB version and
an Octave versionand
a Python version.

triangle_dunavant_rule, a MATLAB code which sets up a Dunavant quadrature rule over the interior of a triangle in 2d.

triangle_fekete_rule, a MATLAB code which returns a Fekete rule for quadrature or interpolation over the interior of a triangle in 2d.

triangle_felippa_rule, a MATLAB code which returns a Felippa quadrature rule for approximating integrals over the interior of a triangle in 2d.

triangle_integrals, a MATLAB code which returns the exact value of the integral of any monomial over the interior of the unit triangle in 2d.

triangle_lyness_rule, a MATLAB code which returns a Lyness-Jespersen quadrature rule over the interior of a triangle in 2d.

triangle_monte_carlo, a MATLAB code which uses the Monte Carlo method to estimate the integral of a function over the interior of the unit triangle in 2d.

triangle_ncc_rule, a MATLAB code which defines Newton-Cotes closed quadrature rules on a triangle.

triangle_nco_rule, a MATLAB code which defines Newton-Cotes open quadrature rules over the interior of a triangle in 2d.

triangle_symq_rule, a MATLAB code which returns efficient symmetric quadrature rules, with exactness up to total degree 50, over the interior of an arbitrary triangle in 2D, by Hong Xiao and Zydrunas Gimbutas.

triangle_twb_rule, a MATLAB code which generates the points and weights of quadrature rules over the interior of a triangle in 2D, determined by Taylor, Wingate, and Bos.

triangle_wandzura_rule, a MATLAB code which returns a Wandzura quadrature rule of exactness 5, 10, 15, 20, 25 and 30 over the interior of the triangle in 2D.

- Freddie Witherden, Peter Vincent, On the identification of symmetric quadrature rules for finite element methods, Computers and Mathematics with Applications, Volume 69, pages 1232-1241, 2015.

- rule_order.m, returns the number of points in rules of order 0 through 20.
- rule00.m, returns the rule of degree 0.
- rule01.m, returns the rule of degree 1.
- rule02.m, returns the rule of degree 2.
- rule03.m, returns the rule of degree 3.
- rule04.m, returns the rule of degree 4.
- rule05.m, returns the rule of degree 5.
- rule06.m, returns the rule of degree 6.
- rule07.m, returns the rule of degree 7.
- rule08.m, returns the rule of degree 8.
- rule09.m, returns the rule of degree 9.
- rule10.m, returns the rule of degree 10.
- rule11.m, returns the rule of degree 11.
- rule12.m, returns the rule of degree 12.
- rule13.m, returns the rule of degree 13.
- rule14.m, returns the rule of degree 14.
- rule15.m, returns the rule of degree 15.
- rule16.m, returns the rule of degree 16.
- rule17.m, returns the rule of degree 17.
- rule18.m, returns the rule of degree 18.
- rule19.m, returns the rule of degree 19.
- rule20.m, returns the rule of degree 20.
- triangle_area.m, returns the area of a triangle.