Skip to content

Commit

Permalink
Update update_packets.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 1, 2024
1 parent 6aaee0e commit 7a66ef1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions update_packets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ void do_nonthermal_predeposit(Packet &pkt, const int nts, const double t2) {
// for endot independent of energy, the next line is trival (for E dependent endot, an integral would be needed)

const double t_enzero = ts + (particle_en / endot); // time at which zero energy is reached
if (t_enzero > t2) {
en_deposited = pkt.e_cmf * (t2 - ts) / (particle_en / endot);
} else {
en_deposited = pkt.e_cmf * (t_enzero - ts) / (particle_en / endot);
}
en_deposited = pkt.e_cmf * (std::min(t2, t_enzero) - ts) / (particle_en / endot);

// A discrete absorption event should occur somewhere along the
// continuous track from initial kinetic energy to zero KE.
Expand Down

0 comments on commit 7a66ef1

Please sign in to comment.