1 #ifndef ERF_PROB_HEIGHTS_H_
2 #define ERF_PROB_HEIGHTS_H_
12 #include <AMReX_Array4.H>
13 #include <AMReX_GpuQualifiers.H>
14 #include <AMReX_REAL.H>
19 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
21 z_xface (
int i,
int j,
int k, amrex::Array4<amrex::Real const>
const& z_nd) noexcept
23 return amrex::Real(0.25) * ( z_nd(i,j ,k) + z_nd(i,j ,k+1)
24 + z_nd(i,j+1,k) + z_nd(i,j+1,k+1) );
28 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
30 z_yface (
int i,
int j,
int k, amrex::Array4<amrex::Real const>
const& z_nd) noexcept
32 return amrex::Real(0.25) * ( z_nd(i ,j,k) + z_nd(i ,j,k+1)
33 + z_nd(i+1,j,k) + z_nd(i+1,j,k+1) );
37 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
39 z_zface (
int i,
int j,
int k, amrex::Array4<amrex::Real const>
const& z_nd) noexcept
41 return amrex::Real(0.25) * ( z_nd(i,j ,k) + z_nd(i+1,j ,k)
42 + z_nd(i,j+1,k) + z_nd(i+1,j+1,k) );
47 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
49 z_ground_cc (
int i,
int j, amrex::Array4<amrex::Real const>
const& z_sfc_nd) noexcept
51 return amrex::Real(0.25) * ( z_sfc_nd(i,j ,0) + z_sfc_nd(i+1,j ,0)
52 + z_sfc_nd(i,j+1,0) + z_sfc_nd(i+1,j+1,0) );
56 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
58 z_ground_xface (
int i,
int j, amrex::Array4<amrex::Real const>
const& z_sfc_nd) noexcept
60 return amrex::Real(0.5) * ( z_sfc_nd(i,j,0) + z_sfc_nd(i,j+1,0) );
64 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
66 z_ground_yface (
int i,
int j, amrex::Array4<amrex::Real const>
const& z_sfc_nd) noexcept
68 return amrex::Real(0.5) * ( z_sfc_nd(i,j,0) + z_sfc_nd(i+1,j,0) );
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_ProbHeights.H:16
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_ground_xface(int i, int j, amrex::Array4< amrex::Real const > const &z_sfc_nd) noexcept
Height of the ground under x-face (i,j)
Definition: ERF_ProbHeights.H:58
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_ground_cc(int i, int j, amrex::Array4< amrex::Real const > const &z_sfc_nd) noexcept
Definition: ERF_ProbHeights.H:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_zface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of z-face (i,j,k)
Definition: ERF_ProbHeights.H:39
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_yface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of y-face (i,j,k)
Definition: ERF_ProbHeights.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_xface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of x-face (i,j,k)
Definition: ERF_ProbHeights.H:21
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_ground_yface(int i, int j, amrex::Array4< amrex::Real const > const &z_sfc_nd) noexcept
Height of the ground under y-face (i,j)
Definition: ERF_ProbHeights.H:66