Abstract Types

Static array aliases

Physical quantities are static arrays with fixed sizes, which keeps every particle loop allocation-free:

HyperCloudCore.Space — Type
Space{D, T}

Static vector alias representing D-dimensional spatial coordinates with element type T.

source
HyperCloudCore.State — Type
State{M, T}

Static vector alias representing an M-dimensional vector of equation variables for a single particle with element type T.

source
HyperCloudCore.Flux — Type
Flux{D, M, T}

Static vector alias representing evaluated fluxes across all D spatial dimensions for an M-variable system (SVector{D, State{M, T}}).

source
HyperCloudCore.Velocity — Type
Velocity{D, M, T, L}

Static vector alias representing flux Jacobians across all D spatial dimensions for an M-variable system (SVector{D, SMatrix{M, M, T, L}}), where L = M * M.

source
AliasShapeMeaning
Space{D,T}SVector{D,T}Position, distance or velocity vector
State{M,T}SVector{M,T}State of one particle
Flux{D,M,T}SVector{D, State{M,T}}One flux (or one state) per spatial direction
Velocity{D,M,T,L}SVector{D, SMatrix{M,M,T,L}}Flux Jacobian per direction

Extension points

Abstract typeImplement it forContract
HyperbolicPDE{D,M,T}a new equation systemAPI Contracts
AbstractExplicitSourceTerm, AbstractImplicitSourceTermsource termsAPI Contracts
DivergenceInterpolatora new spatial schemeAPI Contracts
NumericalFluxFunctiona new Riemann solverNumerical Flux Functions
AbstractSlopeLimitera new MUSCL limiter_limit_slopes (see Limiter.jl)
MOODCriterion, MOODStrategyadmissibility tests, interface-degree rulesMulti-Dimensional Optimal Order Detection (MOOD)
GridMovergrid velocity modelsMoving Grids (ALE)
VolumeEstimatorparticle quadrature weightsupdate_volumes!(pg, est), see Particle Volumes and Adaptivity
AbstractBoundaryConditionboundary conditionsBoundary Conditions
MLSWeightFunctionMLS kernelsMLS Weight Functions
TimeSteppera different time integratorfunctor (ts)(eq, pg, t, dt)

Reference

HyperCloudCore.AbstractBoundaryCondition — Type
AbstractBoundaryCondition

Base type for particle grid boundary conditions.

API Requirements

  • Evaluators must implement a dispatch handling ghost particle modifications, typically matching the internal signature required by apply_boundary_conditions!.
source
HyperCloudCore.AbstractExplicitSourceTerm — Type
AbstractExplicitSourceTerm <: AbstractSourceTerm

Source term evaluated explicitly during the explicit Runge-Kutta or IMEX explicit stages.

API Requirements

  • Must implement evaluate_sources(st::AbstractExplicitSourceTerm, f_i, i, pg, t) -> State{M, T}.
source
HyperCloudCore.AbstractImplicitSourceTerm — Type
AbstractImplicitSourceTerm <: AbstractSourceTerm

Source term evaluated implicitly via stiff solvers during IMEX integration.

API Requirements

  • Must implement implicit_solve(st::AbstractImplicitSourceTerm, f_i, dt, i, pg, t) -> State{M, T}.
  • Must implement pre_solve_updates!(st, current_Y_i, pg, t) for global pre-computations.
source
HyperCloudCore.AbstractSlopeLimiter — Type
AbstractSlopeLimiter

Base type for spatial reconstruction limiters (e.g., Venkatakrishnan, MinMod).

API Requirements

  • Must implement _limit_slopes(limiter::AbstractSlopeLimiter, raw_grad, nb_slice, f_i, f_all, pg, dist_all, max_degree) returning a bounded gradient SVector.
source
HyperCloudCore.DivergenceInterpolator — Type
DivergenceInterpolator

Central component for executing spatial reconstruction and computing the flux divergence.

API Requirements

  • Must implement the primary execution functor: (::DivergenceInterpolator)(eq::HyperbolicPDE, i::Int, f_i::State, nb_slice::OrdinalRange, pg::ParticleGrid, U::AbstractVector{State}, ib::InteractionBuffer, strategy::MOODStrategy) -> State{M, T}, where U is the stage state vector (f_i == U[i]); neighbour states are read through neighbour_states(U, pg)[k] / neighbour_differences(U, pg, f_i)[k] for a slot k of nb_slice, and ib holds the per-slot scratch (df_flux, df_scratch, mask). (Note: The return value is typically scaled by 2.0 depending on the internal integration rules).
  • Must implement update_size!(interp, N_particles) for memory allocation.
  • Must implement update_content!(interp, i, f_i, nb_slice, pg, U, ib) for the pre-pass (e.g., caching gradients).
  • Must implement @inline _extract_order(interp) -> Int: the maximum consistency order. Every scheme reads pg.core.particle_orders in this convention (MUSCL: reconstruction degree = order − 1).
  • Optional: prepare_geometry!(interp, pg) (refresh geometry-dependent caches), _divergence_degree(interp), _order_reach(interp, strategy) (see API.jl); on moving grids the interpolator receives the PDE wrapped in an ALEFrame.
source
HyperCloudCore.GridMover — Type
GridMover

Base type for Arbitrary Lagrangian-Eulerian (ALE) grid motion. The time stepper integrates the particle positions with the explicit part of its tableau and adds the ALE term w·∇ρ to the state equation, so the coupled system keeps the tableau's order.

API Requirements

  • grid_velocity(mover, eq, p_idx, U, pg, t) -> Space{D, T}.
  • NoGridMover is the static grid and compiles the moving-grid path away.
source
HyperCloudCore.HyperbolicPDE — Type
HyperbolicPDE{D, M, T}

The pure physical system of equations. Defines the spatial dimensions D, number of equations M and numeric type T.

API Requirements

  • flux(eq::HyperbolicPDE, U::State): Returns the analytical Flux{D, M, T}.
  • max_eigenvalue(eq::HyperbolicPDE, U::State, d::Int): Returns the maximum local wave speed in dimension d.
  • velocity(eq::HyperbolicPDE, U::State, d::Int): Returns the M x M Jacobian/Velocity matrix.

Optional API

  • prim2cons(eq, U) / cons2prim(eq, U): Conversion utilities between state representations.
source
HyperCloudCore.MLSWeightFunction — Type
MLSWeightFunction

Base type for Moving Least Squares (MLS) kernel weight functions.

API Requirements

  • Must be callable as (wf::MLSWeightFunction)(r::Real) -> Real, returning the scaling weight for a given radial distance r.
  • Should track its internal cutoff/interpolation range.
source
HyperCloudCore.MOOD — Type
MOOD{S <: MOODStrategy, C <: MOODCriterion}

Wrapper coupling a MOODCriterion (the trigger) with a MOODStrategy (the response).

source
HyperCloudCore.MOODCriterion — Type
MOODCriterion

Base type for discrete maximum principles (DMP) and physical admissibility checks.

API Requirements

  • Must implement the functor: (m::MOOD{<:MOODStrategy, C})(interp, p_idx, U_prev_i, nb_slice, U_cand_i, pg, U_prev) -> Bool, where U_prev is the state vector of the previous stage (neighbour states via neighbour_states(U_prev, pg))
  • Returns true if the locally updated state f_new violates the criterion, triggering an order drop.
source
HyperCloudCore.MOODStrategy — Type
MOODStrategy

Base type dictating how polynomial order degradation cascades through the spatial neighborhood during Multi-Dimensional Optimal Order Detection (MOOD).

API Requirements

  • _get_interface_orders(strategy, pg, i, j) -> (o_i, o_j): interface degrees of the edge (i, j) (MUSCL).
  • forced_order(strategy, j, pg, triggered, snapshot) -> Int: optional forcing; the order particle j is lowered to given the particles that dropped (triggered) and the post-decrement snapshot of the orders (a kernel body: per-particle reads only). Defaults to snapshot[j]; strategies that force also return true from forces_neighbours(strategy).
  • _order_reach(interp, strategy) on the interpolator side declares how far (hops) fluxes depend on neighbours' orders, so the stepper can recompute only C ⊕ reach.
source
HyperCloudCore.NumericalFluxFunction — Type
NumericalFluxFunction

Base type for approximate Riemann solvers and numerical interface fluxes.

API Requirements

  • Must implement the functor: (::NumericalFluxFunction)(f_L, f_R, F_L, F_R, eq::HyperbolicPDE)
  • Returns a Flux{D, M, T} representing the resolved numerical flux at the interface between the left and right reconstructed states.
source
HyperCloudCore.TimeStepper — Type
TimeStepper

The global orchestrator advancing the PDE over time.

API Requirements

  • Must implement the primary execution functor: (::TimeStepper)(eq::HyperbolicPDE, pg::ParticleGrid, t::Real, dt::T) which updates the grid in-place.
  • Must manage intermediate allocations and buffer sizing internally via update_size!.
source