From 4eb65d28492d9ca1e5f28800f7161128edb2b267 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Mon, 6 Jan 2025 17:10:08 -0800 Subject: [PATCH] fix for gpu (take 2) --- Source/EB/ERF_TerrainIF.H | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/EB/ERF_TerrainIF.H b/Source/EB/ERF_TerrainIF.H index 5da936704..bd1222be4 100644 --- a/Source/EB/ERF_TerrainIF.H +++ b/Source/EB/ERF_TerrainIF.H @@ -22,6 +22,8 @@ public: dx = m_geom.CellSizeArray()[0]; dy = m_geom.CellSizeArray()[1]; + + terr_arr = m_terr.const_array(); } AMREX_GPU_HOST_DEVICE inline @@ -40,11 +42,11 @@ public: } protected: - amrex::Geometry& m_geom; - amrex::Real dx, dy; + amrex::FArrayBox& m_terr; + amrex::Array4 terr_arr; - amrex::FArrayBox& m_terr; - amrex::Array4 const& terr_arr = m_terr.const_array(); + amrex::Geometry& m_geom; + amrex::Real dx, dy; }; #endif