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.
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.
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}}).
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.
| Alias | Shape | Meaning |
|---|---|---|
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 type | Implement it for | Contract |
|---|---|---|
HyperbolicPDE{D,M,T} | a new equation system | API Contracts |
AbstractExplicitSourceTerm, AbstractImplicitSourceTerm | source terms | API Contracts |
DivergenceInterpolator | a new spatial scheme | API Contracts |
NumericalFluxFunction | a new Riemann solver | Numerical Flux Functions |
AbstractSlopeLimiter | a new MUSCL limiter | _limit_slopes (see Limiter.jl) |
MOODCriterion, MOODStrategy | admissibility tests, interface-degree rules | Multi-Dimensional Optimal Order Detection (MOOD) |
GridMover | grid velocity models | Moving Grids (ALE) |
VolumeEstimator | particle quadrature weights | update_volumes!(pg, est), see Particle Volumes and Adaptivity |
AbstractBoundaryCondition | boundary conditions | Boundary Conditions |
MLSWeightFunction | MLS kernels | MLS Weight Functions |
TimeStepper | a different time integrator | functor (ts)(eq, pg, t, dt) |
Reference
HyperCloudCore.AbstractBoundaryCondition — Type
AbstractBoundaryConditionBase 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!.
HyperCloudCore.AbstractExplicitSourceTerm — Type
AbstractExplicitSourceTerm <: AbstractSourceTermSource 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}.
HyperCloudCore.AbstractImplicitSourceTerm — Type
AbstractImplicitSourceTerm <: AbstractSourceTermSource 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.
HyperCloudCore.AbstractSlopeLimiter — Type
AbstractSlopeLimiterBase 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 gradientSVector.
HyperCloudCore.AbstractSourceTerm — Type
AbstractSourceTermBase type for RHS source terms (e.g., gravity, kinetic relaxation, reactions).
HyperCloudCore.DivergenceInterpolator — Type
DivergenceInterpolatorCentral 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}, whereUis the stage state vector (f_i == U[i]); neighbour states are read throughneighbour_states(U, pg)[k]/neighbour_differences(U, pg, f_i)[k]for a slotkofnb_slice, andibholds 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 readspg.core.particle_ordersin this convention (MUSCL: reconstruction degree = order − 1). - Optional:
prepare_geometry!(interp, pg)(refresh geometry-dependent caches),_divergence_degree(interp),_order_reach(interp, strategy)(seeAPI.jl); on moving grids the interpolator receives the PDE wrapped in anALEFrame.
HyperCloudCore.GridMover — Type
GridMoverBase 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}.NoGridMoveris the static grid and compiles the moving-grid path away.
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 analyticalFlux{D, M, T}.max_eigenvalue(eq::HyperbolicPDE, U::State, d::Int): Returns the maximum local wave speed in dimensiond.velocity(eq::HyperbolicPDE, U::State, d::Int): Returns theM x MJacobian/Velocity matrix.
Optional API
prim2cons(eq, U)/cons2prim(eq, U): Conversion utilities between state representations.
HyperCloudCore.MLSWeightFunction — Type
MLSWeightFunctionBase 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 distancer. - Should track its internal cutoff/interpolation range.
HyperCloudCore.MOOD — Type
MOOD{S <: MOODStrategy, C <: MOODCriterion}Wrapper coupling a MOODCriterion (the trigger) with a MOODStrategy (the response).
HyperCloudCore.MOODCriterion — Type
MOODCriterionBase 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, whereU_previs the state vector of the previous stage (neighbour states vianeighbour_states(U_prev, pg)) - Returns
trueif the locally updated statef_newviolates the criterion, triggering an order drop.
HyperCloudCore.MOODStrategy — Type
MOODStrategyBase 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 particlejis lowered to given the particles that dropped (triggered) and the post-decrementsnapshotof the orders (a kernel body: per-particle reads only). Defaults tosnapshot[j]; strategies that force also returntruefromforces_neighbours(strategy)._order_reach(interp, strategy)on the interpolator side declares how far (hops) fluxes depend on neighbours' orders, so the stepper can recompute onlyC ⊕ reach.
HyperCloudCore.NoGridMover — Type
Static grid: zero grid velocity, moving-grid code paths compiled away.
HyperCloudCore.NoMOOD — Type
Criterion that never flags; MOOD() disables order reduction.
HyperCloudCore.NoStrategy — Type
Strategy without interface rules or forcing; used by MOOD().
HyperCloudCore.NumericalFluxFunction — Type
NumericalFluxFunctionBase 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.
HyperCloudCore.TimeStepper — Type
TimeStepperThe 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!.