Initialize NeutralPopulation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(NeutralPopulation), | intent(inout) | :: | pop | Neutral Population to initialize |
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