API

MOONS.Grids.ghost_dualFunction
ghost_dual(::Extremum)

A 2-element vector near the boundary with 1's on ghost cells and 0's on interior cells

source
MOONS.Grids.ghost_vecFunction
ghost_vec(::Extremum)

A 3-element vector near the boundary with 1's on ghost cells and 0's on interior cells

source
MOONS.Grids.MaxType
Max

A type for dispatching on the maximum of the domain along a particular direction

source
MOONS.Grids.MinType
Min

A type for dispatching on the minimum of the domain along a particular direction

source
MOONS.Fields.extrap!Function

Simple linear extrapolation f_g = 2f_b - f_i

source

Simple linear extrapolation with two staggered fields: f_g = 2g_b - f_i

source
MOONS.FFTsModule
FFTs (Fast Fourier Transforms)

The Fast Fourier Transform of the scalar field, f, w.r.t direction dir (1,2,3) which corresponds to (x,y,z).

Implementation

fft!(ω,f,dir,pad)

Input

f    = f(x,y,z)
dir  = direction along which to take the FT (1,2,3)
pad  = (1,0) = (exclude,include) boundary calc along FT direction
       |0000000|     |-------|
       |-------|  ,  |-------| Look at fft for implementation details
       |0000000|     |-------|
Note

The index range of the incoming scalar field is assumed to begin at one.

References

  • https://jakevdp.github.io/blog/2013/08/28/understanding-the-fft/
source