Skip to content

selah_storage ​

SELAH, L0: the storage forms of the schemes and the field-sized buffers each one needs.

registers_needed(scheme, form) counts the field-sized buffers an integration step needs besides the solution itself, including the buffer the residual is written to. It is known before anything is allocated, so a solver can size its memory budget first (ADAM sizes its block pool this way). For comparison, ADAM's SSP path holds nrk stage buffers plus dq, which is the Butcher count s + 1, and its low-storage path holds q_rk(1) plus dq, which is the two-register count 2.

FormBuffersSchemesWhat they hold
FORM_BUTCHERs + 1every RK schemethe stage state and the s stage residuals
FORM_SHU_OSHER_2R2euler, ssp-22, ssp-33u^n and the residual (the current stage is the solution)
FORM_WILLIAMSON_2N2lsrk-33, lsrk-54Delta Q and the residual
FORM_KETCHESON_2R2ssp-104the second register q2 and the residual
FORM_SPLITTING1every splitting schemethe residual of the partition being advanced

A scheme that has no such form gives -1.

Source: src/lib/selah_storage.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
FORM_BUTCHERcharacter(len=*)parameterStage state plus every stage residual.
FORM_SHU_OSHER_2Rcharacter(len=*)parameterTwo-register Shu–Osher (u^n and the residual).
FORM_WILLIAMSON_2Ncharacter(len=*)parameterWilliamson 2N (Delta Q and the residual).
FORM_KETCHESON_2Rcharacter(len=*)parameterKetcheson's two-register SSPRK(10,4).
FORM_SPLITTINGcharacter(len=*)parameterOne partition residual.

Functions ​

registers_needed ​

Field-sized buffers a step of scheme in form needs besides the solution, the residual buffer included.

Attributes: pure

Returns: integer(kind=I4P)

fortran
function registers_needed(scheme, form) result(n)

Arguments

NameTypeIntentAttributesDescription
schemecharacter(len=*)inScheme name.
formcharacter(len=*)inStorage form.

Call graph

GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice