ChebParticleMesh.ChebCoef
— Methodfunction ChebCoef(f::Function, h::T, w::Int, ν::Int) where{T<:Union{Float32, Float64}}
This function creates a ChebCoef object for the Chebyshev approximation of function f.
f: the function to be interpolated
h: the grid spacing
w: the number of grid points for the window function cutoff
ν: the number of Chebyshev points
ChebParticleMesh.GridInfo
— Methodfunction GridInfo(Nreal::NTuple{N, Int}, w::NTuple{N, Int}, periodicity::NTuple{N, Bool}, extrapad::NTuple{N, Int}, L::NTuple{N, T}) where{N, T<:Union{Float32, Float64}}
This function creates a GridBox object with two mutable Array.
N_real: the number of real grid points in each direction
w: the number of grid points in each direction for the window function cutoff
periodicity: a tuple of three boolean values indicating whether the grid is periodic in each direction, to decide padding or not
extra_pad: the number of extra grid points in each direction for padding
L: the length of the box in each direction
h: the grid spacing in each direction, the first point is at [h/2, 3h/2, ..., L - h/2]
N_image: the number of grid points in each direction for the image grid, given by tuple([2 * w[i] + 2 for i in 1:N]...) .+ N_real
N_pad: the numer of padded grid points in each direction, given by tuple([2 * pad[i] * (periodicity[i] == false) for i in 1:N]...) .+ N_image .+ N_real
AbstractFFTs.fft!
— Methodfunction fft!(gridbox::GridBox{N, T}) where{N, T}
calculate the inplace fft on the padded grid
AbstractFFTs.ifft!
— Methodfunction ifft!(gridbox::GridBox{N, T}) where{N, T}
calculate the inplace ifft on the padded grid
ChebParticleMesh.FWkb
— Methodfunction FWkb(k::T, width::T, β::T) where{T<:Real}
Fourier transform of Wkb kernel function
ChebParticleMesh.Wkb
— Methodfunction Wkb(x::T, width::T, β::T) where{T<:Real}
WKB kernel function, used as window function for the Chebyshev interpolation
ChebParticleMesh.grid_revise_pad!
— Methodfunction gridrevisepad!(gridbox::GridBox{N, T}) where{N, T}
set all values of gridbox.pad_grid to 0
ChebParticleMesh.horner
— Methodfunction horner(x, p)
Evaluate a polynomial using Horner's method.