Skip to content

Commit

Permalink
fix for gpu (take 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren committed Jan 7, 2025
1 parent 3ea239c commit 4eb65d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/EB/ERF_TerrainIF.H
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,11 +42,11 @@ public:
}

protected:
amrex::Geometry& m_geom;
amrex::Real dx, dy;
amrex::FArrayBox& m_terr;
amrex::Array4<amrex::Real const> terr_arr;

amrex::FArrayBox& m_terr;
amrex::Array4<amrex::Real const> const& terr_arr = m_terr.const_array();
amrex::Geometry& m_geom;
amrex::Real dx, dy;
};

#endif

0 comments on commit 4eb65d2

Please sign in to comment.