QUADRATURE_RULES_TRI is a dataset directory which contains examples of quadrature rules for a triangular region. A quadrature rule is a set of n points (x,y) and associated weights w so that the integral of a function f(x,y) over a triangle T can be approximated by:

```        Integral f(x,y) dx dy = Area(T) * Sum ( 1 <= i <= n ) w(i) * f(x(i),y(i))
```

The area of a triangle is equal to the integral of the function f(x,y)=1. This implies that every useful quadrature rule should satisfy

```        Sum ( 1 <= i <= n ) w(i) = 1
```
The fact that the weights must sum to 1 gives a simple check on calculations.

(Other tabulations of quadrature rules for triangles might follow a different convention, in which the weights sum to 1/2. Such a convention makes it easier to integrate over the unit triangle, but slightly more complicated to integrate over a general triangle. My impression is that all quadrature rules should sum to 1, so that the dependence on the area of the region is separated and obvious.)

Quadrature rules for the triangle are generally defined over T1, the unit triangle whose vertices are (0,0), (1,0), (0,1). This implies that, for an integral over T1, we have:

```        Integral f(x,y) dx dy = Area(T1) * Sum ( 1 <= i <= n ) w(i) * f(x(i),y(i))
= 1/2      * Sum ( 1 <= i <= n ) w(i) * f(x(i),y(i))
```
There is a standard technique for transforming the quadrature rule if it is needed to be applied to a general triangle.

For this directory, a quadrature rule is stored as three files, containing the weights w, the points (x,y), and the vertices that define the triangular region (usually (0,0), (1,0), (0,1) ).

### Example:

Here is an example of a quadrature rule for the unit triangle, of order 6.

Here is the text of a "X" file storing the abscissas of such a rule:

``````
0.659027622374092  0.231933368553031
0.659027622374092  0.109039009072877
0.231933368553031  0.659027622374092
0.231933368553031  0.109039009072877
0.109039009072877  0.659027622374092
0.109039009072877  0.231933368553031
``````

Here is the text of an "W" file storing the weights of such a rule

``````
0.16666666666666666667
0.16666666666666666667
0.16666666666666666667
0.16666666666666666667
0.16666666666666666667
0.16666666666666666667
``````
which sum to 1.

Here is the text of an "R" file storing the vertices of the triangle:

``````
0.0  0.0
1.0  0.0
0.0  1.0
``````
whose area is 1/2.

### Related Data and Programs:

DUNAVANT, a FORTRAN90 library which defines Dunavant rules for quadrature on a triangle.

FEKETE, a FORTRAN90 library which defines Fekete rules for quadrature or interpolation over a triangle.

GM_RULE, a FORTRAN90 library which defines Grundmann-Moeller rules for quadrature over a triangle, tetrahedron, or general M-dimensional simplex.

NCC_TRIANGLE, a FORTRAN90 library which defines Newton-Cotes closed quadrature rules on a triangle.

NCO_TRIANGLE, a FORTRAN90 library which defines Newton-Cotes open quadrature rules on a triangle.

QUADRATURE_RULES_PYRAMID, a dataset directory which contains quadrature rules for a pyramid with a square base.

QUADRATURE_RULES_TET, a dataset directory which contains quadrature rules for tetrahedrons, stored as a file of abscissas, a file of weights, and a file of vertices.

QUADRATURE_RULES_WEDGE, a dataset directory which contains quadrature rules for a wedge ( triangle x a line ).

SIMPACK, a FORTRAN77 library which approximates the integral of a function or vector of functions over a multidimensional simplex, or a region which is the sum of multidimensional simplexes.

STROUD, a FORTRAN90 library which defines quadrature rules for a variety of geometric figures.

TEST_TRI_INT, a FORTRAN90 library which can be used to test algorithms for quadrature over a triangle.

TRIANGLE_EXACTNESS, a FORTRAN90 program which investigates the polynomial exactness of a quadrature rule for the triangle.

### References:

1. Jarle Berntsen, Terje Espelid,
Algorithm 706,
DCUTRI: an algorithm for adaptive cubature over a collection of triangles,
ACM Transactions on Mathematical Software,
Volume 18, Number 3, September 1992, pages 329-342.
2. Elise deDoncker, Ian Robinson,
Algorithm 612: Integration over a Triangle Using Nonlinear Extrapolation,
ACM Transactions on Mathematical Software,
Volume 10, Number 1, March 1984, pages 17-22.
3. Dirk Laurie,
Algorithm 584, CUBTRI, Automatic Cubature Over a Triangle,
ACM Transactions on Mathematical Software,
Volume 8, Number 2, 1982, pages 210-218.
4. James Lyness, Dennis Jespersen,
Moderate Degree Symmetric Quadrature Rules for the Triangle,
Journal of the Institute of Mathematics and its Applications,
Volume 15, Number 1, February 1975, pages 19-32.
5. Hans Rudolf Schwarz,
Finite Element Methods,
ISBN: 0126330107,
LC: TA347.F5.S3313.
6. Gilbert Strang, George Fix,
An Analysis of the Finite Element Method,
Cambridge, 1973,
ISBN: 096140888X,
LC: TA335.S77.
7. Arthur Stroud,
Approximate Calculation of Multiple Integrals,
Prentice Hall, 1971,
ISBN: 0130438936,
LC: QA311.S85.
8. Olgierd Zienkiewicz,
The Finite Element Method,
Sixth Edition,
Butterworth-Heinemann, 2005,
ISBN: 0750663200,
LC: TA640.2.Z54

### Sample Files:

CENTROID, the centroid rule, order 1, degree of precision 1.

GAUSS4X4, order 16, degree of precision 7, (essentially a product of two 4 point 1D Gauss-Legendre rules).

GAUSS8X8, order 64, degree of precision 15, (essentially a product of two 8 point 1D Gauss-Legendre rules).

SEVEN_POINT, order 7, degree of precision 3.

STRANG1, order 3, degree of precision 2.

STRANG2, order 3, degree of precision 2.

STRANG3, order 4, degree of precision 3.

STRANG4, order 6, degree of precision 3.

STRANG5, order 6, degree of precision 4.

STRANG6, order 7, degree of precision 4.

STRANG7, order 7, degree of precision 5.

STRANG8, order 9, degree of precision 6.

STRANG9, order 12, degree of precision 6.

STRANG10, order 13, degree of precision 7.

TOMS584_19, order 19, degree of precision 8, a rule from ACM TOMS algorithm #584.

TOMS612_19, order 19, degree of precision 9, a rule from ACM TOMS algorithm #612.

TOMS612_28, order 28, degree of precision 11, a rule from ACM TOMS algorithm #612.

TOMS706_37, order 37, degree of precision 13, a rule from ACM TOMS algorithm #706.

VERTEX, the vertex rule, order 3, degree of precision 1.

You can go up one level to the DATASETS page.

Last revised on 28 September 2010.