5#ifndef HYDRO_MOL_EDGE_STATE_K_H_
6#define HYDRO_MOL_EDGE_STATE_K_H_
7#include <AMReX_Slopes_K.H>
18 int domlo,
int domhi,
bool is_velocity,
bool allow_inflow_on_outflow)
noexcept
35 if (edlo && i < domlo)
37 qs = q(domlo-1,j,k,n);
39 else if ( edhi && i > domhi+1)
41 qs = q(domhi+1,j,k,n);
46 amrex_calc_xslope_extdir( i , j, k, n, order, q, extdir_or_ho_lo, extdir_or_ho_hi, domlo, domhi );
48 amrex_calc_xslope_extdir( i-1, j, k, n, order, q, extdir_or_ho_lo, extdir_or_ho_hi, domlo, domhi );
50 HydroBC::SetEdgeBCsLo(0,i,j,k,n,q,qmns,qpls,umac(i,j,k),d_bcrec[n].lo(0),domlo,is_velocity);
51 HydroBC::SetEdgeBCsHi(0,i,j,k,n,q,qmns,qpls,umac(i,j,k),d_bcrec[n].hi(0),domhi,is_velocity);
56 if (!allow_inflow_on_outflow)
92 int domlo,
int domhi,
bool is_velocity,
bool allow_inflow_on_outflow)
noexcept
101 HydroBC::SetEdgeBCsLo(0,i,j,k,n,q,qmns,qpls,umac(i,j,k),d_bcrec[n].lo(0),domlo,is_velocity);
102 HydroBC::SetEdgeBCsHi(0,i,j,k,n,q,qmns,qpls,umac(i,j,k),d_bcrec[n].hi(0),domhi,is_velocity);
107 if (!allow_inflow_on_outflow)
143 int domlo,
int domhi,
bool is_velocity,
bool allow_inflow_on_outflow)
noexcept
160 if (edlo && j < domlo)
162 qs = q(i,domlo-1,k,n);
164 else if ( edhi && j > domhi+1)
166 qs = q(i,domhi+1,k,n);
171 amrex_calc_yslope_extdir( i, j , k, n, order, q, extdir_or_ho_lo, extdir_or_ho_hi, domlo, domhi );
173 amrex_calc_yslope_extdir( i, j-1, k, n, order, q, extdir_or_ho_lo, extdir_or_ho_hi, domlo, domhi );
175 HydroBC::SetEdgeBCsLo(1,i,j,k,n,q,qmns,qpls,vmac(i,j,k),d_bcrec[n].lo(1),domlo,is_velocity);
176 HydroBC::SetEdgeBCsHi(1,i,j,k,n,q,qmns,qpls,vmac(i,j,k),d_bcrec[n].hi(1),domhi,is_velocity);
181 if (!allow_inflow_on_outflow)
219 int domlo,
int domhi,
bool is_velocity,
bool allow_inflow_on_outflow)
noexcept
228 HydroBC::SetEdgeBCsLo(1,i,j,k,n,q,qmns,qpls,vmac(i,j,k), d_bcrec[n].lo(1),domlo,is_velocity);
229 HydroBC::SetEdgeBCsHi(1,i,j,k,n,q,qmns,qpls,vmac(i,j,k), d_bcrec[n].hi(1),domhi,is_velocity);
234 if (!allow_inflow_on_outflow)
265#if (AMREX_SPACEDIM==3)
268amrex::Real hydro_mol_zedge_state_extdir (
int i,
int j,
int k,
int n,
272 int domlo,
int domhi,
bool is_velocity,
bool allow_inflow_on_outflow)
noexcept
289 if (edlo && k < domlo)
291 qs = q(i,j,domlo-1,n);
293 else if ( edhi && k > domhi+1)
295 qs = q(i,j,domhi+1,n);
300 amrex_calc_zslope_extdir( i, j, k , n, order, q, extdir_or_ho_lo, extdir_or_ho_hi, domlo, domhi );
302 amrex_calc_zslope_extdir( i, j, k-1, n, order, q, extdir_or_ho_lo, extdir_or_ho_hi, domlo, domhi );
304 HydroBC::SetEdgeBCsLo(2,i,j,k,n,q,qmns,qpls,wmac(i,j,k),d_bcrec[n].lo(2),domlo,is_velocity);
305 HydroBC::SetEdgeBCsHi(2,i,j,k,n,q,qmns,qpls,wmac(i,j,k),d_bcrec[n].hi(2),domhi,is_velocity);
310 if (!allow_inflow_on_outflow)
344amrex::Real hydro_mol_zedge_state (
int i,
int j,
int k,
int n,
348 int domlo,
int domhi,
bool is_velocity,
bool allow_inflow_on_outflow)
noexcept
357 HydroBC::SetEdgeBCsLo(2,i,j,k,n,q,qmns,qpls,wmac(i,j,k),d_bcrec[n].lo(2),domlo,is_velocity);
358 HydroBC::SetEdgeBCsHi(2,i,j,k,n,q,qmns,qpls,wmac(i,j,k),d_bcrec[n].hi(2),domhi,is_velocity);
363 if (!allow_inflow_on_outflow)
#define AMREX_FORCE_INLINE
#define YVEL
Definition hydro_constants.H:29
static constexpr amrex::Real small_vel
Definition hydro_constants.H:37
#define XVEL
Definition hydro_constants.H:28
#define ZVEL
Definition hydro_constants.H:30
__host__ __device__ constexpr const T & min(const T &a, const T &b) noexcept
__host__ __device__ constexpr const T & max(const T &a, const T &b) noexcept
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetEdgeBCsHi(int edge_dir, int i, int j, int k, int n, const amrex::Array4< const amrex::Real > &s, amrex::Real &lo, amrex::Real &hi, amrex::Real macvel, int bchi, int domhi, bool is_velocity)
Boundary condition effects.
Definition hydro_bcs_K.H:272
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetEdgeBCsLo(int edge_dir, int i, int j, int k, int n, const amrex::Array4< const amrex::Real > &s, amrex::Real &lo, amrex::Real &hi, amrex::Real macvel, int bclo, int domlo, bool is_velocity)
Boundary condition effects.
Definition hydro_bcs_K.H:204
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real hydro_mol_yedge_state_extdir(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &vmac, amrex::BCRec const *const d_bcrec, int domlo, int domhi, bool is_velocity, bool allow_inflow_on_outflow) noexcept
Definition hydro_mol_edge_state_K.H:139
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real hydro_mol_yedge_state(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &vmac, amrex::BCRec const *const d_bcrec, int domlo, int domhi, bool is_velocity, bool allow_inflow_on_outflow) noexcept
Definition hydro_mol_edge_state_K.H:215
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real hydro_mol_xedge_state(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &umac, amrex::BCRec const *const d_bcrec, int domlo, int domhi, bool is_velocity, bool allow_inflow_on_outflow) noexcept
Definition hydro_mol_edge_state_K.H:88
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real hydro_mol_xedge_state_extdir(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &umac, amrex::BCRec const *const d_bcrec, int domlo, int domhi, bool is_velocity, bool allow_inflow_on_outflow) noexcept
Definition hydro_mol_edge_state_K.H:14