Skip to content

Commit

Permalink
Even more places where data() + size() is used instead of end()
Browse files Browse the repository at this point in the history
  • Loading branch information
moprak-nrel committed Nov 14, 2024
1 parent d31dc1c commit 4e2b21e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,8 @@ void ABLMesoForcingMom::operator()(
// averaged velocities (non tendency)
const amrex::Real* vheights_begin =
(m_tendency) ? m_meso_ht.data() : m_vavg_ht.data();
const amrex::Real* vheights_end = (m_tendency)
? m_meso_ht.data() + m_meso_ht.size()
: m_vavg_ht.data() + m_vavg_ht.size();
const amrex::Real* vheights_end =
(m_tendency) ? m_meso_ht.end() : m_vavg_ht.end();
const amrex::Real* u_error_val = m_error_meso_avg_U.data();
const amrex::Real* v_error_val = m_error_meso_avg_V.data();
const int idir = (int)m_axis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ void ABLMesoForcingTemp::operator()(
const amrex::Real* theights_begin =
(m_tendency) ? m_meso_ht.data() : m_theta_ht.data();
const amrex::Real* theights_end =
(m_tendency) ? m_meso_ht.data() + m_meso_ht.size()
: m_theta_ht.data() + m_theta_ht.size();
(m_tendency) ? m_meso_ht.end() : m_theta_ht.end();
const amrex::Real* theta_error_val = m_error_meso_avg_theta.data();

const int idir = (int)m_axis;
Expand Down
3 changes: 1 addition & 2 deletions amr-wind/turbulence/LES/AMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ void AMD<Transport>::update_turbulent_viscosity(
tpa_deriv_d.begin());

const amrex::Real* p_tpa_coord_begin = tpa_coord_d.data();
const amrex::Real* p_tpa_coord_end =
tpa_coord_d.data() + tpa_coord_d.size();
const amrex::Real* p_tpa_coord_end = tpa_coord_d.end();
const amrex::Real* p_tpa_deriv = tpa_deriv_d.data();
const int nlevels = repo.num_active_levels();
for (int lev = 0; lev < nlevels; ++lev) {
Expand Down

0 comments on commit 4e2b21e

Please sign in to comment.