Skip to content

Reference ​

What SELAH does and where each part is described, by what you want to do. use selah gives the whole API: the kinds, the coefficients (L0), the box and the kernels (L1), the stepper (L2), the additive splitting and the particle pushers. The API pages, generated from the source comments, give every argument.

Feature map ​

ToReadEntry points
choose a Runge–Kutta scheme by order, stages and SSP coefficientSchemes: Runge–Kutta schemesSCHEME_EULER … SCHEME_LSRK_54, RK_SCHEMES, butcher(name)
read a scheme in another coefficient form, or convert a form to ButcherSchemes: the coefficient formsshu_osher, shu_osher_2r, williamson_2n; butcher_from_shu_osher, butcher_from_shu_osher_2r, butcher_from_williamson_2n, shu_osher_from_2r
query a tableau: explicitness, SSP coefficient, stability polynomial, axis boundsSchemes: the coefficient formsis_explicit, ssp_coefficient, euler_step_fractions, stability_polynomial, imag_axis_bound, real_axis_bound
run a scheme named the FOODIE wayPorting from FOODIEselah_scheme_name(foodie_name)
count the registers a scheme needs in a storage formSchemes: storage, Stepper: formsregisters_needed(scheme, form), FORM_*
split u′=F1(u)+F2(u) by partitions of the componentsSchemes: splitting schemesSCHEME_STRANG, SCHEME_YOSHIDA_4, SCHEME_BLANES_MOAN_S6, SCHEME_BLANES_MOAN_S10, splitting, palindrome; FORM_SPLITTING with partitions=
step with the leapfrog and its Robert–Asselin–Williams filterSchemes: leapfrog, Stepper: leapfrogSCHEME_LEAPFROG, SCHEME_LEAPFROG_RAW, leapfrog, leapfrog_roots; FORM_LEAPFROG, history(), restart_history(), resume_history(dt)
tell the kernels which cells to updateKernels: the boxbox, box_interior, box_range, box_components, LAYOUT_V_FIRST, LAYOUT_V_LAST
integrate a field of rank 1 to 4Kernels: fields of rank 1 to 4, Stepper: fields of rank 1 to 4components=, box_dim, component_dim, stage_state_view, rhs_register_view
write your own step from the stage operationsKernels: operationsselah_copy, selah_axpy, selah_lincomb, selah_stage_state, selah_step_update, selah_shu_osher_2r_stage, selah_williamson_2n_stage, selah_leapfrog_step
choose the first step of an embedded pairStep control: the starting stepinitial_step_norms, initial_step_probe, initial_step_difference; initial_probe, initial_step
the solution inside a step: a continuous extension, Hermite's cubic, ab-k's interpolantDense outputdense_output, hermite_output; dense_weights
locate the zeros of functions of the solution inside a stepEventstype(event_locator): initialize, start, step, locating, next_theta, update, event, event_theta, event_time, is_terminal, resume
choose the next step from an embedded pair's error: elementary, PI and filter controllersStep controltype(step_controller): initialize, propose, reset; CONTROL_ELEMENTARY, CONTROL_PI, CONTROL_H211B, CONTROL_PI42, CONTROL_CUSTOM, CONTROLLERS
drive a step stage by stage around your ghost fill and residualStepper: a step, Stepper: procedurestype(stepper): initialize, begin_step, begin_stage, end_stage, finish_step, stage_state, rhs_register, destroy
evaluate a time-dependent residual at the stage's timeStepper: time-dependent residualsstage_time(k)
leave the cells of a solid (an immersed boundary) untouchedStepper: masksmask, mask_comp; masked_q=
give the stepper your own memory for its registersStepper: the caller's registersregisters=
skip the residuals already in their register: a step begun again, first-same-as-lastStepper: residuals already in their registerstage_needs_residual(k), fsal=, first_same_as_last(), invalidate_residuals()
evaluate the first stage on the solution, without its copyStepper: stages on qstages_on_q=, stage_state_is_q(k)
get the step residual, or the weights that telescope stage fluxes into a flux registerStepper: proceduresfinish_step(..., dq=) (Butcher form), stage_weight(k)
limit each stage for positivity, and bound the time stepStepper: limiters and forward-Euler stepsstage_euler_fraction(k), ssp_coefficient(), imag_axis_bound(), real_axis_bound()
advance another state with the field in the same stages (particles, PML fields)Stepper: companion statesinitialize_companion
integrate a stiff linear decay exactlyStepper: a decay integrated exactlydecay= of begin_stage and finish_step (Butcher form)
compose a stepper's step with a flow of your ownComposition: additive splittingtype(additive_splitting): initialize, substeps, substep_operator, substep_fraction, substep_time; SCHEME_LIE, ADDITIVE_SCHEMES, OPERATOR_FIELD, OPERATOR_FLOW
advance particles by kick and driftComposition: particlesSCHEME_STRANG with FORM_SPLITTING
push charged particles with a two-level pusherParticles: two-level pushersselah_push, PUSHER_BORIS, PUSHER_BORIS_RELATIVISTIC, PUSHER_VAY, PUSHER_HIGUERA_CARY
keep Gauss's law at every stage with the particles in the field's schemeParticles: charge-conserving stage currentslookahead, stage_current, stage_current_admissible; the kernel selah_stage_current
build and run in single precisionPrecision, what it changesR_P; the kinds I4P, I8P, R4P, R8P
know what a step costs on a GPUPerformance: results, whole steps

Modules ​

selah re-exports the public names of its modules; a program needs only use selah. Each module has its page in the API.

LayerModulePublic names
kindsselah_kind_parametersR_P (and, through selah, PENF's I4P, I8P, R4P, R8P)
L0selah_tableauxthe four coefficient forms, their conversions and queries
L0selah_schemesthe Runge–Kutta catalogue: SCHEME_*, RK_SCHEMES, butcher, shu_osher, shu_osher_2r, williamson_2n
L0selah_splittingssplitting_composition, splitting, palindrome, the splitting schemes, SPLITTING_SCHEMES
L0selah_leapfrogleapfrog_filter, leapfrog, leapfrog_roots, the axis bounds of a filter, LEAPFROG_SCHEMES
L0selah_storageFORM_*, registers_needed
L0selah_foodie_namesselah_scheme_name: FOODIE's scheme names in SELAH's
L0selah_step_controlstep_controller, CONTROL_*, CONTROLLERS, CONTROL_NAME_LEN
L0selah_eventsevent_locator: the zeros of the caller's event functions inside a step
L1selah_boxbox, its constructors and queries, the layouts
L1selah_kernelsthe nine generic stage operations: a box form each, a flat form for all but selah_stage_current
L1selah_kernels_constraintCONSTRAINT_NONE, CONSTRAINT_NONNEGATIVE, CONSTRAINT_POSITIVE, CONSTRAINT_NONPOSITIVE, CONSTRAINT_NEGATIVE: the kernel behind stepper%step_constraint
L1selah_newtonnewton_solver, NEWTON_DIAGONAL, NEWTON_BLOCK, NEWTON_MAX_BLOCK: the implicit stage by Newton's method, cell by cell
L1selah_andersonanderson_mixing, ANDERSON_MAX_DEPTH: Anderson's acceleration of the implicit stage's fixed-point iteration
L1selah_newton_krylovnewton_krylov, NK_MAX_RESTART, and its requests NK_RESIDUAL, NK_REDUCE, NK_PRECONDITION, NK_DONE: matrix-free Newton–GMRES in the implicit stage
L2selah_stepperstepper
L2selah_nystromnystrom_stepper, nystrom_tableau, nystrom, NYSTROM_SCHEMES: Runge–Kutta–Nyström schemes for y″=f(t,y); stormer_stepper, stormer_weights, STORMER_MAX_STEPS: the Störmer and Cowell schemes
L2selah_nordsiecknordsieck_stepper, NORDSIECK_ADAMS, NORDSIECK_BDF, NORDSIECK_ADAMS_MAX_ORDER, NORDSIECK_BDF_MAX_ORDER: the Nordsieck form, variable-step Adams and BDF
L2selah_magnusmagnus_stepper, magnus_scheme, magnus, MAGNUS_SCHEMES, MAGNUS_DENSE, MAGNUS_KRYLOV, MAGNUS_CALLER, MAGNUS_MAX_BLOCK, MAGNUS_MAX_KRYLOV, and its requests MAGNUS_NODE, MAGNUS_APPLY, MAGNUS_REDUCE, MAGNUS_ACTION, MAGNUS_DONE: commutator-free Magnus schemes for y′=A(t)y
L2selah_additive_splittingadditive_splitting, OPERATOR_FIELD, OPERATOR_FLOW, SCHEME_LIE, ADDITIVE_SCHEMES
particlesselah_pushersselah_push, PUSHER_*