4 #ifndef ERF_EARTH_RELATIVE_WIND_H_
5 #define ERF_EARTH_RELATIVE_WIND_H_
7 #include <AMReX_Array4.H>
8 #include <AMReX_GpuQualifiers.H>
9 #include <AMReX_REAL.H>
28 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
37 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
49 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
74 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
78 const int im = (i - 1 > ilo) ? i - 1 : ilo;
79 const int ip = (i + 1 < ihi) ? i + 1 : ihi;
90 const amrex::Real north = (ll(ip,j,0,0) - ll(im,j,0,0)) * inv_di;
92 const amrex::Real norm = std::sqrt(east*east + north*north);
Dimensionless numeric literals and pure mathematical constants.
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:46
Real sin_alpha
Definition: ERF_Plotfile2DInterpolator.cpp:29
Real u_east
Definition: ERF_Plotfile2DInterpolator.cpp:21
Real v_north
Definition: ERF_Plotfile2DInterpolator.cpp:22
Real cos_alpha
Definition: ERF_Plotfile2DInterpolator.cpp:28
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_EarthRelativeWind.H:26
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void grid_to_earth(amrex::Real u, amrex::Real v, amrex::Real cos_alpha, amrex::Real sin_alpha, amrex::Real &u_east, amrex::Real &v_north) noexcept
Definition: ERF_EarthRelativeWind.H:29
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real horizontal_speed(amrex::Real u_east, amrex::Real v_north) noexcept
Definition: ERF_EarthRelativeWind.H:38
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real meteorological_direction(amrex::Real u_east, amrex::Real v_north, amrex::Real missing_value) noexcept
Definition: ERF_EarthRelativeWind.H:50
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void grid_rotation_at(const amrex::Array4< const amrex::Real > &ll, int ilo, int ihi, int i, int j, amrex::Real &cos_alpha, amrex::Real &sin_alpha) noexcept
Definition: ERF_EarthRelativeWind.H:75