Documentation for NonlinearSchrodinger.jl
's public API.
Contents
Index
NonlinearSchrodinger.Box
NonlinearSchrodinger.Calc
NonlinearSchrodinger.Sim
NonlinearSchrodinger.PHF
NonlinearSchrodinger.compute_IoM!
NonlinearSchrodinger.params
NonlinearSchrodinger.solve!
NonlinearSchrodinger.solve!
NonlinearSchrodinger.λ_given_f
NonlinearSchrodinger.λ_given_m
NonlinearSchrodinger.λ_maximal
NonlinearSchrodinger.ψ₀_DT
NonlinearSchrodinger.ψ₀_periodic
API
NonlinearSchrodinger.solve!
— MethodNonlinearSchrodinger.solve!
— MethodNonlinearSchrodinger.Box
— Methodfunction Box(xᵣ::Pair, T; dx, Nₓ, Nₜ, n_periods)
Create a ::Box
object with Nₜ
transverse nodes, Nₓ
longitudinal nodes (or dx
grid spacing in the lontidunal direction, only one option can be specified), of size [(xᵣ.first), (xᵣ.second)]
in the longitudinal direction and [(-T*n_periods/2), (T*n_periods/2))
NonlinearSchrodinger.Calc
— Methodfunction Calc(λ::Array{Complex{TT}}, tₛ, xₛ, seed, box; m=0.0) where TT <: Real
Create a ::Calc
object with eigenvalues λ
, shifts xₛ
and tₛ
and seeding solution seed
. box::Box
is the Box object used for the calculation and m
is the elliptic parameter for cnoidal solutions. seed
can have the following values:
seed = "0"
$\implies \psi_0 = 0$
seed = "exp"
$\implies \psi_0 = e^{ix}$
seed = "dn"
$\implies \psi_0 = dn(t, m)e^{ix(1-m/2)}$
seed = "cn"
$\implies \psi_0 = \sqrt{m}cn(t, m)e^{ix(m - 1/2)}$
f::Dict{Symbol, Float64}
is a dictionary of extended NLSE parameters.
See also: Box
NonlinearSchrodinger.Sim
— Methodfunction Sim(λ, box::Box, ψ₀::Array{Complex{TT}, 1}, T̂; α = 0.0, ϵ=0.0, β=0.0) where TT <: Rea
Create a ::Sim
object corresponding to eigenvalue λ
(only used for breathers, ignored for arbitrary initial conditions), initial condition ψ₀
and algorithm T̂
. α
is the Hirota equation parameter and ϵ
is the Sasa-Satsuma equation parameter. β
controls pruning.
See also: Box
NonlinearSchrodinger.PHF
— MethodPHF(calc::Calc)
Computed the peak height formula for any calc::Calc
objecti irrespective of seed.
NonlinearSchrodinger.compute_IoM!
— Methodfunction compute_IoM!(obj)
Computes the integrals of motion of obj.ψ
and saves them in respective fields of obj
. obj
can be a ::Sim
or ::Calc
object. The fields are:
obj.KE # Array containing the kinetic energy K(x)
obj.PE # Array containing the potential energy V(x)
obj.E # Array containing the energy H(x)
obj.N # Array containing the norm N(x)
obj.P # Array containing the momentum P(x)
obj.dE # Array containing the energy error δE(x)
obj.dN # Array containing the norm error δN(x)
obj.dP # Array containing the momentum error δP(x)
Result can be plotted using plot(obj, :IoM)
NonlinearSchrodinger.params
— Methodfunction params(; kwargs...)
Computes parameters λ, T, Ω
given either of λ, T, Ω, a
and possibly m
for dnoidal seed. Used only for exp
and dn
seeds.
NonlinearSchrodinger.λ_given_f
— Methodλ_given_f(f, ν)
Computes λ = v + i ν
such that v
results in breather to soliton conversion for the extended NLS characterized by the dictionary of parameters f
.
NonlinearSchrodinger.λ_given_m
— Methodλ_given_m(m; q = 2)
Computed a λ
that is matched to the dnoidal background given by m
with an integer q
. See paper for more details.
See also: λ_maximal
NonlinearSchrodinger.λ_maximal
— Methodλ_maximal(λ₁, N; m = 0)
Computed a maximal intensity set of λ
of order N
given λ₁
and possibly m
for dnoidal bakcground.
See also: λ_given_m
NonlinearSchrodinger.ψ₀_DT
— Methodψ₀_DT(λ, tₛ, xₛ, X₀, box; seed="exp", f = Dict(:α=> 0.0, :γ => 0.0, :δ=>0.0))
Computes an initial condition using the DT characterized by λ, xₛ, tₛ
and seed
at x = X₀
for the extended equation characterized by a dictionary of parameters f
(currently only α
) is supported. box::Box
is the simulation box.
NonlinearSchrodinger.ψ₀_periodic
— Methodfunction ψ₀_periodic(coeff::Array, box::Box, Ω; phase=0)
Computes an initial wavefunction for the box::Box
, with fundamental frequency Ω
and coefficients $A_{1\ldots n}$ = coeff
and an overall phase $e^{i \phi t}$ where $\phi$ = phase
. i.e. $\psi_0$ is of the form:
$\psi(x=0, t) = e^{i \phi t} (A_0 + 2 \sum_{1}^{n} A_m \cos(m \Omega t))$
where:
$A_0 = \sqrt{1 - 2 \sum_{m=1}^n |A_m|^2}$