swap_da_particle_dps Subroutine

public subroutine swap_da_particle_dps(me, ielem1, ielem2)

swaps the position of two particles in particle dynamic array new position of ielem1 = old position of ielem2 and vice-versa also updates the pidlist and pidsort arrays

Arguments

Type IntentOptional Attributes Name
type(dyn_particle_dps_array_type), intent(inout) :: me

particle array to operate on

integer, intent(in) :: ielem1

current index of one element

integer, intent(in) :: ielem2

current index of other element