Skip to content

Commit

Permalink
Update macroatom.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Aug 31, 2024
1 parent 1aaaca7 commit 9245fa6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions macroatom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ auto do_macroatom_internal_down_same(const int element, const int ion, const int

// first sum_internal_down_same[i] such that sum_internal_down_same[i] > targetval
const double *const upperval =
std::upper_bound(&sum_internal_down_same[0], &sum_internal_down_same[ndowntrans], targetval);
const ptrdiff_t downtransindex = upperval - &sum_internal_down_same[0];
std::upper_bound(sum_internal_down_same, sum_internal_down_same + ndowntrans, targetval);
const ptrdiff_t downtransindex = upperval - sum_internal_down_same;

assert_always(downtransindex < ndowntrans);
const int lower = globals::elements[element].ions[ion].levels[level].downtrans[downtransindex].targetlevelindex;
Expand Down Expand Up @@ -557,8 +557,8 @@ __host__ __device__ void do_macroatom(Packet &pkt, const MacroAtomState &pktmast

// first sum_internal_up_same[i] such that sum_internal_up_same[i] > targetval
const double *const upperval =
std::upper_bound(&sum_internal_up_same[0], &sum_internal_up_same[nuptrans], targetval);
const ptrdiff_t uptransindex = upperval - &sum_internal_up_same[0];
std::upper_bound(sum_internal_up_same, sum_internal_up_same + nuptrans, targetval);
const ptrdiff_t uptransindex = upperval - sum_internal_up_same;

assert_always(uptransindex < nuptrans);
const int upper = globals::elements[element].ions[ion].levels[level].uptrans[uptransindex].targetlevelindex;
Expand Down

0 comments on commit 9245fa6

Please sign in to comment.