File Exchange

image thumbnail

Smooth_Closed_Surfa​ce_Quadrature_RBF

version 1.0.0.0 (25.7 KB) by Jonah A Reeger
This function computes quadrature weights for evaluating surface integrals.

1 Download

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.
%
%==========================================================================

Comments and Ratings (0)

Updates

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.

1.0.0.0

Updated description

1.0.0.0

Bug fix to Smooth_Closed_Surface_Quadrature_RBF

1.0.0.0

Added two more tags

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

Inspired by: Spherical_Quadrature_RBF(Quadrature_Nodes)

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor