File Exchange

image thumbnail

n-dimensional simplex quadrature

version (2.18 KB) by Greg von Winckel
% Construct Gauss points and weights for a n-dimensional simplex


Updated 27 Dec 2005

View License

This script computes the weights and nodes for a Gauss quadrature rule on an n-dimensional simplex. The user can either specify the vertices of the simplex or only the dimension and the vertices of the unit simplex will then be used.

The first four simplexes are

n | Domain
1 | Interval
2 | Triangle
3 | Tetrahedron
4 | Pentatope

Thanks to John D'Errico for helping with this script.

Cite As

Greg von Winckel (2021). n-dimensional simplex quadrature (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Herwig Peters

I use it for finite element coding, it works very well. I've checked it against other codes, very good agreement. Will stick with this one!

Im Serious

This does integrate correctly. Was unable to debug the triangle quadrature function. Something to do with incorrect Y values.

Chensong Zhang

Have not try it with my own applications. But it is very nice to have a small piece of code like this. Good Job

John D'Errico

I've tested this code for simplexes in dimensions from 1
to 7. All results were correct in all tests. In 1-d of course,
its a 1-d Gauss-Legendre quadrature, easily verified from
tables. In higher dimensions all I could do was verify a
known result.
Its a nice piece of code, easy to use for an integration
over an entire simplicial complex.

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!