Merge branch 'issue/ionizationBoundaryCell' into 'development'

Fix an issue in assigning cells in ionization Boundary

See merge request JorgeGonz/fpakc!35
This commit is contained in:
Jorge Gonzalez 2023-02-03 09:54:58 +00:00
commit 3646474d3d

View file

@ -156,8 +156,14 @@ MODULE moduleMeshBoundary
newElectron%r = edge%randPos() newElectron%r = edge%randPos()
newIon%r = newElectron%r newIon%r = newElectron%r
newElectron%cell = part%cell IF (ASSOCIATED(edge%e1)) THEN
newIon%cell = part%cell newElectron%cell = edge%e1%n
ELSEIF (ASSOCIATED(edge%e2)) THEN
newElectron%cell = edge%e2%n
END IF
newIon%cell = newElectron%cell
newElectron%Xi = mesh%cells(part%cell)%obj%phy2log(newElectron%r) newElectron%Xi = mesh%cells(part%cell)%obj%phy2log(newElectron%r)
newIon%Xi = newElectron%Xi newIon%Xi = newElectron%Xi
@ -178,6 +184,9 @@ MODULE moduleMeshBoundary
eRel = eRel - bound%eThreshold eRel = eRel - bound%eThreshold
vRel = 2.D0*DSQRT(eRel)/mRel vRel = 2.D0*DSQRT(eRel)/mRel
!Reduce number of possible ionizations
nIonizations = nIonizations - 1
END IF END IF
END DO END DO