From 88ecfd743f0ae5422b69d75f5f59b22e3ae36a37 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Sun, 1 Sep 2024 20:24:48 -0700 Subject: [PATCH] we don't need NVAR_max components in velocity bc arrays (#1781) --- Source/BoundaryConditions/BoundaryConditions_xvel.cpp | 4 ++-- Source/BoundaryConditions/BoundaryConditions_yvel.cpp | 4 ++-- Source/BoundaryConditions/BoundaryConditions_zvel.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/BoundaryConditions/BoundaryConditions_xvel.cpp b/Source/BoundaryConditions/BoundaryConditions_xvel.cpp index f2fb054b4..2c3eb8edd 100644 --- a/Source/BoundaryConditions/BoundaryConditions_xvel.cpp +++ b/Source/BoundaryConditions/BoundaryConditions_xvel.cpp @@ -39,7 +39,7 @@ void ERFPhysBCFunct_u::impose_lateral_xvel_bcs (const Array4& dest_arr, Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin()); const BCRec* bc_ptr = bcrs_d.data(); - GpuArray,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d; + GpuArray,1> l_bc_extdir_vals_d; for (int i = 0; i < ncomp; i++) for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++) @@ -201,7 +201,7 @@ void ERFPhysBCFunct_u::impose_vertical_xvel_bcs (const Array4& dest_arr, Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin()); const BCRec* bc_ptr = bcrs_d.data(); - GpuArray,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d; + GpuArray,1> l_bc_extdir_vals_d; for (int i = 0; i < ncomp; i++) for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++) diff --git a/Source/BoundaryConditions/BoundaryConditions_yvel.cpp b/Source/BoundaryConditions/BoundaryConditions_yvel.cpp index 4d385f95a..2fe5825ef 100644 --- a/Source/BoundaryConditions/BoundaryConditions_yvel.cpp +++ b/Source/BoundaryConditions/BoundaryConditions_yvel.cpp @@ -37,7 +37,7 @@ void ERFPhysBCFunct_v::impose_lateral_yvel_bcs (const Array4& dest_arr, Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin()); const BCRec* bc_ptr = bcrs_d.data(); - GpuArray, AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d; + GpuArray, 1> l_bc_extdir_vals_d; for (int i = 0; i < ncomp; i++) for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++) @@ -200,7 +200,7 @@ void ERFPhysBCFunct_v::impose_vertical_yvel_bcs (const Array4& dest_arr, Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin()); const BCRec* bc_ptr = bcrs_d.data(); - GpuArray, AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d; + GpuArray, 1> l_bc_extdir_vals_d; for (int i = 0; i < ncomp; i++) for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++) diff --git a/Source/BoundaryConditions/BoundaryConditions_zvel.cpp b/Source/BoundaryConditions/BoundaryConditions_zvel.cpp index e214b4040..d50c9aecd 100644 --- a/Source/BoundaryConditions/BoundaryConditions_zvel.cpp +++ b/Source/BoundaryConditions/BoundaryConditions_zvel.cpp @@ -43,7 +43,7 @@ void ERFPhysBCFunct_w::impose_lateral_zvel_bcs (const Array4& 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,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d; + GpuArray,1> l_bc_extdir_vals_d; bool l_use_terrain = (m_z_phys_nd != nullptr); @@ -197,7 +197,7 @@ void ERFPhysBCFunct_w::impose_vertical_zvel_bcs (const Array4& dest_arr, bool l_use_terrain = (m_z_phys_nd != nullptr); bool l_moving_terrain = (terrain_type == TerrainType::Moving); - GpuArray,AMREX_SPACEDIM+NVAR_max> l_bc_extdir_vals_d; + GpuArray,1> l_bc_extdir_vals_d; for (int i = 0; i < ncomp; i++) { for (int ori = 0; ori < 2*AMREX_SPACEDIM; ori++) {