store_neutrals Subroutine

public subroutine store_neutrals(ind, pos, vn, neut_type, dens)

Arguments

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

beam_grid indices

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

Neutral particle position [cm]

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

Neutral particle velocity [cm/s]

integer, intent(in) :: neut_type

Neutral type

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

Neutral density [neutrals/cm^3]


Calls

proc~~store_neutrals~~CallsGraph proc~store_neutrals store_neutrals proc~update_neutrals update_neutrals proc~store_neutrals->proc~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~~store_neutrals~~CalledByGraph proc~store_neutrals store_neutrals proc~ndmc ndmc proc~ndmc->proc~store_neutrals proc~dcx dcx proc~dcx->proc~store_neutrals program~fidasim fidasim program~fidasim->proc~ndmc program~fidasim->proc~dcx

Contents

Source Code


Source Code

subroutine store_neutrals(ind, pos, vn, neut_type, dens)
    !Store neutrals in [[libfida:neut]] at indices `ind`
    integer(Int32), dimension(3), intent(in) :: ind
        !+ [[libfida:beam_grid]] indices
    real(Float64), dimension(3), intent(in)  :: pos
        !+ Neutral particle position [cm]
    real(Float64), dimension(3), intent(in)  :: vn
        !+ Neutral particle velocity [cm/s]
    integer, intent(in)                      :: neut_type
        !+ Neutral type
    real(Float64), dimension(nlevs), intent(in)  :: dens
        !+ Neutral density [neutrals/cm^3]

    select case (neut_type)
        case (nbif_type)
            call update_neutrals(neut%full, ind, vn, dens)
        case (nbih_type)
            call update_neutrals(neut%half, ind, vn, dens)
        case (nbit_type)
            call update_neutrals(neut%third, ind, vn, dens)
        case (dcx_type)
            call update_neutrals(neut%dcx, ind, vn, dens)
        case (halo_type)
            call update_neutrals(neut%halo, ind, vn, dens)
        case default
            if(inputs%verbose.ge.0) then
                write(*,'("STORE_NEUTRALS: Unknown neutral type: ",i2)') neut_type
            endif
            stop
    end select

end subroutine store_neutrals