ensure_fvs_scratch_2d Subroutine

private subroutine ensure_fvs_scratch_2d(state, nx, ny, h)

Allocate (or re-allocate on a dimension change) the FVS split-flux scratch fp_all/fm_all, halo-padded like ub (1-h:nx+h, 1-h:ny+h). Allocated lazily from compute_resid_fdm_fvs_2d so non-FVS paths never pay the memory cost.

Arguments

Type IntentOptional Attributes Name
type(solver_state_2d_t), intent(inout) :: state
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: h