Fractional Laplacian
Class: kwave.toolbox.FourierCollocation Package: kwave.toolbox
Calculate fractionLaplacian of scalar field for a given power.
Syntax
ddf = fracLaplacian(obj, f,y)
ddf = fracLaplacian(obj, f,y,Staggering='forward')
Description
Calculates the gradient of a scalar field in 1D, 2D, or 3D using a Fourier collocation spectral method.
The vector components of the gradient are stacked in the 4th dimension of the output. For example, if calling gradient on a matrix of dimensions (10, 10), the output will be of size (10, 10, 1, 2). This is to allow codes to implement multi-dimensional support by always looping over the fourth dimension.
If y==0, the function returns the original function. If y==2, the function returns the traditional laplacian.
Input Arguments
f- (numeric) Scalar field to compute gradient of.y- (numeric) scalar value for power of fractional Laplacian
Name-Value Arguments
Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.
Staggering- ('none', 'forward', 'backward') Option to return the output staggered by half a grid point in the specified direction. Default = 'none'.
Output Arguments
df- (numeric) Fractional Laplacian of f.