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

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

Here is the call graph for this function:
Here is the caller graph for this function: