Skip to content

Commit

Permalink
Update rpkt.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Mar 7, 2025
1 parent d3ac371 commit 3aa3076
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rpkt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,6 @@ __host__ __device__ void do_rpkt(Packet &pkt, const double t2) {
while (true) {
const auto nonemptymgi = grid::get_propcell_nonemptymgi(pkt.where);

// Assign optical depth to next physical event
const double zrand = rng_uniform_pos();
const double tau_next = -1. * log(zrand);

// Start by finding the distance to the crossing of the grid cell
// boundaries. sdist is the boundary distance and snext is the
// grid cell into which we pass.
Expand Down Expand Up @@ -879,6 +875,8 @@ __host__ __device__ void do_rpkt(Packet &pkt, const double t2) {
const double abort_dist = std::min(tdist, sdist);

// Get distance to the next physical event (continuum or bound-bound)
const double zrand = rng_uniform_pos();
const double tau_next = -1. * log(zrand);
double edist = -1;
bool event_is_boundbound = true;
const bool thickcell = (nonemptymgi >= 0) && (grid::modelgrid[nonemptymgi].thick == 1);
Expand Down

0 comments on commit 3aa3076

Please sign in to comment.