init_neutral_population Subroutine

public subroutine init_neutral_population(pop)

Initialize NeutralPopulation

Arguments

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

Neutral Population to initialize


Called by

proc~~init_neutral_population~~CalledByGraph proc~init_neutral_population init_neutral_population proc~read_neutral_population read_neutral_population proc~read_neutral_population->proc~init_neutral_population proc~halo halo proc~halo->proc~init_neutral_population proc~dcx dcx proc~dcx->proc~init_neutral_population proc~ndmc ndmc proc~ndmc->proc~init_neutral_population proc~read_neutrals read_neutrals proc~read_neutrals->proc~read_neutral_population program~fidasim fidasim program~fidasim->proc~halo program~fidasim->proc~dcx program~fidasim->proc~ndmc program~fidasim->proc~read_neutrals

Contents


Source Code

subroutine init_neutral_population(pop)
    !+ Initialize [[NeutralPopulation]]
    type(NeutralPopulation), intent(inout) :: pop
        !+ Neutral Population to initialize

    integer :: i, j, k, ic, ind(3)

    if(.not.allocated(pop%dens)) then
        allocate(pop%dens(nlevs,beam_grid%nx,beam_grid%ny,beam_grid%nz))
    endif
    if(.not.allocated(pop%res)) then
        allocate(pop%res(beam_grid%nx,beam_grid%ny,beam_grid%nz))
    endif
    pop%dens = 0.d0
    pop%res%n = 0

end subroutine init_neutral_population