NonlinearRHS.jl

Luna.NonlinearRHS.TransFreeMethod
(t::TransFree)(nl, Eω, z)

Calculate the reciprocal-domain (ω-kx-ky-space) nonlinear response due to the field and place the result in nl.

source
Luna.NonlinearRHS.TransFreeMethod
TransFree(grid, xygrid, FT, responses, densityfun, normfun)

Construct a TransFree to calculate the reciprocal-domain nonlinear polarisation.

Arguments

  • grid::AbstractGrid : the grid used in the simulation
  • xygrid : the spatial grid (instances of Grid.FreeGrid)
  • FT::FFTW.Plan : the full 3D (t-y-x) Fourier transform for the oversampled time grid
  • responses : Tuple of response functions
  • densityfun : callable which returns the gas density as a function of z
  • normfun : normalisation factor as fctn of z, can be created via norm_free
source
Luna.NonlinearRHS.TransModalMethod
TransModal(grid, ts, FT, resp, densityfun, norm!; rtol=1e-3, atol=0.0, mfcn=300, full=false)

Construct a TransModal, transform E(ω) -> Pₙₗ(ω) for modal fields.

Arguments

  • grid::AbstractGrid : the grid used in the simulation
  • ts::Modes.ToSpace : pre-created ToSpace for conversion from modal fields to space
  • FT::FFTW.Plan : the time-frequency Fourier transform for the oversampled time grid
  • resp : Tuple of response functions
  • densityfun : callable which returns the gas density as a function of z
  • norm! : normalisation function as fctn of z, can be created via norm_modal
  • rtol::Float=1e-3 : relative tolerance on the HCubature integration
  • atol::Float=0.0 : absolute tolerance on the HCubature integration
  • mfcn::Int=300 : maximum number of function evaluations for one modal integration
  • full::Bool=false : if true, use full 2-D mode integral, if false, only do radial integral
source
Luna.NonlinearRHS.TransRadialMethod
(t::TransRadial)(nl, Eω, z)

Calculate the reciprocal-domain (ω-k-space) nonlinear response due to the field and place the result in nl

source
Luna.NonlinearRHS.TransRadialMethod
TransRadial(grid, HT, FT, responses, densityfun, normfun)

Construct a TransRadial to calculate the reciprocal-domain nonlinear polarisation.

Arguments

  • grid::AbstractGrid : the grid used in the simulation
  • HT::QDHT : the Hankel transform which defines the spatial grid
  • FT::FFTW.Plan : the time-frequency Fourier transform for the oversampled time grid
  • responses : Tuple of response functions
  • densityfun : callable which returns the gas density as a function of z
  • normfun : normalisation factor as fctn of z, can be created via norm_radial
source
Luna.NonlinearRHS.copy_scale!Method
copy_scale!(dest, source, N, scale)

Copy first N elements from source to dest and simultaneously multiply by scale factor. For multi-dimensional dest and source, work along first axis.

source
Luna.NonlinearRHS.copy_scale_both!Method
copy_scale_both!(dest::Vector, source::Vector, N, scale)

Copy first and last N elements from source to first and last N elements in dest and simultaneously multiply by scale factor. For multi-dimensional dest and source, work along first axis.

source
Luna.NonlinearRHS.norm_freeMethod
norm_free(grid, xygrid, nfun)

Make function to return normalisation factor for 3D propagation.

Note

Here, nfun(ω; z) needs to take frequency ω and a keyword argument z.

source
Luna.NonlinearRHS.norm_modalMethod
norm_modal(grid; shock=true)

Normalisation function for modal propagation. If shock is false, the intrinsic frequency dependence of the nonlinear response is ignored, which turns off optical shock formation/ self-steepening.

source
Luna.NonlinearRHS.norm_radialMethod
norm_radial(ω, q, nfun)

Make function to return normalisation factor for radial symmetry.

Note

Here, nfun(ω; z) needs to take frequency ω and a keyword argument z.

source