Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ParticleTrack), | intent(in), | dimension(:) | :: | tracks | Neutral Particle Track |
|
integer, | intent(in) | :: | ncell | Number of cell in the particle track |
||
integer, | value | :: | neut_type | Neutral type |
subroutine store_neutrals_track(tracks, ncell, neut_type)
!Store neutrals in [[libfida:neut]] from track
type(ParticleTrack), dimension(:), intent(in) :: tracks
!+ Neutral Particle Track
integer, intent(in) :: ncell
!+ Number of cell in the particle track
integer, value :: neut_type
!+ Neutral type
integer :: n,i1,i2,i3
!$OMP CRITICAL(store_neutrals_m)
do n=1,ncell
i1 = tracks(n)%ind(1)
i2 = tracks(n)%ind(2)
i3 = tracks(n)%ind(3)
neut%dens(:,neut_type,i1,i2,i3) = &
neut%dens(:,neut_type,i1,i2,i3)+tracks(n)%dens ![neutrals/cm^3]
if(tracks(n)%in_plasma) then
halo_iter_dens(neut_type) = halo_iter_dens(neut_type) + sum(tracks(n)%dens)
endif
enddo
!$OMP END CRITICAL(store_neutrals_m)
end subroutine store_neutrals_track