ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ERF_AdvectionSrcForMom_N.H
Go to the documentation of this file.
1 #include <ERF_IndexDefines.H>
2 #include <ERF_Interpolation.H>
3 
4 /**
5  * Function for computing the advective tendency for the x-component of momentum
6  * without metric terms and for higher-order stencils
7  *
8  * @param[in] i,j,k indices of x-face at which to create tendency
9  * @param[in] rho_u x-component of momentum
10  * @param[in] rho_v y-component of momentum
11  * @param[in] rho_w z-component of momentum
12  * @param[in] u x-component of velocity
13  * @param[in] cellSizeInv inverse of the mesh spacing
14  * @param[in] mf_u map factor on x-faces
15  * @param[in] mf_v map factor on y-faces
16  */
17 template<typename InterpType_H, typename InterpType_V>
18 AMREX_GPU_DEVICE
19 AMREX_FORCE_INLINE
20 amrex::Real
21 AdvectionSrcForXMom_N (int i, int j, int k,
22  const amrex::Array4<const amrex::Real>& rho_u,
23  const amrex::Array4<const amrex::Real>& rho_v,
24  const amrex::Array4<const amrex::Real>& rho_w,
25  InterpType_H interp_u_h,
26  InterpType_V interp_u_v,
27  const amrex::Array4<const amrex::Real>& mf_u_inv,
28  const amrex::Array4<const amrex::Real>& mf_v_inv,
29  const amrex::Real dxInv, const amrex::Real dyInv, const amrex::Real dzInv)
30 {
31  amrex::Real advectionSrc;
32 
33  amrex::Real rho_u_avg_lo, rho_u_avg_hi;
34  amrex::Real rho_v_avg_lo, rho_v_avg_hi;
35  amrex::Real rho_w_avg_lo, rho_w_avg_hi;
36 
37  amrex::Real xflux_hi; amrex::Real xflux_lo;
38  amrex::Real yflux_hi; amrex::Real yflux_lo;
39  amrex::Real zflux_hi; amrex::Real zflux_lo;
40 
41  amrex::Real interp_hi(0.), interp_lo(0.);
42 
43  rho_u_avg_hi = 0.5 * (rho_u(i+1, j, k) * mf_u_inv(i+1,j,0) + rho_u(i, j, k) * mf_u_inv(i,j,0));
44  interp_u_h.InterpolateInX(i+1,j,k,0,interp_hi,rho_u_avg_hi);
45  xflux_hi = rho_u_avg_hi * interp_hi;
46 
47  rho_u_avg_lo = 0.5 * (rho_u(i-1, j, k) * mf_u_inv(i-1,j,0) + rho_u(i, j, k) * mf_u_inv(i,j,0));
48  interp_u_h.InterpolateInX(i,j,k,0,interp_lo,rho_u_avg_lo);
49  xflux_lo = rho_u_avg_lo * interp_lo;
50 
51  rho_v_avg_hi = 0.5 * (rho_v(i, j+1, k) * mf_v_inv(i,j+1,0) + rho_v(i-1, j+1, k) * mf_v_inv(i-1,j+1,0));
52  interp_u_h.InterpolateInY(i,j+1,k,0,interp_hi,rho_v_avg_hi);
53  yflux_hi = rho_v_avg_hi * interp_hi;
54 
55  rho_v_avg_lo = 0.5 * (rho_v(i, j , k) * mf_v_inv(i,j ,0) + rho_v(i-1, j , k) * mf_v_inv(i-1,j ,0));
56  interp_u_h.InterpolateInY(i,j,k,0,interp_lo,rho_v_avg_lo);
57  yflux_lo = rho_v_avg_lo * interp_lo;
58 
59  rho_w_avg_hi = 0.5 * (rho_w(i, j, k+1) + rho_w(i-1, j, k+1));
60  interp_u_v.InterpolateInZ(i,j,k+1,0,interp_hi,rho_w_avg_hi);
61  zflux_hi = rho_w_avg_hi * interp_hi;
62 
63  rho_w_avg_lo = 0.5 * (rho_w(i, j, k ) + rho_w(i-1, j, k ));
64  interp_u_v.InterpolateInZ(i,j,k,0,interp_lo,rho_w_avg_lo);
65  zflux_lo = rho_w_avg_lo * interp_lo;
66 
67  amrex::Real mfsq = 1 / (mf_u_inv(i,j,0) * mf_u_inv(i,j,0));
68 
69  advectionSrc = (xflux_hi - xflux_lo) * dxInv * mfsq
70  + (yflux_hi - yflux_lo) * dyInv * mfsq
71  + (zflux_hi - zflux_lo) * dzInv;
72 
73  return advectionSrc;
74 }
75 
76 /**
77  * Function for computing the advective tendency for the y-component of momentum
78  * without metric terms and for higher-order stencils
79  *
80  * @param[in] i,j,k indices of y-face at which to create tendency
81  * @param[in] rho_u x-component of momentum
82  * @param[in] rho_v y-component of momentum
83  * @param[in] rho_w z-component of momentum
84  * @param[in] v y-component of velocity
85  * @param[in] cellSizeInv inverse of the mesh spacing
86  * @param[in] mf_u map factor on x-faces
87  * @param[in] mf_v map factor on y-faces
88  */
89 template<typename InterpType_H, typename InterpType_V>
90 AMREX_GPU_DEVICE
91 AMREX_FORCE_INLINE
92 amrex::Real
93 AdvectionSrcForYMom_N (int i, int j, int k,
94  const amrex::Array4<const amrex::Real>& rho_u,
95  const amrex::Array4<const amrex::Real>& rho_v,
96  const amrex::Array4<const amrex::Real>& rho_w,
97  InterpType_H interp_v_h,
98  InterpType_V interp_v_v,
99  const amrex::Array4<const amrex::Real>& mf_u_inv,
100  const amrex::Array4<const amrex::Real>& mf_v_inv,
101  const amrex::Real dxInv, const amrex::Real dyInv, const amrex::Real dzInv)
102 {
103  amrex::Real advectionSrc;
104 
105  amrex::Real rho_u_avg_lo, rho_u_avg_hi;
106  amrex::Real rho_v_avg_lo, rho_v_avg_hi;
107  amrex::Real rho_w_avg_lo, rho_w_avg_hi;
108 
109  amrex::Real xflux_hi; amrex::Real xflux_lo;
110  amrex::Real yflux_hi; amrex::Real yflux_lo;
111  amrex::Real zflux_hi; amrex::Real zflux_lo;
112 
113  amrex::Real interp_hi(0.), interp_lo(0.);
114 
115  rho_u_avg_hi = 0.5 * (rho_u(i+1, j, k) * mf_u_inv(i+1,j ,0) + rho_u(i+1, j-1, k) * mf_u_inv(i+1,j-1,0));
116  interp_v_h.InterpolateInX(i+1,j,k,0,interp_hi,rho_u_avg_hi);
117  xflux_hi = rho_u_avg_hi * interp_hi;
118 
119  rho_u_avg_lo = 0.5 * (rho_u(i , j, k) * mf_u_inv(i ,j ,0) + rho_u(i , j-1, k) * mf_u_inv(i ,j-1,0));
120  interp_v_h.InterpolateInX(i,j,k,0,interp_lo,rho_u_avg_lo);
121  xflux_lo = rho_u_avg_lo * interp_lo;
122 
123  rho_v_avg_hi = 0.5 * (rho_v(i, j, k) * mf_v_inv(i ,j ,0) + rho_v(i, j+1, k) * mf_v_inv(i ,j+1,0));
124  interp_v_h.InterpolateInY(i,j+1,k,0,interp_hi,rho_v_avg_hi);
125  yflux_hi = rho_v_avg_hi * interp_hi;
126 
127  rho_v_avg_lo = 0.5 * (rho_v(i, j, k) * mf_v_inv(i ,j ,0) + rho_v(i, j-1, k) * mf_v_inv(i ,j-1,0));
128  interp_v_h.InterpolateInY(i,j,k,0,interp_lo,rho_v_avg_lo);
129  yflux_lo = rho_v_avg_lo * interp_lo;
130 
131  rho_w_avg_hi = 0.5 * (rho_w(i, j, k+1) + rho_w(i, j-1, k+1));
132  interp_v_v.InterpolateInZ(i,j,k+1,0,interp_hi,rho_w_avg_hi);
133  zflux_hi = rho_w_avg_hi * interp_hi;
134 
135  rho_w_avg_lo = 0.5 * (rho_w(i, j, k ) + rho_w(i, j-1, k ));
136  interp_v_v.InterpolateInZ(i,j,k ,0,interp_lo,rho_w_avg_lo);
137  zflux_lo = rho_w_avg_lo * interp_lo;
138 
139  amrex::Real mfsq = 1 / (mf_v_inv(i,j,0) * mf_v_inv(i,j,0));
140 
141  advectionSrc = (xflux_hi - xflux_lo) * dxInv * mfsq
142  + (yflux_hi - yflux_lo) * dyInv * mfsq
143  + (zflux_hi - zflux_lo) * dzInv;
144 
145  return advectionSrc;
146 }
147 
148 /**
149  * Function for computing the advective tendency for the z-component of momentum
150  * without metric terms and for higher-order stencils
151  *
152  * @param[in] i,j,k indices of z-face at which to create tendency
153  * @param[in] rho_u x-component of momentum
154  * @param[in] rho_v y-component of momentum
155  * @param[in] rho_w z-component of momentum
156  * @param[in] w z-component of velocity
157  * @param[in] cellSizeInv inverse of the mesh spacing
158  * @param[in] mf_m map factor on cell centers
159  * @param[in] mf_u map factor on x-faces
160  * @param[in] mf_v map factor on y-faces
161  * @param[in] domhi_z maximum k value in the domain
162  */
163 template<typename InterpType_H, typename InterpType_V, typename WallInterpType>
164 AMREX_GPU_DEVICE
165 AMREX_FORCE_INLINE
166 amrex::Real
167 AdvectionSrcForZMom_N (int i, int j, int k,
168  const amrex::Array4<const amrex::Real>& rho_u,
169  const amrex::Array4<const amrex::Real>& rho_v,
170  const amrex::Array4<const amrex::Real>& rho_w,
171  const amrex::Array4<const amrex::Real>& w,
172  InterpType_H interp_w_h,
173  InterpType_V interp_w_v,
174  WallInterpType interp_w_wall,
175  const amrex::Array4<const amrex::Real>& mf_m,
176  const amrex::Array4<const amrex::Real>& mf_u_inv,
177  const amrex::Array4<const amrex::Real>& mf_v_inv,
178  const AdvType vert_adv_type,
179  const int lo_z_face, const int hi_z_face,
180  const amrex::Real dxInv, const amrex::Real dyInv, const amrex::Real dzInv)
181 {
182 
183  amrex::Real advectionSrc;
184 
185  amrex::Real rho_u_avg_lo, rho_u_avg_hi;
186  amrex::Real rho_v_avg_lo, rho_v_avg_hi;
187  amrex::Real rho_w_avg_lo, rho_w_avg_hi;
188 
189  amrex::Real xflux_hi; amrex::Real xflux_lo;
190  amrex::Real yflux_hi; amrex::Real yflux_lo;
191  amrex::Real zflux_hi; amrex::Real zflux_lo;
192 
193  amrex::Real interp_hi(0.), interp_lo(0.);
194 
195  rho_u_avg_hi = 0.5 * (rho_u(i+1, j, k) + rho_u(i+1, j, k-1)) * mf_u_inv(i+1,j ,0);
196  interp_w_h.InterpolateInX(i+1,j,k,0,interp_hi,rho_u_avg_hi);
197  xflux_hi = rho_u_avg_hi * interp_hi;
198 
199  rho_u_avg_lo = 0.5 * (rho_u(i , j, k) + rho_u(i , j, k-1)) * mf_u_inv(i ,j ,0);
200  interp_w_h.InterpolateInX(i,j,k,0,interp_lo,rho_u_avg_lo);
201  xflux_lo = rho_u_avg_lo * interp_lo;
202 
203  rho_v_avg_hi = 0.5 * (rho_v(i, j+1, k) + rho_v(i, j+1, k-1)) * mf_v_inv(i ,j+1,0);
204  interp_w_h.InterpolateInY(i,j+1,k,0,interp_hi,rho_v_avg_hi);
205  yflux_hi = rho_v_avg_hi * interp_hi;
206 
207  rho_v_avg_lo = 0.5 * (rho_v(i, j , k) + rho_v(i, j , k-1)) * mf_v_inv(i ,j ,0);
208  interp_w_h.InterpolateInY(i,j,k,0,interp_lo,rho_v_avg_lo);
209  yflux_lo = rho_v_avg_lo * interp_lo;
210 
211  // int l_spatial_order_hi = std::min(std::min(vert_spatial_order, 2*(hi_z_face-k)), 2*(k+1));
212  // If k == hi_z_face-1, l_spatial_order_hi = 2
213  // If k == hi_z_face-2, l_spatial_order_hi = std::min(vert_spatial_order, 4);
214  // If k == lo_z+face+1, l_spatial_order_hi = std::min(vert_spatial_order, 4);
215 
216  if (k == hi_z_face) {
217  zflux_hi = rho_w(i,j,k) * w(i,j,k);
218  } else {
219  rho_w_avg_hi = 0.5 * (rho_w(i,j,k) + rho_w(i,j,k+1));
220  if (k == hi_z_face-1)
221  {
222  interp_w_wall.InterpolateInZ(i,j,k+1,0,interp_hi,rho_w_avg_hi,AdvType::Centered_2nd);
223  } else if (k == hi_z_face-2 || k == lo_z_face+1) {
224  if (vert_adv_type != AdvType::Centered_2nd && vert_adv_type != AdvType::Upwind_3rd) {
225  interp_w_wall.InterpolateInZ(i,j,k+1,0,interp_hi,rho_w_avg_hi,AdvType::Centered_4th);
226  } else {
227  interp_w_wall.InterpolateInZ(i,j,k+1,0,interp_hi,rho_w_avg_hi,vert_adv_type);
228  }
229  } else {
230  interp_w_v.InterpolateInZ(i,j,k+1,0,interp_hi,rho_w_avg_hi);
231  }
232  zflux_hi = rho_w_avg_hi * interp_hi;
233  }
234 
235  // int l_spatial_order_lo = std::min(std::min(vert_spatial_order, 2*(hi_z_face+1-k)), 2*k);
236  // If k == lo_z_face+1, l_spatial_order_hi = 2
237  // If k == lo_z_face+2, l_spatial_order_hi = std::min(vert_spatial_order, 4);
238  // If k == hi_z_face-1, l_spatial_order_hi = std::min(vert_spatial_order, 4);
239 
240  if (k == lo_z_face) {
241  zflux_lo = rho_w(i,j,k) * w(i,j,k);
242  } else {
243  rho_w_avg_lo = 0.5 * (rho_w(i,j,k) + rho_w(i,j,k-1));
244  if (k == lo_z_face+1) {
245  interp_w_wall.InterpolateInZ(i,j,k,0,interp_lo,rho_w_avg_lo,AdvType::Centered_2nd);
246  } else if (k == lo_z_face+2 || k == hi_z_face-1) {
247  if (vert_adv_type != AdvType::Centered_2nd && vert_adv_type != AdvType::Upwind_3rd) {
248  interp_w_wall.InterpolateInZ(i,j,k,0,interp_lo,rho_w_avg_lo,AdvType::Centered_4th);
249  } else {
250  interp_w_wall.InterpolateInZ(i,j,k,0,interp_lo,rho_w_avg_lo,vert_adv_type);
251  }
252  } else {
253  interp_w_v.InterpolateInZ(i,j,k,0,interp_lo,rho_w_avg_lo);
254  }
255  zflux_lo = rho_w_avg_lo * interp_lo;
256  }
257 
258  amrex::Real mfsq = mf_m(i,j,0) * mf_m(i,j,0);
259 
260  advectionSrc = (xflux_hi - xflux_lo) * dxInv * mfsq
261  + (yflux_hi - yflux_lo) * dyInv * mfsq
262  + (zflux_hi - zflux_lo) * dzInv;
263 
264  return advectionSrc;
265 }
266 
267 /**
268  * Wrapper function for computing the advective tendency w/ spatial order > 2.
269  */
270 template<typename InterpType_H, typename InterpType_V, typename WallInterpType>
271 void
272 AdvectionSrcForMomWrapper_N (const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
273  const amrex::Array4<amrex::Real>& rho_u_rhs,
274  const amrex::Array4<amrex::Real>& rho_v_rhs,
275  const amrex::Array4<amrex::Real>& rho_w_rhs,
276  const amrex::Array4<const amrex::Real>& rho_u,
277  const amrex::Array4<const amrex::Real>& rho_v,
278  const amrex::Array4<const amrex::Real>& rho_w,
279  const amrex::Array4<const amrex::Real>& u,
280  const amrex::Array4<const amrex::Real>& v,
281  const amrex::Array4<const amrex::Real>& w,
282  const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
283  const amrex::Gpu::DeviceVector<amrex::Real>& stretched_dz_d,
284  const amrex::Array4<const amrex::Real>& mf_m,
285  const amrex::Array4<const amrex::Real>& mf_u_inv,
286  const amrex::Array4<const amrex::Real>& mf_v_inv,
287  const amrex::Real upw_frac_h,
288  const amrex::Real upw_frac_v,
289  const AdvType vert_adv_type,
290  const int lo_z_face, const int hi_z_face)
291 {
292  // Instantiate the appropriate structs
293  InterpType_H interp_u_h(u, upw_frac_h); InterpType_V interp_u_v(u, upw_frac_v); // X-MOM
294  InterpType_H interp_v_h(v, upw_frac_h); InterpType_V interp_v_v(v, upw_frac_v); // Y-MOM
295  InterpType_H interp_w_h(w, upw_frac_h); InterpType_V interp_w_v(w, upw_frac_v); // Z-MOM
296  WallInterpType interp_w_wall(w, upw_frac_v); // Z-MOM @ wall
297 
298  auto dxInv = cellSizeInv[0];
299  auto dyInv = cellSizeInv[1];
300 
301  auto dz_ptr = stretched_dz_d.data();
302 
303  amrex::ParallelFor(bxx,
304  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
305  {
306  auto dzInv = 1.0/dz_ptr[k];
307  rho_u_rhs(i, j, k) = -AdvectionSrcForXMom_N(i, j, k, rho_u, rho_v, rho_w,
308  interp_u_h, interp_u_v,
309  mf_u_inv, mf_v_inv,
310  dxInv, dyInv, dzInv);
311  });
312 
313  amrex::ParallelFor(bxy,
314  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
315  {
316  auto dzInv = 1.0/dz_ptr[k];
317  rho_v_rhs(i, j, k) = -AdvectionSrcForYMom_N(i, j, k, rho_u, rho_v, rho_w,
318  interp_v_h, interp_v_v,
319  mf_u_inv, mf_v_inv,
320  dxInv, dyInv, dzInv);
321  });
322 
323  amrex::ParallelFor(bxz,
324  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
325  {
326  auto dzInv = 2.0/(dz_ptr[k] + dz_ptr[k-1]);
327  rho_w_rhs(i, j, k) = -AdvectionSrcForZMom_N(i, j, k, rho_u, rho_v, rho_w, w,
328  interp_w_h, interp_w_v, interp_w_wall,
329  mf_m, mf_u_inv, mf_v_inv,
330  vert_adv_type, lo_z_face, hi_z_face,
331  dxInv, dyInv, dzInv);
332  });
333 }
334 
335 /**
336  * Wrapper function for computing the advective tendency w/ spatial order > 2.
337  */
338 template<typename InterpType_H>
339 void
340 AdvectionSrcForMomVert_N (const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
341  const amrex::Array4<amrex::Real>& rho_u_rhs,
342  const amrex::Array4<amrex::Real>& rho_v_rhs,
343  const amrex::Array4<amrex::Real>& rho_w_rhs,
344  const amrex::Array4<const amrex::Real>& rho_u,
345  const amrex::Array4<const amrex::Real>& rho_v,
346  const amrex::Array4<const amrex::Real>& rho_w,
347  const amrex::Array4<const amrex::Real>& u,
348  const amrex::Array4<const amrex::Real>& v,
349  const amrex::Array4<const amrex::Real>& w,
350  const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
351  const amrex::Gpu::DeviceVector<amrex::Real>& stretched_dz_d,
352  const amrex::Array4<const amrex::Real>& mf_m,
353  const amrex::Array4<const amrex::Real>& mf_u_inv,
354  const amrex::Array4<const amrex::Real>& mf_v_inv,
355  const amrex::Real upw_frac_h,
356  const amrex::Real upw_frac_v,
357  const AdvType vert_adv_type,
358  const int lo_z_face, const int hi_z_face)
359 {
360  if (vert_adv_type == AdvType::Centered_2nd) {
361  AdvectionSrcForMomWrapper_N<InterpType_H,CENTERED2,UPWINDALL>(bxx, bxy, bxz,
362  rho_u_rhs, rho_v_rhs, rho_w_rhs,
363  rho_u, rho_v, rho_w, u, v, w,
364  cellSizeInv, stretched_dz_d, mf_m,
365  mf_u_inv, mf_v_inv,
366  upw_frac_h, upw_frac_v,
367  vert_adv_type,
368  lo_z_face, hi_z_face);
369  } else if (vert_adv_type == AdvType::Upwind_3rd) {
370  AdvectionSrcForMomWrapper_N<InterpType_H,UPWIND3,UPWINDALL>(bxx, bxy, bxz,
371  rho_u_rhs, rho_v_rhs, rho_w_rhs,
372  rho_u, rho_v, rho_w, u, v, w,
373  cellSizeInv, stretched_dz_d, mf_m,
374  mf_u_inv, mf_v_inv,
375  upw_frac_h, upw_frac_v,
376  vert_adv_type,
377  lo_z_face, hi_z_face);
378  } else if (vert_adv_type == AdvType::Centered_4th) {
379  AdvectionSrcForMomWrapper_N<InterpType_H,CENTERED4,UPWINDALL>(bxx, bxy, bxz,
380  rho_u_rhs, rho_v_rhs, rho_w_rhs,
381  rho_u, rho_v, rho_w, u, v, w,
382  cellSizeInv, stretched_dz_d, mf_m,
383  mf_u_inv, mf_v_inv,
384  upw_frac_h, upw_frac_v,
385  vert_adv_type,
386  lo_z_face, hi_z_face);
387  } else if (vert_adv_type == AdvType::Upwind_5th) {
388  AdvectionSrcForMomWrapper_N<InterpType_H,UPWIND5,UPWINDALL>(bxx, bxy, bxz,
389  rho_u_rhs, rho_v_rhs, rho_w_rhs,
390  rho_u, rho_v, rho_w, u, v, w,
391  cellSizeInv, stretched_dz_d, mf_m,
392  mf_u_inv, mf_v_inv,
393  upw_frac_h, upw_frac_v,
394  vert_adv_type,
395  lo_z_face, hi_z_face);
396  } else if (vert_adv_type == AdvType::Centered_6th) {
397  AdvectionSrcForMomWrapper_N<InterpType_H,CENTERED6,UPWINDALL>(bxx, bxy, bxz,
398  rho_u_rhs, rho_v_rhs, rho_w_rhs,
399  rho_u, rho_v, rho_w, u, v, w,
400  cellSizeInv, stretched_dz_d, mf_m,
401  mf_u_inv, mf_v_inv,
402  upw_frac_h, upw_frac_v,
403  vert_adv_type,
404  lo_z_face, hi_z_face);
405  } else {
406  AMREX_ASSERT_WITH_MESSAGE(false, "Unknown advection scheme!");
407  }
408 }
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real AdvectionSrcForZMom_N(int i, int j, int k, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &rho_w, const amrex::Array4< const amrex::Real > &w, InterpType_H interp_w_h, InterpType_V interp_w_v, WallInterpType interp_w_wall, const amrex::Array4< const amrex::Real > &mf_m, const amrex::Array4< const amrex::Real > &mf_u_inv, const amrex::Array4< const amrex::Real > &mf_v_inv, const AdvType vert_adv_type, const int lo_z_face, const int hi_z_face, const amrex::Real dxInv, const amrex::Real dyInv, const amrex::Real dzInv)
Definition: ERF_AdvectionSrcForMom_N.H:167
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real AdvectionSrcForXMom_N(int i, int j, int k, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &rho_w, InterpType_H interp_u_h, InterpType_V interp_u_v, const amrex::Array4< const amrex::Real > &mf_u_inv, const amrex::Array4< const amrex::Real > &mf_v_inv, const amrex::Real dxInv, const amrex::Real dyInv, const amrex::Real dzInv)
Definition: ERF_AdvectionSrcForMom_N.H:21
void AdvectionSrcForMomVert_N(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_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &rho_w, const amrex::Array4< const amrex::Real > &u, const amrex::Array4< const amrex::Real > &v, const amrex::Array4< const amrex::Real > &w, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Gpu::DeviceVector< amrex::Real > &stretched_dz_d, const amrex::Array4< const amrex::Real > &mf_m, const amrex::Array4< const amrex::Real > &mf_u_inv, const amrex::Array4< const amrex::Real > &mf_v_inv, const amrex::Real upw_frac_h, const amrex::Real upw_frac_v, const AdvType vert_adv_type, const int lo_z_face, const int hi_z_face)
Definition: ERF_AdvectionSrcForMom_N.H:340
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real AdvectionSrcForYMom_N(int i, int j, int k, const amrex::Array4< const amrex::Real > &rho_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &rho_w, InterpType_H interp_v_h, InterpType_V interp_v_v, const amrex::Array4< const amrex::Real > &mf_u_inv, const amrex::Array4< const amrex::Real > &mf_v_inv, const amrex::Real dxInv, const amrex::Real dyInv, const amrex::Real dzInv)
Definition: ERF_AdvectionSrcForMom_N.H:93
void AdvectionSrcForMomWrapper_N(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_u, const amrex::Array4< const amrex::Real > &rho_v, const amrex::Array4< const amrex::Real > &rho_w, const amrex::Array4< const amrex::Real > &u, const amrex::Array4< const amrex::Real > &v, const amrex::Array4< const amrex::Real > &w, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Gpu::DeviceVector< amrex::Real > &stretched_dz_d, const amrex::Array4< const amrex::Real > &mf_m, const amrex::Array4< const amrex::Real > &mf_u_inv, const amrex::Array4< const amrex::Real > &mf_v_inv, const amrex::Real upw_frac_h, const amrex::Real upw_frac_v, const AdvType vert_adv_type, const int lo_z_face, const int hi_z_face)
Definition: ERF_AdvectionSrcForMom_N.H:272
AdvType
Definition: ERF_IndexDefines.H:203
@ Centered_4th
@ Centered_6th
@ Centered_2nd