Data

All of the data in KitAMR.jl are organized as follows:

KitAMR.KAType
mutable struct KA{DIM, NDF}

Structure that collects all of the data.

  • kinfo::KInfo

  • kdata::KData

source
KitAMR.KInfoType
mutable struct KInfo{DIM, NDF}

Structure of required information during a simulation.

  • config::Configure: Defined by Configure.

  • forest::Forest: Defined by Forest.

  • status::Status: Defined by Status.

source
KitAMR.KDataType
mutable struct KData{DIM, NDF}

Structure of computed data.

  • field::Field

  • ghost::Ghost

source
KitAMR.ForestType
mutable struct Forest{DIM}

Structure related to p4est.

  • p4est::Union{Ptr{KitAMR.P4est.LibP4est.p4est}, Ptr{KitAMR.P4est.LibP4est.p8est}}

  • ghost::Union{Ptr{KitAMR.P4est.LibP4est.p4est_ghost_t}, Ptr{KitAMR.P4est.LibP4est.p8est_ghost_t}}

  • mesh::Union{Ptr{KitAMR.P4est.LibP4est.p4est_mesh_t}, Ptr{KitAMR.P4est.LibP4est.p8est_mesh_t}}

source
KitAMR.StatusType
mutable struct Status

Structure of simulation status. It contains the real time information, and is updated every step.

Fields

  • gradmax::Vector{Float64}: Maximum absolute value of the gradients of conserved variables.

  • Δt::Float64: Time step size used in iterate!.

  • Δt_ξ::Float64: Time step size constraint by grid size.

  • sim_time::Float64: Dimensionless simulation time.

  • step::Int64: Number of steps that have been marched.

  • ps_adapt_step::Int64: Number of steps after last AMR in physical space.

  • vs_adapt_step::Int64: Number of steps after last AMR in velocity space.

  • partition_step::Int64: Number of steps after last partition.

  • residual::Residual: Residual of conserved variables defined by Residual.

  • save_flag::Base.RefValue{Bool}: Flag indicating whether to save.

  • mpi_reqs::Vector{MPI.Request}: Reusable vector of MPI requests for asynchronous communication.

source
KitAMR.ResidualType
mutable struct Residual
  • residual::Vector{Float64}: Residual of primary variables, is updated by residual_check!.

  • sumRes::Vector{Float64}: Summation of residuals.

  • sumAvg::Vector{Float64}: Summation of primary variables to average sumRes.

  • redundant_step::Int64: Count of redundant step to insure the convergence.

source
KitAMR.GhostType
mutable struct Ghost

Structure of ghost layer for communication between processors.

  • ghost_buffer::GhostBuffer

  • ghost_wrap::Vector{KitAMR.AbstractGhostPsData}

  • ghost_info::GhostInfo

source
KitAMR.GhostBufferType
mutable struct GhostBuffer

Julia-managed MPI buffers for the ghost layer. All memory is owned by the Julia GC; no manual sc_free is required.

  • ghost_datas::Vector{Float64}: Flat receive buffer for ghost cell data (df, w, …).

  • ghost_slopes::Vector{Float64}: Flat receive buffer for ghost cell slopes (sdf, sw).

  • ghost_structures::Vector{Float64}: Flat receive buffer for ghost VS structure (weight, level, midpoint).

  • mirror_data_bufs::Vector{Vector{Float64}}: Per-mirror send buffer for data, one entry per mirror quadrant.

  • mirror_slope_bufs::Vector{Vector{Float64}}: Per-mirror send buffer for slopes, one entry per mirror quadrant.

  • mirror_structure_bufs::Vector{Vector{Float64}}: Per-mirror send buffer for VS structure, one entry per mirror quadrant.

source
KitAMR.GhostInfoType
struct GhostInfo

Julia-managed metadata for the ghost layer: vs_nums, flat-buffer offsets, and pre-computed element-count arrays that are reused every time-step without reallocation.

  • ghost_vsnums::Vector{Int64}: vsnum of each ghost quadrant (length = nghosts).

  • mirror_vsnums::Vector{Int64}: vsnum of each mirror quadrant (length = nmirrors).

  • ghost_data_offsets::Vector{Int64}: Float64-element offset into ghost_datas for each ghost quadrant.

  • ghost_slope_offsets::Vector{Int64}: Float64-element offset into ghost_slopes for each ghost quadrant.

  • ghost_structure_offsets::Vector{Int64}: Float64-element offset into ghost_structures for each ghost quadrant.

  • ghost_data_szs::Vector{Int64}: Cached Float64-element count of ghost data buffer per ghost quadrant.

  • ghost_slope_szs::Vector{Int64}: Cached Float64-element count of ghost slope buffer per ghost quadrant.

  • mirror_data_szs::Vector{Int64}: Cached Float64-element count of ghost data buffer per mirror quadrant.

  • mirror_slope_szs::Vector{Int64}: Cached Float64-element count of ghost slope buffer per mirror quadrant.

source
KitAMR.FieldType
mutable struct Field{DIM, NDF}

Structure of fields data.

  • trees::PsTrees: Cells data defined by PsTrees.

  • faces::Vector{AbstractFace}: Mapping between faces and cells. The element type is defined by AbstractFace.

  • immersed_boundaries::Array{ImmersedBoundary{DIM, NDF}, 1} where {DIM, NDF}: Pre-collected immersed-boundary data (donor cells, solid cells, IB faces).

source
KitAMR.PsTreesType
mutable struct PsTrees{DIM, NDF}

Structure of cells data managed by Julia.

  • data::Array{Array{AbstractPsData{DIM, NDF}, 1}, 1} where {DIM, NDF}

  • offset::Int64: Offset of treeid used in partition.

source