Skip to content

Commit

Permalink
Merge pull request #201 from mklauser/fix189
Browse files Browse the repository at this point in the history
A critical warning was added to the model indicating that no packet has left the simulation through the outer boundary.
  • Loading branch information
mklauser committed Dec 2, 2014
2 parents cf7ed67 + 33bce85 commit ebc2b55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tardis/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ def simulate(self, update_radiation_field=True, enable_virtual=False, initialize
montecarlo.montecarlo_radial1d(self,
virtual_packet_flag=no_of_virtual_packets)

if np.sum(montecarlo_energies < 0) == len(montecarlo_energies):
logger.critical("No r-packet escaped through the outer boundary.")

self.montecarlo_nu = montecarlo_nu * u.Hz
self.montecarlo_luminosity = montecarlo_energies * 1 * u.erg / self.time_of_simulation

Expand Down

0 comments on commit ebc2b55

Please sign in to comment.