API Reference

WaveOperators.Grid — Method
Grid(height::Real, width::Real, h::Real, k::Real)

Creates a height by width grid with discretization h and wavenumber k. This grid will define our problem domain.

source
WaveOperators.IntegralEquation — Type
IntegralEquation

This object represents the physics equation

\[z + G\mathbf{diag}(\theta)z = Gb,\]

in compact form. Specifically, G_design maps from the design region to the design region, and G_target maps from the design region to the target. By only dealing with the reduced form of the system, we avoid unnecessary computation. The reduced form of the physics is

\[\begin{aligned} z^\mathrm{design} + G^\mathrm{design}z^\mathrm{design} &= b^\mathrm{design}\\ z^\mathrm{target} + G^\mathrm{target}z^\mathrm{design} &= b^\mathrm{target} \end{aligned}\]

source
WaveOperators.Rectangle — Method
Rectangle(position::T, shape::U) where {T <: Tuple, U <: Tuple}

Creates a Rectangle at positionwith dimensionsshape. Both inputs are tuples of floats (Tuple{Float64, Float64}`).

source
WaveOperators.Slab — Type
Slab(position::Float64, width::Float64)

Creates a Slab (horizontal rectangle that strectes across the entire domain) at y position position with (vertical) width width.

source
WaveOperators.add_current! — Method
add_current!(g::Grid, s::S, input::N) where {S <: Shape, N <: Number}

Adds excitation input to the grid g at position s.

source
WaveOperators.generate_G — Method
function generate_G(g::Grid, design, target)

Generates the IntegralEquation (Green's function G and excitations b) for the equation

\[z + G\mathbf{diag}(\theta)z = Gb,\]

The inputs design and target may be indices or shapes.

source
WaveOperators.is_in — Function
is_in(s::Shape, p::Position)

Checks if p (a tuple (x::Float64, y::Float64)) is in the shape s.

source