Guide

Scalar & vector fields

Scalar & vector fields are represented as 2d/3d arrays of canonically scalars or vectors. Array values can alternatively be any type that Supports addition & multiplication.

Customizable grid

Main.EquivariantOperators.GridType
Grid(cell, rmax::AbstractFloat)
Grid(
    cell::AbstractMatrix,
    sz::Union{AbstractVector,Tuple};
    origin = (sz .+ 1) ./ 2,
    )

Grid is specified by its discrete cell vectors (column-wise matrix), overall size and origin. For a uniform Cartesian 5x5 grid discretized at 0.1 with a centered origin, we get cell = [0.1 0; 0 0.1] & origin = [3, 3]. Grid cell can in general be noncartesian.

Particle mesh placement and interpolation

Base.getMethod
Base.get(field::AbstractArray, grid::Grid, rvec::AbstractVector)
Base.put!(
    field::AbstractArray,
    grid::Grid,
    rvec::AbstractVector,
    val::AbstractVector,
)

With grid info we can interpolate a scalar or vector field at any location. We can also place a scalar or vector point source anywhere with automatic normalization wrt discretization. Both work via a proximity weighted average of the closest grid points (in general up to 4 in 2d and 8 in 3d).

Finite difference operators

Main.EquivariantOperators.OpType
Op(
    name::Union{Symbol,String},
    cell;
    boundary =:same,
    rmin = 0,
    rmax = Inf,
    l = 0,
    σ = 1.0,
)
Op(
    radfunc,
    rmin::AbstractFloat,
    rmax::AbstractFloat,
    cell;
    l = 0,
    boundary =:same,
)

Op constructs finite difference operators. Prebuilt operators like differential operators () & common Green's functions can be specified by name. Custom equivariant operators can be made by specifying radial function.

function (m::Op)(x::AbstractArray, )