Double cell capacity of field accumulation buffer, keeping contents.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(inout), | allocatable | :: | fb(:,:) |
Value of each field (rows) and cell (columns). |
|
| integer(kind=int32), | intent(inout) | :: | zcap |
Cell capacity, doubled. |
subroutine grow_fb(fb, zcap) !! Double cell capacity of field accumulation buffer, keeping contents. ! Arguments real(real64), allocatable, intent(inout) :: fb(:, :) !! Value of each field (rows) and cell (columns). integer(int32), intent(inout) :: zcap !! Cell capacity, doubled. real(real64), allocatable :: t(:, :) integer(int32) :: old old = zcap zcap = zcap*2 allocate (t(size(fb, 1), zcap)) t(:, 1:old) = fb call move_alloc(t, fb) end subroutine grow_fb