Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/grid/grid_physics_3d.f90
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ subroutine setup_grid_physics(group, use_mrw, use_pda, compute_specific_energy_s
allocate(density(geo%n_cells, n_dust))
allocate(specific_energy(geo%n_cells, n_dust))
allocate(specific_energy_spectrum(geo%n_cells,n_dust,n_nu_bins))
! initialize: this array is only fully populated later (from the
! photon deposits, or from the minimum specific energy), but with
! specific_energy_type='additional' it is COPIED into
! specific_energy_additional_spectrum before that happens -- copying
! an uninitialized allocation injects heap garbage into the
! frequency-resolved output at every iteration.
specific_energy_spectrum = 0._dp

if(n_dust > 0) then

Expand Down
Loading