particle_soa_clear Subroutine

private 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.

Type Bound

particle_soa_t

Arguments

Type IntentOptional Attributes Name
class(particle_soa_t), intent(inout) :: this

Container to empty.


Source Code

   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