Finite volume data
In the finite volume method, the data is stored separately throughout the cells. Therefore, we provide AbstractControlVolume
and AbstractInterface
structs for processing in-cell and edge information, which are used as arrays of structs (AoS) in numerical simulations. Considering one-dimensional physical space $x$, we provide the following control volume structs. The structs differs from the number of particle distribution functions.
KitBase.ControlVolume1D
— Typemutable struct ControlVolume1D{A, B} <: AbstractControlVolume1D
1D control volume with no distribution function
Fields
w
prim
sw
KitBase.ControlVolume1D1F
— Typemutable struct ControlVolume1D1F{A, B} <: AbstractControlVolume1D
1D control volume with 1 distribution function
Fields
w
prim
sw
f
sf
KitBase.ControlVolume1D2F
— Typestruct ControlVolume1D2F{A, B} <: AbstractControlVolume1D
1D control volume with 2 distribution functions
Fields
w
prim
sw
h
b
sh
sb
KitBase.ControlVolume1D3F
— Typemutable struct ControlVolume1D3F{A, B, C, D, E} <: AbstractControlVolume1D
1D control volume with 3 distribution functions
Fields
w
prim
sw
h0
h1
h2
sh0
sh1
sh2
E
B
ϕ
ψ
lorenz
KitBase.ControlVolume1D4F
— Typemutable struct ControlVolume1D4F{A, B, C, D, E} <: AbstractControlVolume1D
1D control volume with 4 distribution functions
Fields
w
prim
sw
h0
h1
h2
h3
sh0
sh1
sh2
sh3
E
B
ϕ
ψ
lorenz
Within each cell, different numbers of particle distribution function can be tracked. The interface data is stored correspondingly.
KitBase.Interface1D
— Typemutable struct Interface1D{A<:Union{Real, AbstractArray}} <: AbstractInterface1D
1D cell interface with no distribution function Note that deepcopy constructor is needed to work with StructArrays
Fields
fw
KitBase.Interface1D1F
— Typemutable struct Interface1D1F{A, B<:AbstractArray} <: AbstractInterface1D
1D cell interface with 1 distribution function Note that deepcopy constructor is needed to work with StructArrays
Fields
fw
ff
KitBase.Interface1D2F
— Typestruct Interface1D2F{A, B<:AbstractArray} <: AbstractInterface1D
1D cell interface with 2 distribution functions
Fields
fw
fh
fb
KitBase.Interface1D3F
— Typestruct Interface1D3F{A, B, C} <: AbstractInterface1D
1D cell interface with 3 distribution functions
Fields
fw
fh0
fh1
fh2
femL
femR
KitBase.Interface1D4F
— Typestruct Interface1D4F{A, B, C} <: AbstractInterface1D
1D cell interface with 4 distribution functions
Fields
fw
fh0
fh1
fh2
fh3
femL
femR
The 2D control volume structs are implemented as well.
KitBase.ControlVolume2D
— Typemutable struct ControlVolume2D{A, B} <: AbstractControlVolume2D
2D control volume with no distribution function
Fields
w
prim
sw
KitBase.ControlVolume2D1F
— Typemutable struct ControlVolume2D1F{A, B, C, D} <: AbstractControlVolume2D
2D control volume with 1 distribution function
Fields
w
prim
sw
f
sf
KitBase.ControlVolume2D2F
— Typestruct ControlVolume2D2F{A, B, C, D} <: AbstractControlVolume2D
2D control volume with 2 distribution functions
Fields
w
prim
sw
h
b
sh
sb
KitBase.ControlVolume2D3F
— Typemutable struct ControlVolume2D3F{T2, T3, T4, T5, T6, T7, T8} <: AbstractControlVolume2D
2D control volume with 3 distribution functions
Fields
w
prim
sw
h0
h1
h2
sh0
sh1
sh2
E
B
ϕ
ψ
lorenz
The numerical fluxes are evaluated through AbstractInterface
structs.
KitBase.Interface2D
— Typemutable struct Interface2D{A, B, C} <: AbstractInterface2D
2D cell interface with no distribution function
Fields
len
n
fw
KitBase.Interface2D1F
— Typemutable struct Interface2D1F{A, B, C, D} <: AbstractInterface2D
2D cell interface with 1 distribution function
Fields
len
n
fw
ff
KitBase.Interface2D2F
— Typestruct Interface2D2F{A, B<:(AbstractVector), C, D} <: AbstractInterface2D
2D cell interface with 2 distribution functions
Fields
len
n
fw
fh
fb