Skip to content

Commit

Permalink
machine limit the output
Browse files Browse the repository at this point in the history
  • Loading branch information
SamG-01 committed Dec 13, 2024
1 parent 92aa762 commit 83c6103
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion screening/screen.H
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ number_t debye_huckel (const plasma_state_t<number_t>& state,

// eq. A1
number_t h_DH = z1z2 * gcem::sqrt(3 * amrex::Math::powi<3>(Gamma_e) * z_ratio);
return admath::exp(h_DH);

// machine limit the output
constexpr amrex::Real h_max = 300.e0_rt;
h = admath::min(h_DH, h_max);
return admath::exp(h);
}

#if SCREEN_METHOD == SCREEN_METHOD_screen5
Expand Down

0 comments on commit 83c6103

Please sign in to comment.