VectorSpin types and functions
VectorSpin.BSplineAdvection
VectorSpin.Mesh
VectorSpin.advection!
VectorSpin.bf_energy
VectorSpin.bspline
VectorSpin.energy
VectorSpin.ex_energy
VectorSpin.initialfunction
VectorSpin.kinetic_energy
VectorSpin.s_energy
VectorSpin.smod
VectorSpin.snorm
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.step!
VectorSpin.BSplineAdvection
— Typestruct BSplineAdvection{T} <: VectorSpin.AbstractAdvection
Advection to be computed on each row
mesh::Mesh
dims::Symbol
p::Int64
step::Any
modes::Vector
eig_bspl::Vector
eigalpha::Array{Complex{T}, 1} where T
fhat::Array{Complex{T}, 2} where T
VectorSpin.Mesh
— Typestruct Mesh{T}
Mesh type to store domain parameters
nv::Int64
: Number of points in vnx::Int64
: Number of points in xvmin::Any
: Domain size v ∈ ]vmin,vmax[vmax::Any
: Domain size v ∈ ]vmin,vmax[xmin::Any
: Domain size x ∈ [xmin,xmax]xmax::Any
: Domain size x ∈ [xmin,xmax]kx::Vector
: Wave number vector to compute derivative with FFTsdx::Any
: Size step along xdv::Any
: Size step along vx::Vector
: points along x directionv::Vector
: points along v directionvnode::Vector
: center points along v direction
VectorSpin.advection!
— Methodadvection!(df, adv, v, dt)
interpolate df(x + delta) with Parabolic Spline Method (PSM)
We consider a linear advection problem in $p$ direction
\[\frac{\partial f}{\partial t} + a \frac{\partial f}{\partial x} =0.\]
From the conservation of the volume, we have the following identity
\[f_{j,\ell}(t)=\frac{1}{\Delta p} \int_{p_{\ell-1/2}} ^{p_{\ell+1/2}} f(x_j,p,t)\mathrm{d}{p} =\frac{1}{\Delta p} \int_{p_{\ell-1/2}-at} ^{p_{\ell+1/2}-at} f(x_j,p,0)\mathrm{d}{p}.\]
For simplicity, denote by $q\in [1, M]$ the index such that $p_{\ell+1/2}-at \in [p_{q-1/2},p_{q+1/2}]$ i.e. $p_{\ell+1/2}-at \in C_q$, then we have
\[f_{j,\ell}(t) =\frac{1}{\Delta p} \int_{p_{q-1/2}-at} ^{p_{q-1/2}} f(x_j,p,0)\mathrm{d}{p}+f_{j,q}(0)-\frac{1}{\Delta p} \int_{p_{q+1/2}} ^{p_{q+1/2}-at} f(x_j,p,0)\mathrm{d}{p}.\]
Here we need to reconstruct a polynomial function $f(x_j,p,0)$ using the averages $f_{j,l}(0)$ using the PSM approach.
VectorSpin.bf_energy
— Functionbf_energy(f1, f2, f3, S1, S2, S3, mesh, tiK)
bf_energy(f1, f2, f3, S1, S2, S3, mesh, tiK, n_i)
bf_energy(f1, f2, f3, S1, S2, S3, mesh, tiK, n_i, mub)
VectorSpin.bspline
— Methodbspline(p, j, x)
Return the value at x in [0,1] of the B-spline with integer nodes of degree p with support starting at j. Implemented recursively using the De Boor's Algorithm
\[B_{i,0}(x) := \left\{ \begin{matrix} 1 & \mathrm{if} \quad t_i ≤ x < t_{i+1} \\ 0 & \mathrm{otherwise} \end{matrix} \right.\]
\[B_{i,p}(x) := \frac{x - t_i}{t_{i+p} - t_i} B_{i,p-1}(x) + \frac{t_{i+p+1} - x}{t_{i+p+1} - t_{i+1}} B_{i+1,p-1}(x).\]
VectorSpin.energy
— Methodenergy(f0, f1, f2, f3, S1, S2, S3, E1, mesh, tiK, n_i)
VectorSpin.ex_energy
— Methodex_energy(E1, mesh)
VectorSpin.initialfunction
— Methodinitialfunction(mesh, α, kx, σ, ata)
Gaussian function with a perturbation in x direction
VectorSpin.kinetic_energy
— Methodkinetic_energy(f0, mesh)
VectorSpin.s_energy
— Functions_energy(S1, S2, S3, mesh)
s_energy(S1, S2, S3, mesh, mub)
s_energy(S1, S2, S3, mesh, mub, n_i)
\[\]
VectorSpin.smod
— Methodsmod(S)
VectorSpin.snorm
— Methodsnorm(S1, S2, S3)
VectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, S1, S2, S3, dt, tiK)
VectorSpin.step!
— Methodcompute the subsystem H2
step!(op, f0, f1, f2, f3, E3, A3, dt, h_int)
VectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, S1, S2, S3, dt, tiK)
compute the subsystem Hs2
VectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, E2, A2, dt, h_int)
VectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, S1, S2, S3, dt, tiK)
compute the subsystem Hs3
VectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, E2, E3, A2, A3, dt)
\[\begin{aligned} \dot{p} = (A_y, A_z) \cdot \partial_x (A_y, A_z) \\ \dot{Ey} = -\partial_x^2 A_y + A_y \rho \\ \dot{Ez} = -\partial_x^2 A_z + A_z \rho \\ \end{aligned}\]
VectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, E1, E2, E3, A2, A3, dt)
compute the first subsystem He()
\[f_t - Ef_v = 0\]
VectorSpin.step!
— MethodVectorSpin.step!
— Methodstep!(op, f0, f1, f2, f3, E1, dt)
subsystem for Hv:
\[f_t + vf_x = 0\]
\[-E_x = \rho - 1\]