Skip to content

Commit

Permalink
Use numerical limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Lattanzi committed Nov 6, 2024
1 parent 48e7860 commit a0aa615
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Microphysics/Kessler/ERF_Kessler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void Kessler::AdvanceKessler (const SolverChoice &solverChoice)
{
return { ma_fz_arr[box_no](i,j,k) };
});
wt_max = get<0>(max) + 1.0e-16;
wt_max = get<0>(max) + std::numeric_limits<Real>::epsilon();
n_substep = int( std::ceil(wt_max * coef / CFL_MAX) );
AMREX_ALWAYS_ASSERT(n_substep >= 1);
coef /= Real(n_substep);
Expand Down
2 changes: 1 addition & 1 deletion Source/Microphysics/SAM/ERF_IceFall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void SAM::IceFall (const SolverChoice& sc) {
{
return { ma_fz_arr[box_no](i,j,k) };
});
wt_max = get<0>(max) + 1.0e-16;
wt_max = get<0>(max) + std::numeric_limits<Real>::epsilon();
n_substep = int( std::ceil(wt_max * coef / CFL_MAX) );
AMREX_ALWAYS_ASSERT(n_substep >= 1);
coef /= Real(n_substep);
Expand Down
2 changes: 1 addition & 1 deletion Source/Microphysics/SAM/ERF_PrecipFall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ SAM::PrecipFall (const SolverChoice& sc)
{
return { ma_fz_arr[box_no](i,j,k) };
});
wt_max = get<0>(max) + 1.0e-16;
wt_max = get<0>(max) + std::numeric_limits<Real>::epsilon();
n_substep = int( std::ceil(wt_max * coef / CFL_MAX) );
AMREX_ALWAYS_ASSERT(n_substep >= 1);
coef /= Real(n_substep);
Expand Down

0 comments on commit a0aa615

Please sign in to comment.