Skip to content

Commit

Permalink
we don't need NVAR_max components in velocity bc arrays (erf-model#1781)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Sep 2, 2024
1 parent 66784a7 commit 88ecfd7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Source/BoundaryConditions/BoundaryConditions_xvel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void ERFPhysBCFunct_u::impose_lateral_xvel_bcs (const Array4<Real>& dest_arr,
Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin());
const BCRec* bc_ptr = bcrs_d.data();

GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,1> l_bc_extdir_vals_d;

for (int i = 0; i < ncomp; i++)
for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++)
Expand Down Expand Up @@ -201,7 +201,7 @@ void ERFPhysBCFunct_u::impose_vertical_xvel_bcs (const Array4<Real>& dest_arr,
Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin());
const BCRec* bc_ptr = bcrs_d.data();

GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,1> l_bc_extdir_vals_d;

for (int i = 0; i < ncomp; i++)
for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++)
Expand Down
4 changes: 2 additions & 2 deletions Source/BoundaryConditions/BoundaryConditions_yvel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void ERFPhysBCFunct_v::impose_lateral_yvel_bcs (const Array4<Real>& dest_arr,
Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin());
const BCRec* bc_ptr = bcrs_d.data();

GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>, AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>, 1> l_bc_extdir_vals_d;

for (int i = 0; i < ncomp; i++)
for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++)
Expand Down Expand Up @@ -200,7 +200,7 @@ void ERFPhysBCFunct_v::impose_vertical_yvel_bcs (const Array4<Real>& dest_arr,
Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin());
const BCRec* bc_ptr = bcrs_d.data();

GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>, AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>, 1> l_bc_extdir_vals_d;

for (int i = 0; i < ncomp; i++)
for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++)
Expand Down
4 changes: 2 additions & 2 deletions Source/BoundaryConditions/BoundaryConditions_zvel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void ERFPhysBCFunct_w::impose_lateral_zvel_bcs (const Array4<Real >& dest_a
Gpu::copyAsync(Gpu::hostToDevice, bcrs_w.begin(), bcrs_w.end(), bcrs_w_d.begin());
const BCRec* bc_ptr_w = bcrs_w_d.data();

GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,1> l_bc_extdir_vals_d;

bool l_use_terrain = (m_z_phys_nd != nullptr);

Expand Down Expand Up @@ -197,7 +197,7 @@ void ERFPhysBCFunct_w::impose_vertical_zvel_bcs (const Array4<Real>& dest_arr,
bool l_use_terrain = (m_z_phys_nd != nullptr);
bool l_moving_terrain = (terrain_type == TerrainType::Moving);

GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d;
GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>,1> l_bc_extdir_vals_d;

for (int i = 0; i < ncomp; i++) {
for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++) {
Expand Down

0 comments on commit 88ecfd7

Please sign in to comment.