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.
| Form | Buffers | Schemes | What they hold |
|---|---|---|---|
FORM_BUTCHER | s + 1 | every RK scheme | the stage state and the s stage residuals |
FORM_SHU_OSHER_2R | 2 | euler, ssp-22, ssp-33 | u^n and the residual (the current stage is the solution) |
FORM_WILLIAMSON_2N | 2 | lsrk-33, lsrk-54 | Delta Q and the residual |
FORM_KETCHESON_2R | 2 | ssp-104 | the second register q2 and the residual |
FORM_SPLITTING | 1 | every splitting scheme | the residual of the partition being advanced |
A scheme that has no such form gives -1.
Source: src/lib/selah_storage.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
FORM_BUTCHER | character(len=*) | parameter | Stage state plus every stage residual. |
FORM_SHU_OSHER_2R | character(len=*) | parameter | Two-register Shu–Osher (u^n and the residual). |
FORM_WILLIAMSON_2N | character(len=*) | parameter | Williamson 2N (Delta Q and the residual). |
FORM_KETCHESON_2R | character(len=*) | parameter | Ketcheson's two-register SSPRK(10,4). |
FORM_SPLITTING | character(len=*) | parameter | One 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)
function registers_needed(scheme, form) result(n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
scheme | character(len=*) | in | Scheme name. | |
form | character(len=*) | in | Storage form. |
Call graph