5.0

5.0 | 1 rating Rate this file 112 downloads (last 30 days) File Size: 1.78 KB File ID: #9389

Gauss Quadrature for Tetrahedra

by Greg von Winckel

 

16 Dec 2005 (Updated 21 Dec 2005)

Code covered by BSD License  

Compute Gauss weights and nodes for a specied tetrahedron

Download Now | Watch this File

File Information
Description

This script computes the (x,y,z) Gauss quadrature nodes and weights for a tetrahedron with user-specied vertices.

Acknowledgements
This submission has inspired the following:
Homogen Integrate on Triangular Area and Tetrahedral Volume
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
20 Dec 2005 John D'Errico

Wait until Greg fixes this. The following code fragment should compute the volume of a simple tetrahedron.
At the very least, since the function is constant over the
simplex domain, its integral should be positive.

V = [0 0 0;0 0 1;0 1 0;1 0 0];
[X,Y,Z,W]=tetraquad(4,V);
F = ones(size(X));
Q = W'*F

Q =
   -0.1667

The magnitude is correct, just the sign is wrong. Q should be 1/6.

21 Dec 2005 John D'Errico

Its fixed. Thanks Greg.

Please login to add a comment or rating.
Updates
21 Dec 2005

Sign of weights depended on order of vertices. This has been fixed.

Tag Activity for this File
Tag Applied By Date/Time
integration Greg von Winckel 22 Oct 2008 08:10:07
gauss quadrature Greg von Winckel 22 Oct 2008 08:10:07
tetrahedron Greg von Winckel 22 Oct 2008 08:10:07
tetrahedra Greg von Winckel 22 Oct 2008 08:10:07
3d Greg von Winckel 22 Oct 2008 08:10:07
finite Greg von Winckel 22 Oct 2008 08:10:07
element Greg von Winckel 22 Oct 2008 08:10:07
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com