Smooth_Closed_Surfa​ce_Quadrature_RBF

This function computes quadrature weights for evaluating surface integrals.
89 Downloads
Updated 18 May 2016

View License

%==========================================================================
%
% This function computes quadrature weights for evaluating the surface
% integral of a scalar function f(x,y,z) over the surface S. The surface S
% may be specified implicitly as a level surface h(x,y,z)=0 (along with the
% Quadrature_Nodes and Triangles), or only as the set of Quadrature_Nodes
% and Triangles. In the second case, the surface normal will be
% approximated.
%
% Inputs: Quadrature_Nodes - A set of points located exactly on the
% surface (Number_of_Quadrature_Nodes X 3) Array
%
% Triangles - A triangulation of the set Quadrature_Nodes. This
% should be an array where row k contains the indicdes in
% Quadrature_Nodes of the vertices of triangle k
%
% h (optional) - For the surface S defined implicitly by h(x,y,z)=0, row i
% in the output of h should contain
% h(Quadrature_Nodes(i,1:3))
% h should take in Quadrature_Nodes as an
% (Number_of_Quadrature_Nodes X 3) Array
%
% gradh (optional) - The gradient of the function h. Row i in the output
% of gradh should contain
% [dh/dx(Quadrature_Nodes(i,1:3)),dh/dy(Quadrature_Nodes(i,1:3)),dh/dz(Quadrature_Nodes(i,1:3)]
% gradh should take in Quadrature_Nodes as an
% (Number_of_Quadrature_Nodes X 3) Array
%
% Output: Quadrature Weights - A set of quadrature weights-
% (Number_of_Quadrature_Nodes X 1) vector-corresponding
% to the set of points Quadrature_Nodes
%
% This implementation uses the method and default settings discussed in:
%
% J. A. Reeger, B. Fornberg, and M. L. Watts "Numerical quadrature over
% smooth, closed surfaces".
%
% NOTE: The main loop of this method (over each triangle) can be easily
% parallelized if you have access to the parallel toolbox. In such a case,
% change the for loop to a parfor loop.
%
%==========================================================================

Cite As

Jonah A Reeger (2024). Smooth_Closed_Surface_Quadrature_RBF (https://www.mathworks.com/matlabcentral/fileexchange/57082-smooth_closed_surface_quadrature_rbf), MATLAB Central File Exchange. Retrieved .

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

Inspired by: Spherical_Quadrature_RBF(Quadrature_Nodes)

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

Added functionality to test if the Quadrature_Nodes supplied actually fall on the surface in the case when the level surface h(x,y,z)=0 is supplied.
Added two more tags

Bug fix to Smooth_Closed_Surface_Quadrature_RBF
Updated description