From b698e69c5d04a279521f1b56a22047a9badef21e Mon Sep 17 00:00:00 2001 From: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:52:50 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> --- .../Collision/BackgroundMCC/BackgroundMCCCollision.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Particles/Collision/BackgroundMCC/BackgroundMCCCollision.cpp b/Source/Particles/Collision/BackgroundMCC/BackgroundMCCCollision.cpp index 927cf36c12b..80ce13744fd 100644 --- a/Source/Particles/Collision/BackgroundMCC/BackgroundMCCCollision.cpp +++ b/Source/Particles/Collision/BackgroundMCC/BackgroundMCCCollision.cpp @@ -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"); } @@ -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"); }