Skip to content

Commit

Permalink
Avoiding extra divide
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahesh Natarajan committed Nov 16, 2023
1 parent 38c2861 commit fb48acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/TimeIntegration/ERF_make_buoyancy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ void make_buoyancy (Vector<MultiFab>& S_data,
amrex::ParallelFor(tbz, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
Real rhop_hi = cell_data(i,j,k ,Rho_comp) * (1.0 + qv_data(i,j,k ) + qc_data(i,j,k )
+ qi_data(i,j,k ) + cell_data(i,j,k,RhoQp_comp)/cell_data(i,j,k,Rho_comp)) - r0_arr(i,j,k );
+ qi_data(i,j,k )) + cell_data(i,j,k,RhoQp_comp) - r0_arr(i,j,k );
Real rhop_lo = cell_data(i,j,k-1,Rho_comp) * (1.0 + qv_data(i,j,k-1) + qc_data(i,j,k-1)
+ qi_data(i,j,k-1) + + cell_data(i,j,k-1,RhoQp_comp)/cell_data(i,j,k-1,Rho_comp)) - r0_arr(i,j,k-1);
+ qi_data(i,j,k-1)) + cell_data(i,j,k-1,RhoQp_comp) - r0_arr(i,j,k-1);
buoyancy_fab(i, j, k) = grav_gpu[2] * 0.5 * ( rhop_hi + rhop_lo );
});
} // mfi
Expand Down

0 comments on commit fb48acc

Please sign in to comment.