ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_ComputeStrain_N.cpp File Reference
#include <ERF_Diffusion.H>
#include "ERF_EddyViscosity.H"
Include dependency graph for ERF_ComputeStrain_N.cpp:

Functions

void ComputeStrain_N (Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Box domain, const Array4< const Real > &u, const Array4< const Real > &v, const Array4< const Real > &w, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const GpuArray< Real, AMREX_SPACEDIM > &dxInv, const Array4< const Real > &mf_mx, const Array4< const Real > &mf_ux, const Array4< const Real > &mf_vx, const Array4< const Real > &mf_my, const Array4< const Real > &mf_uy, const Array4< const Real > &mf_vy, const BCRec *bc_ptr, Array4< Real > &tau13i, Array4< Real > &tau23i)
 

Function Documentation

◆ ComputeStrain_N()

void ComputeStrain_N ( Box  bxcc,
Box  tbxxy,
Box  tbxxz,
Box  tbxyz,
Box  domain,
const Array4< const Real > &  u,
const Array4< const Real > &  v,
const Array4< const Real > &  w,
Array4< Real > &  tau11,
Array4< Real > &  tau22,
Array4< Real > &  tau33,
Array4< Real > &  tau12,
Array4< Real > &  tau13,
Array4< Real > &  tau23,
const GpuArray< Real, AMREX_SPACEDIM > &  dxInv,
const Array4< const Real > &  mf_mx,
const Array4< const Real > &  mf_ux,
const Array4< const Real > &  mf_vx,
const Array4< const Real > &  mf_my,
const Array4< const Real > &  mf_uy,
const Array4< const Real > &  mf_vy,
const BCRec *  bc_ptr,
Array4< Real > &  tau13i,
Array4< Real > &  tau23i 
)

Function for computing the strain rates without terrain.

Parameters
[in]bxcccell center box for tau_ii
[in]tbxxynodal xy box for tau_12
[in]tbxxznodal xz box for tau_13
[in]tbxyznodal yz box for tau_23
[in]ux-direction velocity
[in]vy-direction velocity
[in]wz-direction velocity
[out]tau1111 strain
[out]tau2222 strain
[out]tau3333 strain
[out]tau1212 strain
[out]tau1313 strain
[out]tau2323 strain
[in]bc_ptrcontainer with boundary condition types
[in]dxInvinverse cell size array
[in]mf_mmap factor at cell center
[in]mf_umap factor at x-face
[in]mf_vmap factor at y-face
[in]tau13icontribution to strain from du/dz
[in]tau23icontribution to strain from dv/dz
50 {
51  // Convert domain to each index type to test if we are on Dirichlet boundary
52  Box domain_xy = convert(domain, tbxxy.ixType());
53  Box domain_xz = convert(domain, tbxxz.ixType());
54  Box domain_yz = convert(domain, tbxyz.ixType());
55 
56  const auto& dom_lo = lbound(domain);
57  const auto& dom_hi = ubound(domain);
58 
59  // Dirichlet on left or right plane
60  bool xl_v_dir = ( (bc_ptr[BCVars::yvel_bc].lo(0) == ERFBCType::ext_dir) ||
61  (bc_ptr[BCVars::yvel_bc].lo(0) == ERFBCType::ext_dir_upwind) ||
62  (bc_ptr[BCVars::yvel_bc].lo(0) == ERFBCType::ext_dir_ingested) );
63  xl_v_dir = ( xl_v_dir && (tbxxy.smallEnd(0) == domain_xy.smallEnd(0)) );
64 
65  bool xh_v_dir = ( (bc_ptr[BCVars::yvel_bc].hi(0) == ERFBCType::ext_dir) ||
66  (bc_ptr[BCVars::yvel_bc].hi(0) == ERFBCType::ext_dir_upwind) ||
67  (bc_ptr[BCVars::yvel_bc].hi(0) == ERFBCType::ext_dir_ingested) );
68  xh_v_dir = ( xh_v_dir && (tbxxy.bigEnd(0) == domain_xy.bigEnd(0)) );
69 
70  bool xl_w_dir = ( (bc_ptr[BCVars::zvel_bc].lo(0) == ERFBCType::ext_dir) ||
71  (bc_ptr[BCVars::zvel_bc].lo(0) == ERFBCType::ext_dir_upwind) ||
72  (bc_ptr[BCVars::zvel_bc].lo(0) == ERFBCType::ext_dir_ingested) );
73  xl_w_dir = ( xl_w_dir && (tbxxz.smallEnd(0) == domain_xz.smallEnd(0)) );
74 
75  bool xh_w_dir = ( (bc_ptr[BCVars::zvel_bc].hi(0) == ERFBCType::ext_dir) ||
76  (bc_ptr[BCVars::zvel_bc].hi(0) == ERFBCType::ext_dir_upwind) ||
77  (bc_ptr[BCVars::zvel_bc].hi(0) == ERFBCType::ext_dir_ingested) );
78  xh_w_dir = ( xh_w_dir && (tbxxz.bigEnd(0) == domain_xz.bigEnd(0)) );
79 
80  // Dirichlet on front or back plane
81  bool yl_u_dir = ( (bc_ptr[BCVars::xvel_bc].lo(1) == ERFBCType::ext_dir) ||
82  (bc_ptr[BCVars::xvel_bc].lo(1) == ERFBCType::ext_dir_upwind) ||
83  (bc_ptr[BCVars::xvel_bc].lo(1) == ERFBCType::ext_dir_ingested) );
84  yl_u_dir = ( yl_u_dir && (tbxxy.smallEnd(1) == domain_xy.smallEnd(1)) );
85 
86  bool yh_u_dir = ( (bc_ptr[BCVars::xvel_bc].hi(1) == ERFBCType::ext_dir) ||
87  (bc_ptr[BCVars::xvel_bc].hi(1) == ERFBCType::ext_dir_upwind) ||
88  (bc_ptr[BCVars::xvel_bc].hi(1) == ERFBCType::ext_dir_ingested) );
89  yh_u_dir = ( yh_u_dir && (tbxxy.bigEnd(1) == domain_xy.bigEnd(1)) );
90 
91  bool yl_w_dir = ( (bc_ptr[BCVars::zvel_bc].lo(1) == ERFBCType::ext_dir) ||
92  (bc_ptr[BCVars::zvel_bc].lo(1) == ERFBCType::ext_dir_upwind) ||
93  (bc_ptr[BCVars::zvel_bc].lo(1) == ERFBCType::ext_dir_ingested) );
94  yl_w_dir = ( yl_w_dir && (tbxyz.smallEnd(1) == domain_yz.smallEnd(1)) );
95 
96  bool yh_w_dir = ( (bc_ptr[BCVars::zvel_bc].hi(1) == ERFBCType::ext_dir) ||
97  (bc_ptr[BCVars::zvel_bc].hi(1) == ERFBCType::ext_dir_upwind) ||
98  (bc_ptr[BCVars::zvel_bc].hi(1) == ERFBCType::ext_dir_ingested) );
99  yh_w_dir = ( yh_w_dir && (tbxyz.bigEnd(1) == domain_yz.bigEnd(1)) );
100 
101  // Dirichlet on top or bottom plane
102  bool zl_u_dir = ( (bc_ptr[BCVars::xvel_bc].lo(2) == ERFBCType::ext_dir) ||
103  (bc_ptr[BCVars::xvel_bc].lo(2) == ERFBCType::ext_dir_ingested) );
104  zl_u_dir = ( zl_u_dir && (tbxxz.smallEnd(2) == domain_xz.smallEnd(2)) );
105 
106  bool zh_u_dir = ( (bc_ptr[BCVars::xvel_bc].hi(2) == ERFBCType::ext_dir) ||
107  (bc_ptr[BCVars::xvel_bc].hi(2) == ERFBCType::ext_dir_ingested) );
108  zh_u_dir = ( zh_u_dir && (tbxxz.bigEnd(2) == domain_xz.bigEnd(2)) );
109 
110  bool zl_v_dir = ( (bc_ptr[BCVars::yvel_bc].lo(2) == ERFBCType::ext_dir) ||
111  (bc_ptr[BCVars::yvel_bc].lo(2) == ERFBCType::ext_dir_ingested) );
112  zl_v_dir = ( zl_v_dir && (tbxyz.smallEnd(2) == domain_yz.smallEnd(2)) );
113 
114  bool zh_v_dir = ( (bc_ptr[BCVars::yvel_bc].hi(2) == ERFBCType::ext_dir) ||
115  (bc_ptr[BCVars::yvel_bc].hi(2) == ERFBCType::ext_dir_ingested) );
116  zh_v_dir = ( zh_v_dir && (tbxyz.bigEnd(2) == domain_yz.bigEnd(2)) );
117 
118  //***********************************************************************************
119  // X-Dirichlet
120  //***********************************************************************************
121  if (xl_v_dir) {
122  Box planexy = tbxxy; planexy.setBig(0, planexy.smallEnd(0) );
123  tbxxy.growLo(0,-1);
124  bool need_to_test = (bc_ptr[BCVars::yvel_bc].lo(0) == ERFBCType::ext_dir_upwind) ? true : false;
125 
126  ParallelFor(planexy,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
127  Real mfy = 0.5 * (mf_uy(i,j,0) + mf_uy(i ,j-1,0));
128  Real mfx = 0.5 * (mf_vx(i,j,0) + mf_vx(i-1,j ,0));
129  if (!need_to_test || u(dom_lo.x,j,k) >= 0.) {
130  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy
131  + (-(8./3.) * v(i-1,j,k) + 3. * v(i,j,k) - (1./3.) * v(i+1,j,k))*dxInv[0]*mfx );
132  } else {
133  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy +
134  (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
135  }
136  });
137  }
138  if (xh_v_dir) {
139  // note: tilebox xy should be nodal, so i|i-1|i-2 at the bigEnd is analogous to i-1|i|i+1 at the smallEnd
140  Box planexy = tbxxy; planexy.setSmall(0, planexy.bigEnd(0) );
141  tbxxy.growHi(0,-1);
142  bool need_to_test = (bc_ptr[BCVars::yvel_bc].hi(0) == ERFBCType::ext_dir_upwind) ? true : false;
143 
144  ParallelFor(planexy,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
145  Real mfy = 0.5 * (mf_uy(i,j,0) + mf_uy(i ,j-1,0));
146  Real mfx = 0.5 * (mf_vx(i,j,0) + mf_vx(i-1,j ,0));
147  if (!need_to_test || u(dom_hi.x+1,j,k) <= 0.) {
148  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy
149  - (-(8./3.) * v(i,j,k) + 3. * v(i-1,j,k) - (1./3.) * v(i-2,j,k))*dxInv[0]*mfx );
150  } else {
151  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy +
152  (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
153  }
154  });
155  }
156 
157  if (xl_w_dir) {
158  Box planexz = tbxxz; planexz.setBig(0, planexz.smallEnd(0) );
159  tbxxz.growLo(0,-1);
160  bool need_to_test = (bc_ptr[BCVars::zvel_bc].lo(0) == ERFBCType::ext_dir_upwind) ? true : false;
161 
162  ParallelFor(planexz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
163  Real mfx = mf_ux(i,j,0);
164 
165  Real du_dz = (u(i, j, k) - u(i, j, k-1))*dxInv[2];
166  if (!need_to_test || u(dom_lo.x,j,k) >= 0.) {
167  tau13(i,j,k) = 0.5 * ( du_dz
168  + (-(8./3.) * w(i-1,j,k) + 3. * w(i,j,k) - (1./3.) * w(i+1,j,k))*dxInv[0]*mfx );
169  } else {
170  tau13(i,j,k) = 0.5 * ( du_dz
171  + (w(i, j, k) - w(i-1, j, k))*dxInv[0]*mfx );
172  }
173 
174  if (tau13i) tau13i(i,j,k) = 0.5 * du_dz;
175  });
176  }
177  if (xh_w_dir) {
178  // note: tilebox xz should be nodal, so i|i-1|i-2 at the bigEnd is analogous to i-1|i|i+1 at the smallEnd
179  Box planexz = tbxxz; planexz.setSmall(0, planexz.bigEnd(0) );
180  tbxxz.growHi(0,-1);
181  bool need_to_test = (bc_ptr[BCVars::zvel_bc].hi(0) == ERFBCType::ext_dir_upwind) ? true : false;
182 
183  ParallelFor(planexz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
184  Real mfx = mf_ux(i,j,0);
185  Real du_dz = (u(i, j, k) - u(i, j, k-1))*dxInv[2];
186  if (!need_to_test || u(dom_hi.x+1,j,k) <= 0.) {
187  tau13(i,j,k) = 0.5 * ( du_dz
188  - (-(8./3.) * w(i,j,k) + 3. * w(i-1,j,k) - (1./3.) * w(i-2,j,k))*dxInv[0]*mfx );
189  } else {
190  tau13(i,j,k) = 0.5 * ( du_dz
191  + (w(i, j, k) - w(i-1, j, k))*dxInv[0]*mfx );
192  }
193 
194  if (tau13i) tau13i(i,j,k) = 0.5 * du_dz;
195  });
196  }
197 
198  //***********************************************************************************
199  // Y-Dirichlet
200  //***********************************************************************************
201  if (yl_u_dir) {
202  Box planexy = tbxxy; planexy.setBig(1, planexy.smallEnd(1) );
203  tbxxy.growLo(1,-1);
204  bool need_to_test = (bc_ptr[BCVars::xvel_bc].lo(1) == ERFBCType::ext_dir_upwind) ? true : false;
205 
206  ParallelFor(planexy,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
207  Real mfy = 0.5 * (mf_uy(i,j,0) + mf_uy(i ,j-1,0));
208  Real mfx = 0.5 * (mf_vx(i,j,0) + mf_vx(i-1,j ,0));
209  if (!need_to_test || v(i,dom_lo.y,k) >= 0.) {
210  tau12(i,j,k) = 0.5 * ( (-(8./3.) * u(i,j-1,k) + 3. * u(i,j,k) - (1./3.) * u(i,j+1,k))*dxInv[1]*mfy
211  + (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
212  } else {
213  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy
214  + (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
215  }
216  });
217  }
218  if (yh_u_dir) {
219  // note: tilebox xy should be nodal, so j|j-1|j-2 at the bigEnd is analogous to j-1|j|j+1 at the smallEnd
220  Box planexy = tbxxy; planexy.setSmall(1, planexy.bigEnd(1) );
221  tbxxy.growHi(1,-1);
222  bool need_to_test = (bc_ptr[BCVars::xvel_bc].hi(1) == ERFBCType::ext_dir_upwind) ? true : false;
223 
224  ParallelFor(planexy,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
225  Real mfy = 0.5 * (mf_uy(i,j,0) + mf_uy(i ,j-1,0));
226  Real mfx = 0.5 * (mf_vx(i,j,0) + mf_vx(i-1,j ,0));
227  if (!need_to_test || v(i,dom_hi.y+1,k) <= 0.) {
228  tau12(i,j,k) = 0.5 * ( -(-(8./3.) * u(i,j,k) + 3. * u(i,j-1,k) - (1./3.) * u(i,j-2,k))*dxInv[1]*mfy
229  + (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
230  } else {
231  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy
232  + (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
233  }
234  });
235  }
236 
237  if (yl_w_dir) {
238  Box planeyz = tbxyz; planeyz.setBig(1, planeyz.smallEnd(1) );
239  tbxyz.growLo(1,-1);
240  bool need_to_test = (bc_ptr[BCVars::zvel_bc].lo(1) == ERFBCType::ext_dir_upwind) ? true : false;
241 
242  ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
243  Real mfy = mf_vy(i,j,0);
244 
245  Real dv_dz = (v(i, j, k) - v(i, j, k-1))*dxInv[2];
246  if (!need_to_test || v(i,dom_lo.y,k) >= 0.) {
247  tau23(i,j,k) = 0.5 * ( dv_dz
248  + (-(8./3.) * w(i,j-1,k) + 3. * w(i,j ,k) - (1./3.) * w(i,j+1,k))*dxInv[1]*mfy );
249  } else {
250  tau23(i,j,k) = 0.5 * ( dv_dz
251  + (w(i, j, k) - w(i, j-1, k))*dxInv[1]*mfy );
252  }
253 
254  if (tau23i) tau23i(i,j,k) = 0.5 * dv_dz;
255  });
256  }
257  if (yh_w_dir) {
258  // note: tilebox yz should be nodal, so j|j-1|j-2 at the bigEnd is analogous to j-1|j|j+1 at the smallEnd
259  Box planeyz = tbxyz; planeyz.setSmall(1, planeyz.bigEnd(1) );
260  tbxyz.growHi(1,-1);
261  bool need_to_test = (bc_ptr[BCVars::zvel_bc].hi(1) == ERFBCType::ext_dir_upwind) ? true : false;
262 
263  ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
264  Real mfy = mf_vy(i,j,0);
265 
266  Real dv_dz = (v(i, j, k) - v(i, j, k-1))*dxInv[2];
267  if (!need_to_test || v(i,dom_hi.y+1,k) <= 0.) {
268  tau23(i,j,k) = 0.5 * ( dv_dz
269  - (-(8./3.) * w(i,j ,k) + 3. * w(i,j-1,k) - (1./3.) * w(i,j-2,k))*dxInv[1]*mfy );
270  } else {
271  tau23(i,j,k) = 0.5 * ( dv_dz
272  + (w(i, j, k) - w(i, j-1, k))*dxInv[1]*mfy );
273  }
274 
275  if (tau23i) tau23i(i,j,k) = 0.5 * dv_dz;
276  });
277  }
278 
279  //***********************************************************************************
280  // Z-Dirichlet
281  //***********************************************************************************
282  if (zl_u_dir) {
283  Box planexz = tbxxz; planexz.setBig(2, planexz.smallEnd(2) );
284  tbxxz.growLo(2,-1);
285 
286  ParallelFor(planexz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
287  Real mfx = mf_ux(i,j,0);
288 
289  Real du_dz = (-(8./3.) * u(i,j,k-1) + 3. * u(i,j,k) - (1./3.) * u(i,j,k+1))*dxInv[2];
290  tau13(i,j,k) = 0.5 * ( du_dz
291  + (w(i, j, k) - w(i-1, j, k))*dxInv[0]*mfx );
292 
293  if (tau13i) tau13i(i,j,k) = 0.5 * du_dz;
294  });
295  }
296  if (zh_u_dir) {
297  // note: tilebox xz should be nodal, so k|k-1|k-2 at the bigEnd is analogous to k-1|k|k+1 at the smallEnd
298  Box planexz = tbxxz; planexz.setSmall(2, planexz.bigEnd(2) );
299  tbxxz.growHi(2,-1);
300 
301  ParallelFor(planexz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
302  Real mfx = mf_ux(i,j,0);
303 
304  Real du_dz = -(-(8./3.) * u(i,j,k) + 3. * u(i,j,k-1) - (1./3.) * u(i,j,k-2))*dxInv[2];
305  tau13(i,j,k) = 0.5 * ( du_dz
306  + (w(i, j, k) - w(i-1, j, k))*dxInv[0]*mfx );
307 
308  if (tau13i) tau13i(i,j,k) = 0.5 * du_dz;
309  });
310  }
311 
312  if (zl_v_dir) {
313  Box planeyz = tbxyz; planeyz.setBig(2, planeyz.smallEnd(2) );
314  tbxyz.growLo(2,-1);
315 
316  ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
317  Real mfy = mf_vy(i,j,0);
318 
319  Real dv_dz = (-(8./3.) * v(i,j,k-1) + 3. * v(i,j,k ) - (1./3.) * v(i,j,k+1))*dxInv[2];
320  tau23(i,j,k) = 0.5 * ( dv_dz
321  + (w(i, j, k) - w(i, j-1, k))*dxInv[1]*mfy );
322 
323  if (tau23i) tau23i(i,j,k) = 0.5 * dv_dz;
324  });
325  }
326  if (zh_v_dir) {
327  // note: tilebox yz should be nodal, so k|k-1|k-2 at the bigEnd is analogous to k-1|k|k+1 at the smallEnd
328  Box planeyz = tbxyz; planeyz.setSmall(2, planeyz.bigEnd(2) );
329  tbxyz.growHi(2,-1);
330 
331  ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
332  Real mfy = mf_vy(i,j,0);
333 
334  Real dv_dz = -(-(8./3.) * v(i,j,k ) + 3. * v(i,j,k-1) - (1./3.) * v(i,j,k-2))*dxInv[2];
335  tau23(i,j,k) = 0.5 * ( dv_dz
336  + (w(i, j, k) - w(i, j-1, k))*dxInv[1]*mfy );
337 
338  if (tau23i) tau23i(i,j,k) = 0.5 * dv_dz;
339  });
340  }
341 
342  // Fill the remaining cells
343  //***********************************************************************************
344  // Cell centered strains
345  ParallelFor(bxcc, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
346  Real mfx = mf_mx(i,j,0);
347  Real mfy = mf_my(i,j,0);
348  tau11(i,j,k) = (u(i+1, j , k ) - u(i, j, k))*dxInv[0]*mfx;
349  tau22(i,j,k) = (v(i , j+1, k ) - v(i, j, k))*dxInv[1]*mfy;
350  tau33(i,j,k) = (w(i , j , k+1) - w(i, j, k))*dxInv[2];
351  });
352 
353  // Off-diagonal strains
354  ParallelFor(tbxxy,tbxxz,tbxyz,
355  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
356  Real mfy = 0.5 * (mf_uy(i,j,0) + mf_uy(i ,j-1,0));
357  Real mfx = 0.5 * (mf_vx(i,j,0) + mf_vx(i-1,j ,0));
358  tau12(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j-1, k))*dxInv[1]*mfy
359  + (v(i, j, k) - v(i-1, j, k))*dxInv[0]*mfx );
360  },
361  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
362  Real mfx = mf_ux(i,j,0);
363 
364  Real du_dz = (u(i, j, k) - u(i, j, k-1))*dxInv[2];
365  tau13(i,j,k) = 0.5 * ( du_dz
366  + (w(i, j, k) - w(i-1, j, k))*dxInv[0]*mfx );
367 
368  if (tau13i) tau13i(i,j,k) = 0.5 * du_dz;
369  },
370  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
371  Real mfy = mf_vy(i,j,0);
372 
373  Real dv_dz = (v(i, j, k) - v(i, j, k-1))*dxInv[2];
374  tau23(i,j,k) = 0.5 * ( dv_dz
375  + (w(i, j, k) - w(i, j-1, k))*dxInv[1]*mfy );
376 
377  if (tau23i) tau23i(i,j,k) = 0.5 * dv_dz;
378  });
379 }
@ tau12
Definition: ERF_DataStruct.H:31
@ tau23
Definition: ERF_DataStruct.H:31
@ tau33
Definition: ERF_DataStruct.H:31
@ tau22
Definition: ERF_DataStruct.H:31
@ tau11
Definition: ERF_DataStruct.H:31
@ tau13
Definition: ERF_DataStruct.H:31
const auto & dom_hi
Definition: ERF_SetupVertDiff.H:2
const auto & dom_lo
Definition: ERF_SetupVertDiff.H:1
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ zvel_bc
Definition: ERF_IndexDefines.H:89
@ yvel_bc
Definition: ERF_IndexDefines.H:88
@ xvel_bc
Definition: ERF_IndexDefines.H:87
@ ext_dir_ingested
Definition: ERF_IndexDefines.H:212
@ ext_dir
Definition: ERF_IndexDefines.H:209
@ ext_dir_upwind
Definition: ERF_IndexDefines.H:217

Referenced by ERF::advance_dycore(), and erf_make_tau_terms().

Here is the caller graph for this function: