Drop every live element but keep the allocated capacity.
Use this to reuse a container across iterations without paying for a
reallocation. Use deallocate to actually give the memory back.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_soa_t), | intent(inout) | :: | this |
Container to empty. |
subroutine particle_soa_clear(this) !! Drop every live element but keep the allocated capacity. !! !! Use this to reuse a container across iterations without paying for a !! reallocation. Use `deallocate` to actually give the memory back. class(particle_soa_t), intent(inout) :: this !! Container to empty. this%extent%used = 0 end subroutine particle_soa_clear