1 #ifndef ERF_ADVECTION_H_
2 #define ERF_ADVECTION_H_
5 #include <AMReX_MultiFab.H>
6 #include <AMReX_BCRec.H>
7 #include <AMReX_YAFluxRegister.H>
15 const amrex::Array4<amrex::Real>& src,
16 const amrex::Array4<const amrex::Real>& rho_u,
17 const amrex::Array4<const amrex::Real>& rho_v,
18 const amrex::Array4<const amrex::Real>&
omega,
19 const amrex::Array4< amrex::Real>& avg_xmom,
20 const amrex::Array4< amrex::Real>& avg_ymom,
21 const amrex::Array4< amrex::Real>& avg_zmom,
22 const amrex::Array4<const amrex::Real>& ax_arr,
23 const amrex::Array4<const amrex::Real>& ay_arr,
24 const amrex::Array4<const amrex::Real>& az_arr,
25 const amrex::Array4<const amrex::Real>& detJ,
26 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
27 const amrex::Array4<const amrex::Real>& mf_m,
28 const amrex::Array4<const amrex::Real>& mf_u,
29 const amrex::Array4<const amrex::Real>& mf_v,
30 const amrex::GpuArray<
const amrex::Array4<amrex::Real>, AMREX_SPACEDIM>& flx_arr,
31 const bool const_rho);
36 const int icomp,
const int ncomp,
37 const amrex::Array4<const amrex::Real>& avg_xmom,
38 const amrex::Array4<const amrex::Real>& avg_ymom,
39 const amrex::Array4<const amrex::Real>& avg_zmom,
40 const amrex::Array4<const amrex::Real>& cur_cons,
41 const amrex::Array4<const amrex::Real>& cell_prim,
42 const amrex::Array4<amrex::Real>& src,
43 const bool& use_mono_adv,
44 amrex::Real* max_s_ptr,
45 amrex::Real* min_s_ptr,
46 const amrex::Array4<const amrex::Real>& vf_arr,
47 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
48 const amrex::Array4<const amrex::Real>& mf_m,
50 const amrex::Real horiz_upw_frac,
const amrex::Real vert_upw_frac,
51 const amrex::GpuArray<
const amrex::Array4<amrex::Real>, AMREX_SPACEDIM>& flx_arr,
52 const amrex::GpuArray< amrex::Array4<amrex::Real>, AMREX_SPACEDIM>& flx_tmp_arr,
53 const amrex::Box& domain,
54 const amrex::BCRec* bc_ptr_h);
58 const amrex::Box& bxx,
const amrex::Box& bxy,
const amrex::Box& bxz,
59 const amrex::Array4< amrex::Real>& rho_u_rhs,
const amrex::Array4< amrex::Real>& rho_v_rhs,
60 const amrex::Array4< amrex::Real>& rho_w_rhs,
61 const amrex::Array4<const amrex::Real>&
rho,
62 const amrex::Array4<const amrex::Real>& u ,
const amrex::Array4<const amrex::Real>& v,
63 const amrex::Array4<const amrex::Real>& w ,
64 const amrex::Array4<const amrex::Real>& rho_u ,
const amrex::Array4<const amrex::Real>& rho_v,
65 const amrex::Array4<const amrex::Real>& Omega ,
66 const amrex::Array4<const amrex::Real>& z_nd,
67 const amrex::Array4<const amrex::Real>& ax,
68 const amrex::Array4<const amrex::Real>& ay,
69 const amrex::Array4<const amrex::Real>& az,
70 const amrex::Array4<const amrex::Real>& detJ,
71 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
72 const amrex::Array4<const amrex::Real>& mf_m,
73 const amrex::Array4<const amrex::Real>& mf_u,
74 const amrex::Array4<const amrex::Real>& mf_v,
76 const amrex::Real horiz_upw_frac,
const amrex::Real vert_upw_frac,
77 const bool use_terrain,
const int lo_z_face,
const int hi_z_face,
78 const amrex::Box& domain,
79 const amrex::BCRec* bc_ptr_h);
85 const amrex::Array4< amrex::Real>& rhs_arr,
86 const amrex::Array4<const amrex::Real>& vel_norm_arr,
87 const amrex::Array4<const amrex::Real>& cell_data_arr,
88 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& dxInv,
89 const bool do_lo=
false);
95 const amrex::Array4< amrex::Real>& rho_u_rhs,
96 const amrex::Array4<const amrex::Real>& u,
97 const amrex::Array4<const amrex::Real>& rho_u,
98 const amrex::Array4<const amrex::Real>& rho_v,
99 const amrex::Array4<const amrex::Real>& Omega,
100 const amrex::Array4<const amrex::Real>& ax,
101 const amrex::Array4<const amrex::Real>& az,
102 const amrex::Array4<const amrex::Real>& detJ,
103 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
104 const bool do_lo=
false);
110 const amrex::Array4< amrex::Real>& rho_v_rhs,
111 const amrex::Array4<const amrex::Real>& v,
112 const amrex::Array4<const amrex::Real>& rho_u,
113 const amrex::Array4<const amrex::Real>& rho_v,
114 const amrex::Array4<const amrex::Real>& Omega,
115 const amrex::Array4<const amrex::Real>& ay,
116 const amrex::Array4<const amrex::Real>& az,
117 const amrex::Array4<const amrex::Real>& detJ,
118 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
119 const bool do_lo=
false);
125 const amrex::Array4< amrex::Real>& rho_w_rhs,
126 const amrex::Array4<const amrex::Real>& w,
127 const amrex::Array4<const amrex::Real>& rho_u,
128 const amrex::Array4<const amrex::Real>& rho_v,
129 const amrex::Array4<const amrex::Real>& Omega,
130 const amrex::Array4<const amrex::Real>& ax,
131 const amrex::Array4<const amrex::Real>& ay,
132 const amrex::Array4<const amrex::Real>& az,
133 const amrex::Array4<const amrex::Real>& detJ,
134 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
136 const bool do_lo=
false);
144 const amrex::Array4< amrex::Real>& cell_rhs,
145 const amrex::Array4<const amrex::Real>& cell_prim,
146 const amrex::Array4<const amrex::Real>& avg_xmom,
147 const amrex::Array4<const amrex::Real>& avg_ymom,
148 const amrex::Array4<const amrex::Real>& avg_zmom,
149 const amrex::Array4<const amrex::Real>& detJ,
150 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
151 const bool do_lo=
false);
154 AMREX_GPU_HOST_DEVICE
162 const amrex::Array4<const amrex::Real>& prim_tang_arr,
163 const amrex::Array4<const amrex::Real>& mom_norm_arr,
164 const amrex::Real& dxInv,
165 const bool do_lo=
false);
167 AMREX_GPU_HOST_DEVICE
178 }
else if (nrk == 1) {
202 eff_adv_type = adv_type;
205 return(eff_adv_type);
void AdvectionSrcForRho(const amrex::Box &bx, const amrex::Array4< amrex::Real > &src, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &omega, const amrex::Array4< amrex::Real > &avg_xmom, const amrex::Array4< amrex::Real > &avg_ymom, const amrex::Array4< amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &ax_arr, const amrex::Array4< const amrex::Real > &ay_arr, const amrex::Array4< const amrex::Real > &az_arr, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &mf_m, const amrex::Array4< const amrex::Real > &mf_u, const amrex::Array4< const amrex::Real > &mf_v, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const bool const_rho)
void AdvectionSrcForOpenBC_Tangent_Ymom(const amrex::Box &bxy, const int &dir, const amrex::Array4< amrex::Real > &rho_v_rhs, const amrex::Array4< const amrex::Real > &v, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &Omega, const amrex::Array4< const amrex::Real > &ay, const amrex::Array4< const amrex::Real > &az, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const bool do_lo=false)
void AdvectionSrcForOpenBC_Tangent_Xmom(const amrex::Box &bxx, const int &dir, const amrex::Array4< amrex::Real > &rho_u_rhs, const amrex::Array4< const amrex::Real > &u, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &Omega, const amrex::Array4< const amrex::Real > &ax, const amrex::Array4< const amrex::Real > &az, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const bool do_lo=false)
void AdvectionSrcForOpenBC_Normal(const amrex::Box &bx, const int &dir, const amrex::Array4< amrex::Real > &rhs_arr, const amrex::Array4< const amrex::Real > &vel_norm_arr, const amrex::Array4< const amrex::Real > &cell_data_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxInv, const bool do_lo=false)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real AdvectionSrcForOpenBC_Tangent(const int &i, const int &j, const int &k, const int &nprim, const int &dir, const amrex::Array4< const amrex::Real > &prim_tang_arr, const amrex::Array4< const amrex::Real > &mom_norm_arr, const amrex::Real &dxInv, const bool do_lo=false)
void AdvectionSrcForMom(const amrex::Box &bx, const amrex::Box &bxx, const amrex::Box &bxy, const amrex::Box &bxz, const amrex::Array4< amrex::Real > &rho_u_rhs, const amrex::Array4< amrex::Real > &rho_v_rhs, const amrex::Array4< amrex::Real > &rho_w_rhs, const amrex::Array4< const amrex::Real > &rho, const amrex::Array4< const amrex::Real > &u, const amrex::Array4< const amrex::Real > &v, const amrex::Array4< const amrex::Real > &w, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &Omega, const amrex::Array4< const amrex::Real > &z_nd, const amrex::Array4< const amrex::Real > &ax, const amrex::Array4< const amrex::Real > &ay, const amrex::Array4< const amrex::Real > &az, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &mf_m, const amrex::Array4< const amrex::Real > &mf_u, const amrex::Array4< const amrex::Real > &mf_v, const AdvType horiz_adv_type, const AdvType vert_adv_type, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac, const bool use_terrain, const int lo_z_face, const int hi_z_face, const amrex::Box &domain, const amrex::BCRec *bc_ptr_h)
void AdvectionSrcForOpenBC_Tangent_Cons(const amrex::Box &bx, const int &dir, const int &icomp, const int &ncomp, const amrex::Array4< amrex::Real > &cell_rhs, const amrex::Array4< const amrex::Real > &cell_prim, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const bool do_lo=false)
void AdvectionSrcForOpenBC_Tangent_Zmom(const amrex::Box &bxz, const int &dir, const amrex::Array4< amrex::Real > &rho_w_rhs, const amrex::Array4< const amrex::Real > &w, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &Omega, const amrex::Array4< const amrex::Real > &ax, const amrex::Array4< const amrex::Real > &ay, const amrex::Array4< const amrex::Real > &az, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const int domhi_z, const bool do_lo=false)
void AdvectionSrcForScalars(const amrex::Real &dt, const amrex::Box &bx, const int icomp, const int ncomp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &cur_cons, const amrex::Array4< const amrex::Real > &cell_prim, const amrex::Array4< amrex::Real > &src, const bool &use_mono_adv, amrex::Real *max_s_ptr, amrex::Real *min_s_ptr, const amrex::Array4< const amrex::Real > &vf_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &mf_m, const AdvType horiz_adv_type, const AdvType vert_adv_type, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const amrex::GpuArray< amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_tmp_arr, const amrex::Box &domain, const amrex::BCRec *bc_ptr_h)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE AdvType EfficientAdvType(int nrk, AdvType adv_type)
Definition: ERF_Advection.H:170
AdvType
Definition: ERF_IndexDefines.H:191
@ rho
Definition: ERF_Kessler.H:30
@ omega
Definition: ERF_SAM.H:49