Skip to content

Commit

Permalink
Codespell fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Lattanzi committed Jul 31, 2024
1 parent 24fdb29 commit bcc1651
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Source/Diffusion/PBLModels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ ComputeTurbulentViscosityPBL (const MultiFab& xvel,
AMREX_ASSERT_WITH_MESSAGE(qvel(i,j,k) > 0.0, "QKE must have a positive value");
AMREX_ASSERT_WITH_MESSAGE(qvel_old(i,j,k) > 0.0, "Old QKE must have a positive value");

// NOTE: This factor is to avoid an if statment that will break
// NOTE: This factor is to avoid an if statement that will break
// the devicereducesum since all threads won't participate.
// This more performent than Gpu::Atomic::Add.
// This more performant than Gpu::Atomic::Add.
Real fac = (sbx.contains(i,j,k)) ? 1.0 : 0.0;
const Real Zval = Compute_Zrel_AtCellCenter(i,j,k,z_nd_arr);
const Real dz = Compute_h_zeta_AtCellCenter(i,j,k,invCellSize,z_nd_arr);
Expand All @@ -119,9 +119,9 @@ ComputeTurbulentViscosityPBL (const MultiFab& xvel,

// Not multiplying by dz: its constant and would fall out when we divide qint0/qint1 anyway

// NOTE: This factor is to avoid an if statment that will break
// NOTE: This factor is to avoid an if statement that will break
// the devicereducesum since all threads won't participate.
// This more performent than Gpu::Atomic::Add.
// This more performant than Gpu::Atomic::Add.
Real fac = (sbx.contains(i,j,k)) ? 1.0 : 0.0;
const Real Zval = gdata.ProbLo(2) + (k + 0.5)*gdata.CellSize(2);
Gpu::deviceReduceSum(&qint(i,j,0,0), Zval*qvel(i,j,k)*fac, handler);
Expand Down
4 changes: 2 additions & 2 deletions Source/Utils/PlaneAverage.H
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ PlaneAverage::compute_averages (const IndexSelector& idxOp, const amrex::MultiFa
for (int i = lbx.smallEnd(0); i <= lbx.bigEnd(0); ++i) {
int ind = idxOp.getIndx(i, j, k) + offset;
for (int n = 0; n < ncomp; ++n) {
// NOTE: This factor is to avoid an if statment that will break
// NOTE: This factor is to avoid an if statement that will break
// the devicereducesum since all threads won't participate.
// This more performent than Gpu::Atomic::Add.
// This more performant than Gpu::Atomic::Add.
amrex::Real fac = (mask_arr(i,j,k)) ? 1.0 : 0.0;
amrex::Gpu::deviceReduceSum(&line_avg[ncomp * ind + n],
fab_arr(i, j, k, n) * denom * fac, handler);
Expand Down

0 comments on commit bcc1651

Please sign in to comment.