update_neutrals Subroutine

public subroutine update_neutrals(pop, ind, vn, dens)

Update [NeutralPopulation]] pop at ind

Arguments

TypeIntentOptionalAttributesName
type(NeutralPopulation), intent(inout) :: pop

Neutral Population

integer(kind=Int32), intent(in), dimension(3):: ind

beam_grid indices

real(kind=Float64), intent(in), dimension(3):: vn

Neutral particle velocity [cm/s]

real(kind=Float64), intent(in), dimension(:):: dens

Neutral density [neutrals/cm^3]


Calls

proc~~update_neutrals~~CallsGraph proc~update_neutrals update_neutrals proc~update_reservoir update_reservoir proc~update_neutrals->proc~update_reservoir proc~init_reservoir init_reservoir proc~update_reservoir->proc~init_reservoir interface~randind randind proc~update_reservoir->interface~randind interface~randu randu proc~update_reservoir->interface~randu proc~init_reservoir->interface~randu

Called by

proc~~update_neutrals~~CalledByGraph proc~update_neutrals update_neutrals proc~store_neutrals store_neutrals proc~store_neutrals->proc~update_neutrals proc~halo halo proc~halo->proc~update_neutrals proc~ndmc ndmc proc~ndmc->proc~store_neutrals program~fidasim fidasim program~fidasim->proc~halo program~fidasim->proc~ndmc proc~dcx dcx program~fidasim->proc~dcx proc~dcx->proc~store_neutrals

Contents

Source Code


Source Code

subroutine update_neutrals(pop, ind, vn, dens)
    !+Update [NeutralPopulation]] `pop` at `ind`
    type(NeutralPopulation), intent(inout)   :: pop
        !+ Neutral Population
    integer(Int32), dimension(3), intent(in) :: ind
        !+ [[libfida:beam_grid]] indices
    real(Float64), dimension(3), intent(in)  :: vn
        !+ Neutral particle velocity [cm/s]
    real(Float64), dimension(:), intent(in)  :: dens
        !+ Neutral density [neutrals/cm^3]

    integer :: i, j, k

    i = ind(1) ; j = ind(2) ; k = ind(3)

    !$OMP CRITICAL(update_neutrals_1)
    pop%dens(:,i,j,k) = pop%dens(:,i,j,k) + dens
    !$OMP END CRITICAL(update_neutrals_1)

    call update_reservoir(pop%res(i,j,k), vn, sum(dens))

end subroutine update_neutrals