API
MOONS.Grids.DataLocation — TypeDataLocationSubtypes are used for dispatching on the data location
MOONS.Grids.Center1D — Type1D cell center
MOONS.Grids.Vertex1D — Type1D cell vertex
MOONS.Grids.Coordinates — TypeCoordinatesCell node (n) and center (c) 1D coordinates.
MOONS.Grids.ghost_dual — Functionghost_dual(::Extremum)A 2-element vector near the boundary with 1's on ghost cells and 0's on interior cells
MOONS.Grids.binary — Functionbinary(::Extremum)Returns 0 for Min and 1 for Max
MOONS.Grids.n_hat — Functionn_hat(::Extremum)The outward normal vector to the boundary
MOONS.Grids.ghost_vec — Functionghost_vec(::Extremum)A 3-element vector near the boundary with 1's on ghost cells and 0's on interior cells
MOONS.Grids.Boundary — TypeType for dispatching on boundary points
MOONS.Grids.Interior — TypeType for dispatching on interior points
MOONS.Grids.All — TypeType for dispatching on all points
MOONS.Grids.NodeBoundary — TypeNode boundary type, containing ghost, boundary, and first interior indices
MOONS.Grids.CellBoundary — TypeCell center boundary type, containing ghost and first interior indices
MOONS.Grids.Ghost — TypeType for dispatching on ghost points
MOONS.Grids.Grid — TypeGridAn N-dimensional Cartesian, structured, computational grid.
MOONS.Grids.Max — TypeMaxA type for dispatching on the maximum of the domain along a particular direction
MOONS.Grids.Min — TypeMinA type for dispatching on the minimum of the domain along a particular direction
MOONS.Fields.extrap! — FunctionSimple linear extrapolation f_g = 2f_b - f_i
Simple linear extrapolation with two staggered fields: f_g = 2g_b - f_i
MOONS.FFTs — ModuleFFTs (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| |-------|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/