tet_mesh_quad, an Octave code which reads information defining a tetrahedral mesh, and estimates the integral of a function whose values are given at the nodes.

Note that this program only expects to receive values of the function f(x,y,z) at the nodes of the tet mesh, that is, as a simple list of values. No formula for f is expected or used. A much better estimate for the integral might be possible if a formula for f(x,y,z) were available, in which case a higher order quadrature scheme could be employed.

This program should be able to compute exactly the integrals of 1, x, y, z, and any linear combination of these. It will only be able to approximate the integrals of other functions, and the accuracy of the approximation will depend in part on the size of the triangles in the triangulation.


[ quad, volume ] = tet_mesh_quad ( 'prefix' )
where 'prefix' is the common prefix for the node, element, and value files.


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


tet_mesh_quad is available in a C++ version and a Fortran90 version and a MATLAB version and an Octave version.

Related Data and Programs:


tet_mesh, an Octave code which carries out various operations on tetrahedral meshes.

triangulation_quad, an Octave code which estimates the integral of a function over a triangulated region.

Source Code:

Last revised on 06 July 2023.