Learn R Programming

SpatialfdaR (version 1.0.0)

triquad: Set up Gaussian quadrature points and weights for a triangular domain.

Description

The integral of a function over a triangle is approximated by a weighted sum of the values of the function at a set of points.

Usage

triquad(nquad, v)

Value

A list object containing these named fields:

X

The X-coordinates of the quadrature points.

Y

The Y-coordinates of the quadrature points.

Wx

The weights for the X-coordinates of the quadrature points.

Wy

The weights for the Y-coordinates of the quadrature points.

Arguments

nquad

The number of quadrature points and weights is $N^2$.

v

A matrix with three rows and two columns containing the locations of the vertices of the triangle.

Author

J. O. Ramsay

Details

Gaussian quadrature approximates an integral of a function $f$ over a triangle by a weighted sum of $N^2$ values of $f$ at specified points within the triangle. The larger N, the more accurate the approximation, but course the longer it takes to compute. For many purposes, including most uses of finite element methods, the accuracy does not have to be great, and N=5 may well suffice

References

Sangalli, Laura M., Ramsay, James O., Ramsay, Timothy O. (2013), Spatial spline regression models, Journal of the Royal Statistical Society, Series B, 75, 681-703.