TABLE OF CONTENTS
- 1. /particlePointerList
- 1.1. particlePointerList/ParticleList_Print
- 1.2. particlePointerList/ParticleList_getParticle
- 1.3. particlePointerList/ParticleList_INIT
- 1.4. particlePointerList/ParticleList_CLEAR
- 1.5. particlePointerList/ParticleList_APPEND
- 1.6. particlePointerList/ParticleList_PREPEND
- 1.7. particlePointerList/ParticleList_RANDOMIZE
- 1.8. particlePointerList/ParticleList_REMOVE
/particlePointerList [ Modules ]
NAME
module particlePointerList
PURPOSE
This module defines all necesary types for storing pointers to particles. This includes lists of particles and lists to lists and ... ;)
INPUTS
(none)
particlePointerList/ParticleList_Print [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
subroutine ParticleList_Print(L)
PURPOSE
Loop over the List and print every particle
INPUTS
- type(tParticleList) :: L -- The List
OUTPUT
written on stdout
particlePointerList/ParticleList_getParticle [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
logical function ParticleList_getParticle(L, ID, n, P, antiparticle)
PURPOSE
Loop over the List "L" and find the "n"-th particle in the list with %ID="ID", "%anti=antiparticle" and %charge="charge". This particle "P" is then returned.
INPUTS
- type(tParticleList) :: L -- The List of particles
- integer :: ID -- ID of particle which shall be returned
- integer :: charge -- charge of particle which shall be returned
- integer :: n -- We return the n-th particle in the list with %ID=ID
- logical :: antiparticle -- .false. if we search for a particle, .true. for an antiparticle
- logical, OPTIONAL :: weightNonZero -- if .true. only count particles with perweight > 0
OUTPUT
- type(particle) :: P -- n-th particle with wished ID
- logical :: success -- True if it was possible to find n-Particles with the wished ID, False otherwise
particlePointerList/ParticleList_INIT [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
subroutine ParticleList_INIT(L)
PURPOSE
Initialize the List (call only at start; to reset the list please call ParticleList_CLEAR)
INPUTS
- type(tParticleList) :: L -- The List
OUTPUT
(none)
particlePointerList/ParticleList_CLEAR [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
subroutine ParticleList_CLEAR(L,all)
PURPOSE
Reset the List: Delete all Nodes and re-init the pointers
INPUTS
- type(tParticleList) :: L -- The List
- logical, OPTIONAL :: all -- if present and true, also the particle is deallocated
OUTPUT
(none)
particlePointerList/ParticleList_APPEND [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
subroutine ParticleList_APPEND(L,V)
PURPOSE
Append the particle (which V points at) at the end of the list.
INPUTS
- type(tParticleList) :: L -- The List
- type(particle), POINTER :: V -- The particle to add
OUTPUT
(none)
particlePointerList/ParticleList_PREPEND [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
subroutine ParticleList_PREPEND(L,V)
PURPOSE
Prepend the particle (which V points at) at the beginning of the list.
INPUTS
- type(tParticleList) :: L -- The List
- type(particle), POINTER :: V -- The particle to add
OUTPUT
(none)
particlePointerList/ParticleList_RANDOMIZE [ Subroutines ]
[ Top ] [ particlePointerList ] [ Subroutines ]
NAME
subroutine ParticleList_RANDOMIZE(L)
PURPOSE
Reorder the linked list by reshuffling the entries randomly.
INPUTS
- type(tParticleList) :: L -- The List
OUTPUT
(none)
particlePointerList/ParticleList_REMOVE [ Functions ]
[ Top ] [ particlePointerList ] [ Functions ]
NAME
logical function ParticleList_REMOVE(L,iEntry,V)
PURPOSE
Remove the iEntry-th particle from the List. The pointer to this particle is returned, the memory of the node is freed.
NOTES
This routine is fastest if one removes the first particle. For all higher indices, the routine has to loop over the entries of the list until it has found the right number.
INPUTS
- type(tParticleList) :: L -- The List
- integer :: iEntry -- The number of the particle to remove
- type(particle), POINTER :: V -- The particle to add
OUTPUT