The integer part%sp that referenced the species index has been
substituted for a pointer to the species.
This commit is contained in:
parent
bf4b8b41d3
commit
ec128902ad
13 changed files with 94 additions and 87 deletions
|
|
@ -199,8 +199,8 @@ MODULE moduleCollisions
|
|||
sigmaVrel = self%crossSec%get(eRel)*vRel
|
||||
sigmaVrelMaxNew = sigmaVrelMaxNew + sigmaVrel
|
||||
IF (sigmaVrelMaxNew/sigmaVrelMax > random()) THEN
|
||||
m_i = species(part_i%sp)%obj%m
|
||||
m_j = species(part_j%sp)%obj%m
|
||||
m_i = part_i%species%m
|
||||
m_j = part_j%species%m
|
||||
!Applies the collision
|
||||
vCM = velocityCM(m_i, part_i%v, m_j, part_j%v)
|
||||
vp = vRel*randomDirectionVHS()
|
||||
|
|
@ -292,11 +292,11 @@ MODULE moduleCollisions
|
|||
sigmaVrelMaxNew = sigmaVrelMaxNew + sigmaVrel
|
||||
IF (sigmaVrelMaxNew/sigmaVrelMax > random()) THEN
|
||||
!Find which particle is the ionizing electron
|
||||
IF (part_i%sp == self%electron%sp) THEN
|
||||
IF (ASSOCIATED(part_i%species, self%electron)) THEN
|
||||
electron => part_i
|
||||
neutral => part_j
|
||||
|
||||
ELSEIF(part_j%sp == self%electron%sp) THEN
|
||||
ELSEIF(ASSOCIATED(part_j%species, self%electron)) THEN
|
||||
electron => part_j
|
||||
neutral => part_i
|
||||
|
||||
|
|
@ -314,17 +314,17 @@ MODULE moduleCollisions
|
|||
|
||||
!Creates a new electron from ionization
|
||||
ALLOCATE(newElectron)
|
||||
newElectron%sp = electron%sp
|
||||
newElectron%v = vp_n
|
||||
newElectron%r = neutral%r
|
||||
newElectron%xi = neutral%xi
|
||||
newElectron%n_in = .TRUE.
|
||||
newElectron%vol = neutral%vol
|
||||
newElectron%weight = neutral%weight
|
||||
newElectron%qm = electron%qm
|
||||
newElectron%species => electron%species
|
||||
newElectron%v = vp_n
|
||||
newElectron%r = neutral%r
|
||||
newElectron%xi = neutral%xi
|
||||
newElectron%n_in = .TRUE.
|
||||
newElectron%vol = neutral%vol
|
||||
newElectron%weight = neutral%weight
|
||||
newElectron%qm = electron%qm
|
||||
|
||||
!Ionize neutral particle
|
||||
SELECT TYPE(sp => species(neutral%sp)%obj)
|
||||
SELECT TYPE(sp => neutral%species)
|
||||
TYPE IS(speciesNeutral)
|
||||
CALL sp%ionize(neutral)
|
||||
|
||||
|
|
@ -421,11 +421,11 @@ MODULE moduleCollisions
|
|||
sigmaVrelMaxNew = sigmaVrelMaxNew + sigmaVrel
|
||||
IF (sigmaVrelMaxNew/sigmaVrelMax > random()) THEN
|
||||
!Find which particle is the ionizing electron
|
||||
IF (part_i%sp == self%electron%sp) THEN
|
||||
IF (ASSOCIATED(part_i%species, self%electron)) THEN
|
||||
electron => part_i
|
||||
ion => part_j
|
||||
|
||||
ELSEIF(part_j%sp == self%electron%sp) THEN
|
||||
ELSEIF(ASSOCIATED(part_j%species, self%electron)) THEN
|
||||
electron => part_j
|
||||
ion => part_i
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ MODULE moduleCollisions
|
|||
electron%n_in = .FALSE.
|
||||
|
||||
!Neutralize ion particle
|
||||
SELECT TYPE(sp => species(ion%sp)%obj)
|
||||
SELECT TYPE(sp => ion%species)
|
||||
TYPE IS(speciesCharged)
|
||||
CALL sp%neutralize(ion)
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ MODULE moduleCollisions
|
|||
sigmaVrel = self%crossSec%get(eRel)*vRel
|
||||
sigmaVrelMaxNew = sigmaVrelMaxNew + sigmaVrel
|
||||
IF (sigmaVrelMaxNew/sigmaVrelMax > random()) THEN
|
||||
SELECT TYPE(sp => species(part_i%sp)%obj)
|
||||
SELECT TYPE(sp => part_i%species)
|
||||
TYPE IS (speciesNeutral)
|
||||
!Species i is neutral, ionize particle i
|
||||
CALL sp%ionize(part_i)
|
||||
|
|
@ -512,7 +512,7 @@ MODULE moduleCollisions
|
|||
|
||||
END SELECT
|
||||
|
||||
SELECT TYPE(sp => species(part_j%sp)%obj)
|
||||
SELECT TYPE(sp => part_j%species)
|
||||
TYPE IS (speciesNeutral)
|
||||
!Species j is neutral, ionize particle j
|
||||
CALL sp%ionize(part_j)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue