Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Roelof Groenewald <[email protected]>
  • Loading branch information
RevathiJambunathan and roelof-groenewald authored Jun 14, 2024
1 parent e7dbb02 commit b698e69
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ BackgroundMCCCollision::doCollisions (amrex::Real cur_time, amrex::Real dt, Mult
// dt has to be small enough that a linear expansion of the collision
// probability is sufficiently accurately, otherwise the MCC results
// will be very heavily affected by small changes in the timestep
if (coll_n < 0.1_prt) {
if (coll_n > 0.1_prt) {
ablastr::warn_manager::WMRecordWarning("BackgroundMCC Collisions",
"dt is too large to ensure accurate MCC results , coll_n: " +
std::to_string(coll_n) + " is < 0.1 and collision probability is = " +
std::to_string(coll_n) + " is > 0.1 and collision probability is = " +
std::to_string(m_total_collision_prob) + "\n");
}

Expand All @@ -249,10 +249,10 @@ BackgroundMCCCollision::doCollisions (amrex::Real cur_time, amrex::Real dt, Mult
auto coll_n_ioniz = m_nu_max_ioniz * dt;
m_total_collision_prob_ioniz = 1.0_prt - std::exp(-coll_n_ioniz);

if (coll_n_ioniz < 0.1_prt) {
if (coll_n_ioniz > 0.1_prt) {
ablastr::warn_manager::WMRecordWarning("BackgroundMCC Collisions",
"dt is too large to ensure accurate MCC ionization , coll_n_ionization: " +
std::to_string(coll_n_ioniz) + " is < 0.1 and ionization probability is = " +
std::to_string(coll_n_ioniz) + " is > 0.1 and ionization probability is = " +
std::to_string(m_total_collision_prob_ioniz) + "\n");
}

Expand Down

0 comments on commit b698e69

Please sign in to comment.