1 #ifndef ERF_BNDRY_PLANE_INDEX_H
2 #define ERF_BNDRY_PLANE_INDEX_H
6 #include <AMReX_Extension.H>
7 #include <AMReX_GpuQualifiers.H>
8 #include <AMReX_REAL.H>
17 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
20 if (i >=
lo && i <=
hi) {
return i; }
22 const int n =
hi -
lo + 1;
23 const int r = (i -
lo) % n;
24 return lo + ((r < 0) ? r + n : r);
42 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
46 const Real
x = (nodal ? Real(i) : Real(i) + Real(0.5)) / Real(ratio) - Real(0.5);
47 const int i0 =
static_cast<int>(std::floor(
x));
48 const Real w =
x - Real(i0);
GpuArray< Real, AMREX_SPACEDIM > plo
Definition: ERF_ActuatorSpreading.cpp:131
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int bndry_plane_index(int i, int lo, int hi, bool periodic) noexcept
Definition: ERF_BndryPlaneIndex.H:18
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PlaneIndex plane_index(int i, int ratio, bool nodal, int plo, int phi, bool periodic) noexcept
Definition: ERF_BndryPlaneIndex.H:43
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real phi(amrex::Real d, amrex::Real z0, amrex::Real psi) noexcept
Definition: ERF_ImmersedWallCell.H:176
Definition: ERF_BndryPlaneIndex.H:40
amrex::Real w
Definition: ERF_BndryPlaneIndex.H:40
int lo
Definition: ERF_BndryPlaneIndex.H:40
int hi
Definition: ERF_BndryPlaneIndex.H:40