FourierGPE.Lgp!
— Methodχ = Lgp!(dϕ,ϕ,sim,t)
In-place evaluation of Gross-Pitaevskii equation defined by nlin!
and parameters in sim
. Allows imaginary time γ
, and evolves in rotating frame defined by chemical potential μ
.
FourierGPE.Lgp
— Methodχ = Lgp(ϕ,sim,t)
Evaluate Gross-Pitaevskii equation defined by nlin
and parameters in sim
. Allows imaginary time γ
, and evolves in rotating frame defined by chemical potential μ
.
FourierGPE.V
— MethodV(x,t) = ...
Define the system potential, with default zero. Should be defined as a scalar function (without .
), suitable for broadcasting on spatial arrays via V.(...)
.
FourierGPE.crandn_array
— MethodA = crandn_array(M)
Make placeholder 2x2x...
complex randn()
array of M
dimensions.
FourierGPE.crandnpartition
— MethodA = crandnpartition(D,M)
Make placeholder ArrayPartition vector of length M
, containing 2x2x...
rank D complex matrices.
FourierGPE.definetransforms
— Methoddefinetransforms(funcs,args,meas,kwargs)
Build all transforms for simulation.
FourierGPE.dfft
— MethodDx,Dk = dfft(x,k)
Measures that make fft
, ifft
2-norm preserving. Correct measures for mapping between x
- and k
-space.
FourierGPE.dfftall
— MethodDX,DK = dfftall(X,K)
Evalutes tuple of measures that make fft
, ifft
2-norm preserving for each x
or k
dimension.
FourierGPE.initsim!
— Methodinitsim!(sim;flags=FFTW.MEASURE)
Initialize all arrays, measures and transform libraries for a particular simulation.
FourierGPE.k2
— Methodk² = k2(K)
Create the kinetic energy array k²
on the k
-grid defined by the tuple K
.
FourierGPE.kspace!
— Methodkspace!(ψ,sim)
Mutating transform from x
- to k
-space using transforms packed into sim
.
FourierGPE.kspace
— Methodkspace(ψ,sim)
Transform from x
- to k
-space using transforms packed into sim
.
FourierGPE.kvec
— Methodk = kvec(λ,N)
Create k
values with correct periodicity for box specified by length λ
for number of points N
.
FourierGPE.kvecs
— MethodK = kvecs(L,N)
Create a tuple containing the spatial coordinate array for each spatial dimension.
FourierGPE.makeT
— FunctionT = makeT(X,K,j)
Build FFTW
transform library for the array tuples X
, K
. Defaults to a measure plan. j
is number of scratch fields to initialize for in-place evaluation.
FourierGPE.makeTMixed
— MethodT = makeTMixed(X,K,j)
Build mixed transform library for the array tuples X
, K
. Defaults to a measure plan.
FourierGPE.makearrays
— MethodX,K,dX,dK = makearrays(L,N)
Create all x
and k
arrays for box specified by tuples L=(Lx,...)
and N=(Nx,...)
. For convenience, differentials dX
, dK
are also reaturned. L
and N
must be tuples of equal length.
FourierGPE.maketransarrays
— Functionmaketransarrays(L,N,j=1;flags=FFTW.MEASURE)
Make all transforms and arrays in one call.
FourierGPE.nlin!
— Methodnlin!(ϕ,sim::Sim{D},t)
Mutating evaluation of position space nonlinear terms. Dispatches on dimension D
, using potential V(x...,t)
.
FourierGPE.nlin
— Methodχ = nlin(ϕ,sim,t)
Evalutes nonlinear terms in x
-space, returning to k
-space.
FourierGPE.runsim
— Functionrunsim(sim,ϕ;info,tplot,nfiles)
Call DifferentialEquations to solve Gross-Pitaevskii equation.
FourierGPE.xspace!
— Methodxspace!(ϕ,sim)
Mutating transform from k
- to x
-space using transforms packed into sim
.
FourierGPE.xspace
— Methodψ = xspace(ϕ,sim)
Transform from k
- to x
-space using transforms packed into sim
.
FourierGPE.xvec
— Methodx = xvec(λ,N)
Create x
values with correct periodicity for box specified by length λ
, using N
points.
FourierGPE.xvecs
— MethodX = xvecs(L,N)
Create a tuple containing the spatial coordinate array for each spatial dimension.