Method Wrappers
Writing method dictionaries by hand is tedious and error-prone. These helpers create them with consistent keys and labels.
create_method
label, method = create_method(:RK2, :MUSCL, 2; limiter = :VK)
# label == "RK2MUSCL2(VK)"
# method == Dict(:Time_stepper => :RK2, :Scheme_name => :MUSCL, :Scheme_order => 2,
# :Limiter_name => :VK, :Limiter_mode => :hard, ...)Returns label => method, where method uses the namespaced keys of the Configuration Reference.
- Pipeline. Unless
sim_func_nameis given, IMEX steppers (:IMEXEuler,:ARS222,:ARS233,:PRSSP3,:SSP332) select:run_kinetic_simulationand all others:run_direct_simulation. - Label.
"<stepper><scheme><order>", followed in parentheses by any non-default flux, the limiter, and for MOOD the strategy (plus the criterion if it is not:U2). Examples:"RK2MUSCL2","RK2MUSCL2(VK)","RK2MUSCL2(EPD1)","RK2MUSCL2(EPD2,U1)","RK4MUSCL3(Upwind,minmod)".custom_labelreplaces it. - Extra keywords are stored as additional keys, e.g.
Scheme_upwind_alg_nd = :ClassicorMOOD_delta_relax = 1e-4. String values are converted toSymbols. ignorelists parameters the method should ignore. The built-in direct methods pass the kinetic keys (ignore_relax).
The :Upwind scheme only exists at order 1.
get_master_method_dict
Returns all built-in methods as Dict(label => method):
- first-order baselines:
EulerUpwind1,RK2Upwind1,IMEXEulerUpwind1,ARS222Upwind1,ARS233Upwind1, andRK2WENO2; - direct second order:
RK2MUSCL2without limiter, withVK,BJorminmod, and with MOOD (EPD0,EPD1,EPD2,SEPD0,U1), plusRK2MUSCL1; - kinetic second order:
ARS222MUSCL2without limiter, withVKorminmod, and with MOOD (EPD1,EPD2,SEPD0,U1); - high order:
RK4MUSCL2–RK4MUSCL5without limiter, withVK,minmod, or MOOD (EPD1,EPD2),RK4MUSCL4(EPD1,only), and kineticARS233MUSCL2–ARS233MUSCL5with MOOD.
Select methods by label in a SimulationConfig, e.g. ["RK2MUSCL2", "ARS222MUSCL2"].
generate_relax_params
vels, idx = generate_relax_params(2.0, 2, 1)
# vels == ((2.0, -2.0, 0.0, 0.0), (0.0, 0.0, 2.0, -2.0))
# idx == [1, 5]Builds the standard kinetic velocity set: $2D$ kinetic variables per macroscopic variable, with speeds $\pm v$ along each axis. It returns the speeds in the format expected by :Kinetic_velocities and the edges for :Kinetic_indices. See Kinetic Relaxation.
API
HyperCloud.create_method — Function
create_method(timestepper::Symbol, main_gradient::Symbol, order::Int; kwargs...)Automatically generates a method ParamDict using the strict namespace API, automatically assigns the correct simulation pipeline, and generates a standardized plot label.
HyperCloud.get_master_method_dict — Function
get_master_method_dict()Returns a MethodDict containing every standard numerical scheme in the Meshfree framework.
HyperCloud.generate_relax_params — Function
generate_relax_params(v_mag::Float64, dim::Int, NM::Int)Generates symmetric kinetic velocities matching the native Flux{D, NK} tuple format along with the uniformly partitioned edge indices (relax_indices) for the kinetic system.