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