Function for computing the strain rates with terrain.
47 Box domain_xy = convert(domain, tbxxy.ixType());
48 Box domain_xz = convert(domain, tbxxz.ixType());
49 Box domain_yz = convert(domain, tbxyz.ixType());
54 xl_v_dir = ( xl_v_dir && (tbxxy.smallEnd(0) == domain_xy.smallEnd(0)) );
58 xh_v_dir = ( xh_v_dir && (tbxxy.bigEnd(0) == domain_xy.bigEnd(0)) );
62 xl_w_dir = ( xl_w_dir && (tbxxz.smallEnd(0) == domain_xz.smallEnd(0)) );
66 xh_w_dir = ( xh_w_dir && (tbxxz.bigEnd(0) == domain_xz.bigEnd(0)) );
71 yl_u_dir = ( yl_u_dir && (tbxxy.smallEnd(1) == domain_xy.smallEnd(1)) );
75 yh_u_dir = ( yh_u_dir && (tbxxy.bigEnd(1) == domain_xy.bigEnd(1)) );
79 yl_w_dir = ( yl_w_dir && (tbxyz.smallEnd(1) == domain_yz.smallEnd(1)) );
83 yh_w_dir = ( yh_w_dir && (tbxyz.bigEnd(1) == domain_yz.bigEnd(1)) );
88 zl_u_dir = ( zl_u_dir && (tbxxz.smallEnd(2) == domain_xz.smallEnd(2)) );
92 zh_u_dir = ( zh_u_dir && (tbxxz.bigEnd(2) == domain_xz.bigEnd(2)) );
96 zl_v_dir = ( zl_v_dir && (tbxyz.smallEnd(2) == domain_yz.smallEnd(2)) );
100 zh_v_dir = ( zh_v_dir && (tbxyz.bigEnd(2) == domain_yz.bigEnd(2)) );
106 Box planexy = tbxxy; planexy.setBig(0, planexy.smallEnd(0) );
108 ParallelFor(planexy,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
109 Real GradUz = 0.25 * dxInv[2] * ( u(i ,j ,k+1)/mf_u(i,j,0) + u(i ,j-1,k+1)/mf_u(i,j-1,0)
110 -u(i ,j ,k-1)/mf_u(i,j,0) - u(i ,j-1,k-1)/mf_u(i,j-1,0) );
111 Real GradVz = 0.25 * dxInv[2] * ( v(i ,j ,k+1)/mf_v(i,j,0) + v(i-1,j ,k+1)/mf_v(i-1,j,0)
112 -v(i ,j ,k-1)/mf_v(i,j,0) - v(i-1,j ,k-1)/mf_v(i-1,j,0) );
114 Real met_h_xi,met_h_eta,met_h_zeta;
119 tau12(i,j,k) = 0.5 * ( (u(i, j, k)/mf_u(i,j,0) - u(i, j-1, k)/mf_u(i,j-1,0))*dxInv[1]
120 + (-(8./3.) * v(i-1,j,k)/mf_v(i-1,j,0) + 3. * v(i,j,k)/mf_v(i,j,0) - (1./3.) * v(i+1,j,k)/mf_v(i+1,j,0))*dxInv[0]
121 - (met_h_eta/met_h_zeta)*GradUz
122 - (met_h_xi /met_h_zeta)*GradVz ) * mf_u(i,j,0)*mf_u(i,j,0);
123 tau21(i,j,k) = tau12(i,j,k);
127 Box planexy = tbxxy; planexy.setSmall(0, planexy.bigEnd(0) );
129 ParallelFor(planexy,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
130 Real GradUz = 0.25 * dxInv[2] * ( u(i ,j ,k+1)/mf_u(i,j,0) + u(i ,j-1,k+1)/mf_u(i,j-1,0)
131 -u(i ,j ,k-1)/mf_u(i,j,0) - u(i ,j-1,k-1)/mf_u(i,j-1,0) );
132 Real GradVz = 0.25 * dxInv[2] * ( v(i ,j ,k+1)/mf_v(i,j,0) + v(i-1,j ,k+1)/mf_v(i-1,j,0)
133 -v(i ,j ,k-1)/mf_v(i,j,0) - v(i-1,j ,k-1)/mf_v(i-1,j,0) );
135 Real met_h_xi,met_h_eta,met_h_zeta;
140 tau12(i,j,k) = 0.5 * ( (u(i, j, k)/mf_u(i,j,0) - u(i, j-1, k)/mf_u(i,j-1,0))*dxInv[1]
141 - (-(8./3.) * v(i,j,k)/mf_v(i,j,0) + 3. * v(i-1,j,k)/mf_v(i-1,j,0) - (1./3.) * v(i-2,j,k)/mf_v(i-2,j,0))*dxInv[0]
142 - (met_h_eta/met_h_zeta)*GradUz
143 - (met_h_xi /met_h_zeta)*GradVz ) * mf_u(i,j,0)*mf_u(i,j,0);
144 tau21(i,j,k) = tau12(i,j,k);
149 Box planexz = tbxxz; planexz.setBig(0, planexz.smallEnd(0) );
150 planexz.setSmall(2, planexz.smallEnd(2)+1 ); planexz.setBig(2, planexz.bigEnd(2)-1 );
152 ParallelFor(planexz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
153 Real GradWz = 0.25 * dxInv[2] * ( w(i ,j ,k+1) + w(i-1,j ,k+1)
154 - w(i ,j ,k-1) - w(i-1,j ,k-1) );
156 Real met_h_xi,met_h_zeta;
160 tau13(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j, k-1))*dxInv[2]/met_h_zeta
161 + ( (-(8./3.) * w(i-1,j,k) + 3. * w(i,j,k) - (1./3.) * w(i+1,j,k))*dxInv[0]
162 - (met_h_xi/met_h_zeta)*GradWz ) * mf_u(i,j,0) );
163 tau31(i,j,k) = tau13(i,j,k);
167 Box planexz = tbxxz; planexz.setSmall(0, planexz.bigEnd(0) );
168 planexz.setSmall(2, planexz.smallEnd(2)+1 ); planexz.setBig(2, planexz.bigEnd(2)-1 );
170 ParallelFor(planexz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
171 Real GradWz = 0.25 * dxInv[2] * ( w(i ,j ,k+1) + w(i-1,j ,k+1)
172 - w(i ,j ,k-1) - w(i-1,j ,k-1) );
174 Real met_h_xi,met_h_zeta;
178 tau13(i,j,k) = 0.5 * ( (u(i, j, k) - u(i, j, k-1))*dxInv[2]/met_h_zeta
179 - ( (-(8./3.) * w(i,j,k) + 3. * w(i-1,j,k) - (1./3.) * w(i-2,j,k))*dxInv[0]
180 - (met_h_xi/met_h_zeta)*GradWz ) * mf_u(i,j,0) );
181 tau31(i,j,k) = tau13(i,j,k);
189 Box planexy = tbxxy; planexy.setBig(1, planexy.smallEnd(1) );
191 ParallelFor(planexy,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
192 Real GradUz = 0.25 * dxInv[2] * ( u(i ,j ,k+1)/mf_u(i,j,0) + u(i ,j-1,k+1)/mf_u(i,j-1,0)
193 -u(i ,j ,k-1)/mf_u(i,j,0) - u(i ,j-1,k-1)/mf_u(i,j-1,0) );
194 Real GradVz = 0.25 * dxInv[2] * ( v(i ,j ,k+1)/mf_v(i,j,0) + v(i-1,j ,k+1)/mf_v(i-1,j,0)
195 -v(i ,j ,k-1)/mf_v(i,j,0) - v(i-1,j ,k-1)/mf_v(i-1,j,0) );
197 Real met_h_xi,met_h_eta,met_h_zeta;
202 tau12(i,j,k) = 0.5 * ( (-(8./3.) * u(i,j-1,k)/mf_u(i,j-1,0) + 3. * u(i,j,k)/mf_u(i,j,0) - (1./3.) * u(i,j+1,k)/mf_u(i,j+1,0))*dxInv[1]
203 + (v(i, j, k)/mf_v(i,j,0) - v(i-1, j, k)/mf_v(i,j,0))*dxInv[0]
204 - (met_h_eta/met_h_zeta)*GradUz
205 - (met_h_xi /met_h_zeta)*GradVz ) * mf_u(i,j,0)*mf_u(i,j,0);
206 tau21(i,j,k) = tau12(i,j,k);
210 Box planexy = tbxxy; planexy.setSmall(1, planexy.bigEnd(1) );
212 ParallelFor(planexy,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
213 Real GradUz = 0.25 * dxInv[2] * ( u(i ,j ,k+1)/mf_u(i,j,0) + u(i ,j-1,k+1)/mf_u(i,j-1,0)
214 -u(i ,j ,k-1)/mf_u(i,j,0) - u(i ,j-1,k-1)/mf_u(i,j-1,0) );
215 Real GradVz = 0.25 * dxInv[2] * ( v(i ,j ,k+1)/mf_v(i,j,0) + v(i-1,j ,k+1)/mf_v(i-1,j,0)
216 -v(i ,j ,k-1)/mf_v(i,j,0) - v(i-1,j ,k-1)/mf_v(i-1,j,0) );
218 Real met_h_xi,met_h_eta,met_h_zeta;
223 tau12(i,j,k) = 0.5 * ( -(-(8./3.) * u(i,j,k)/mf_u(i,j,0) + 3. * u(i,j-1,k)/mf_u(i,j-1,0) - (1./3.) * u(i,j-2,k)/mf_u(i,j-2,0))*dxInv[1] +
224 + (v(i, j, k)/mf_v(i,j,0) - v(i-1, j, k)/mf_v(i-1,j,0))*dxInv[0]
225 - (met_h_eta/met_h_zeta)*GradUz
226 - (met_h_xi /met_h_zeta)*GradVz ) * mf_u(i,j,0)*mf_u(i,j,0);
227 tau21(i,j,k) = tau12(i,j,k);
232 Box planeyz = tbxyz; planeyz.setBig(1, planeyz.smallEnd(1) );
233 planeyz.setSmall(2, planeyz.smallEnd(2)+1 ); planeyz.setBig(2, planeyz.bigEnd(2)-1 );
235 ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
236 Real GradWz = 0.25 * dxInv[2] * ( w(i ,j ,k+1) + w(i ,j-1,k+1)
237 - w(i ,j ,k-1) - w(i ,j-1,k-1) );
239 Real met_h_eta,met_h_zeta;
243 tau23(i,j,k) = 0.5 * ( (v(i, j, k) - v(i, j, k-1))*dxInv[2]/met_h_zeta
244 + ( (-(8./3.) * w(i,j-1,k) + 3. * w(i,j ,k) - (1./3.) * w(i,j+1,k))*dxInv[1]*mf_v(i,j,0)
245 - (met_h_eta/met_h_zeta)*GradWz ) * mf_v(i,j,0) );
246 tau32(i,j,k) = tau23(i,j,k);
250 Box planeyz = tbxyz; planeyz.setSmall(1, planeyz.bigEnd(1) );
251 planeyz.setSmall(2, planeyz.smallEnd(2)+1 ); planeyz.setBig(2, planeyz.bigEnd(2)-1 );
253 ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
254 Real GradWz = 0.25 * dxInv[2] * ( w(i ,j ,k+1) + w(i ,j-1,k+1)
255 - w(i ,j ,k-1) - w(i ,j-1,k-1) );
257 Real met_h_eta,met_h_zeta;
261 tau23(i,j,k) = 0.5 * ( (v(i, j, k) - v(i, j, k-1))*dxInv[2]/met_h_zeta
262 - ( (-(8./3.) * w(i,j ,k) + 3. * w(i,j-1,k) - (1./3.) * w(i,j-2,k))*dxInv[1]
263 - (met_h_eta/met_h_zeta)*GradWz ) * mf_v(i,j,0) );
264 tau32(i,j,k) = tau23(i,j,k);
272 Box planexz = tbxxz; planexz.setBig(2, planexz.smallEnd(2) );
274 ParallelFor(planexz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
275 Real GradWz = 0.5 * dxInv[2] * ( w(i ,j ,k+1) + w(i-1,j ,k+1)
276 - w(i ,j ,k ) - w(i-1,j ,k ) );
278 Real met_h_xi,met_h_zeta;
282 tau13(i,j,k) = 0.5 * ( (-(8./3.) * u(i,j,k-1) + 3. * u(i,j,k) - (1./3.) * u(i,j,k+1))*dxInv[2]/met_h_zeta
283 + ( (w(i, j, k) - w(i-1, j, k))*dxInv[0]
284 - (met_h_xi/met_h_zeta)*GradWz ) * mf_u(i,j,0) );
285 tau31(i,j,k) = tau13(i,j,k);
289 Box planexz = tbxxz; planexz.setSmall(2, planexz.bigEnd(2) );
291 ParallelFor(planexz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
295 tau13(i,j,k) = 0.5 * ( -(-(8./3.) * u(i,j,k) + 3. * u(i,j,k-1) - (1./3.) * u(i,j,k-2))*dxInv[2]/met_h_zeta
296 + (w(i, j, k) - w(i-1, j, k))*dxInv[0]*mf_u(i,j,0) );
297 tau31(i,j,k) = tau13(i,j,k);
302 Box planeyz = tbxyz; planeyz.setBig(2, planeyz.smallEnd(2) );
304 ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
305 Real GradWz = 0.5 * dxInv[2] * ( w(i ,j ,k+1) + w(i ,j-1,k+1)
306 - w(i ,j ,k ) - w(i ,j-1,k ) );
308 Real met_h_eta,met_h_zeta;
312 tau23(i,j,k) = 0.5 * ( (-(8./3.) * v(i,j,k-1) + 3. * v(i,j,k ) - (1./3.) * v(i,j,k+1))*dxInv[2]/met_h_zeta
313 + ( (w(i, j, k) - w(i, j-1, k))*dxInv[1]
314 - (met_h_eta/met_h_zeta)*GradWz ) * mf_v(i,j,0) );
315 tau32(i,j,k) = tau23(i,j,k);
318 if (zh_v_dir && (tbxyz.bigEnd(2) == domain_yz.bigEnd(2))) {
319 Box planeyz = tbxyz; planeyz.setSmall(2, planeyz.bigEnd(2) );
321 ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
325 tau23(i,j,k) = 0.5 * ( -(-(8./3.) * v(i,j,k ) + 3. * v(i,j,k-1) - (1./3.) * v(i,j,k-2))*dxInv[2]/met_h_zeta
326 + (w(i, j, k) - w(i, j-1, k))*dxInv[1]*mf_v(i,j,0) );
327 tau32(i,j,k) = tau23(i,j,k);
332 if (zl_u_dir && zl_v_dir) {
333 Box planecc = bxcc; planecc.setBig(2, planecc.smallEnd(2) );
335 ParallelFor(planecc, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
336 Real GradUz = 0.5 * dxInv[2] * ( (-(8./3.) * u(i ,j,k-1) + 3. * u(i ,j,k) - (1./3.) * u(i ,j,k+1))
337 + (-(8./3.) * u(i-1,j,k-1) + 3. * u(i-1,j,k) - (1./3.) * u(i-1,j,k+1)) );
338 Real GradVz = 0.5 * dxInv[2] * ( (-(8./3.) * v(i,j ,k-1) + 3. * v(i,j ,k) - (1./3.) * v(i,j ,k+1))
339 + (-(8./3.) * v(i,j-1,k-1) + 3. * v(i,j-1,k) - (1./3.) * v(i,j-1,k+1)) );
341 Real met_h_xi,met_h_eta,met_h_zeta;
344 met_h_zeta = detJ(i,j,k);
346 tau11(i,j,k) = ( (u(i+1, j, k)/mf_u(i+1,j,0) - u(i, j, k)/mf_u(i,j,0))*dxInv[0]
347 - (met_h_xi/met_h_zeta)*GradUz ) * mf_u(i,j,0)*mf_u(i,j,0);
348 tau22(i,j,k) = ( (v(i, j+1, k)/mf_v(i,j+1,0) - v(i, j, k)/mf_v(i,j,0))*dxInv[1]
349 - (met_h_eta/met_h_zeta)*GradVz ) * mf_v(i,j,0)*mf_v(i,j,0);
350 tau33(i,j,k) = (w(i, j, k+1) - w(i, j, k))*dxInv[2]/met_h_zeta;
353 Box planexy = tbxxy; planexy.setBig(2, planexy.smallEnd(2) );
355 ParallelFor(planexy,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
356 Real GradUz = 0.5 * dxInv[2] * ( (-(8./3.) * u(i,j ,k-1) + 3. * u(i,j ,k) - (1./3.) * u(i,j ,k+1))
357 + (-(8./3.) * u(i,j-1,k-1) + 3. * u(i,j-1,k) - (1./3.) * u(i,j-1,k+1)) );
358 Real GradVz = 0.5 * dxInv[2] * ( (-(8./3.) * v(i ,j,k-1) + 3. * v(i ,j,k) - (1./3.) * v(i ,j,k+1))
359 + (-(8./3.) * v(i-1,j,k-1) + 3. * v(i-1,j,k) - (1./3.) * v(i-1,j,k+1)) );
361 Real met_h_xi,met_h_eta,met_h_zeta;
366 tau12(i,j,k) = 0.5 * ( (u(i, j, k)/mf_u(i,j,0) - u(i , j-1, k)/mf_u(i,j-1,0))*dxInv[1]
367 + (v(i, j, k)/mf_v(i,j,0) - v(i-1, j , k)/mf_v(i-1,j,0))*dxInv[0]
368 - (met_h_eta/met_h_zeta)*GradUz
369 - (met_h_xi /met_h_zeta)*GradVz ) * mf_u(i,j,0)*mf_u(i,j,0);
370 tau21(i,j,k) = tau12(i,j,k);
377 if (!zl_u_dir && (tbxxz.smallEnd(2) == domain_xz.smallEnd(2)) ) {
378 Box planexz = tbxxz; planexz.setBig(2, planexz.smallEnd(2));
380 ParallelFor(planexz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
381 Real GradWz = 0.5 * dxInv[2] * ( w(i ,j ,k+1) + w(i-1,j ,k+1)
382 - w(i ,j ,k ) - w(i-1,j ,k ) );
384 Real met_h_xi,met_h_zeta;
388 tau13(i,j,k) = 0.5 * ( (u(i, j, k) - u(i , j, k-1))*dxInv[2]/met_h_zeta
389 + ( (w(i, j, k) - w(i-1, j, k ))*dxInv[0]
390 - (met_h_xi/met_h_zeta)*GradWz ) * mf_u(i,j,0) );
391 tau31(i,j,k) = tau13(i,j,k);
394 if (!zl_v_dir && (tbxyz.smallEnd(2) == domain_yz.smallEnd(2))) {
395 Box planeyz = tbxyz; planeyz.setBig(2, planeyz.smallEnd(2) );
397 ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
398 Real GradWz = 0.5 * dxInv[2] * ( w(i ,j ,k+1) + w(i ,j-1,k+1)
399 - w(i ,j ,k ) - w(i ,j-1,k ) );
401 Real met_h_eta,met_h_zeta;
405 tau23(i,j,k) = 0.5 * ( (v(i, j, k) - v(i, j , k-1))*dxInv[2]/met_h_zeta
406 + ( (w(i, j, k) - w(i, j-1, k ))*dxInv[1]
407 - (met_h_eta/met_h_zeta)*GradWz ) * mf_v(i,j,0) );
408 tau32(i,j,k) = tau23(i,j,k);
415 if (!zh_u_dir && (tbxxz.bigEnd(2) == domain_xz.bigEnd(2))) {
416 Box planexz = tbxxz; planexz.setSmall(2, planexz.bigEnd(2) );
418 ParallelFor(planexz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
422 tau13(i,j,k) = 0.5 * ( (u(i, j, k) - u(i , j, k-1))*dxInv[2]/met_h_zeta
423 + (w(i, j, k) - w(i-1, j, k ))*dxInv[0]*mf_u(i,j,0) );
424 tau31(i,j,k) = tau13(i,j,k);
427 if (!zh_v_dir && (tbxyz.bigEnd(2) == domain_yz.bigEnd(2))) {
428 Box planeyz = tbxyz; planeyz.setSmall(2, planeyz.bigEnd(2) );
430 ParallelFor(planeyz,[=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
434 tau23(i,j,k) = 0.5 * ( (v(i, j, k) - v(i, j , k-1))*dxInv[2]/met_h_zeta
435 + (w(i, j, k) - w(i, j-1, k ))*dxInv[1]*mf_v(i,j,0) );
436 tau32(i,j,k) = tau23(i,j,k);
444 ParallelFor(bxcc, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
445 Real GradUz = 0.25 * dxInv[2] * ( u(i ,j ,k+1)/mf_u(i,j,0) + u(i-1,j ,k+1)/mf_u(i-1,j,0)
446 -u(i ,j ,k-1)/mf_u(i,j,0) - u(i-1,j ,k-1)/mf_u(i-1,j,0) );
447 Real GradVz = 0.25 * dxInv[2] * ( v(i ,j ,k+1)/mf_v(i,j,0) + v(i ,j-1,k+1)/mf_v(i,j-1,0)
448 -v(i ,j ,k-1)/mf_v(i,j,0) - v(i ,j-1,k-1)/mf_v(i,j-1,0) );
450 Real met_h_xi,met_h_eta,met_h_zeta;
453 met_h_zeta = detJ(i,j,k);
455 tau11(i,j,k) = ( (u(i+1, j, k)/mf_u(i+1,j,0) - u(i, j, k)/mf_u(i,j,0))*dxInv[0]
456 - (met_h_xi/met_h_zeta)*GradUz ) * mf_m(i,j,0)*mf_m(i,j,0);
457 tau22(i,j,k) = ( (v(i, j+1, k)/mf_v(i,j+1,0) - v(i, j, k)/mf_v(i,j,0))*dxInv[1]
458 - (met_h_eta/met_h_zeta)*GradVz ) * mf_m(i,j,0)*mf_m(i,j,0);
459 tau33(i,j,k) = (w(i, j, k+1) - w(i, j, k))*dxInv[2]/met_h_zeta;
463 ParallelFor(tbxxy,tbxxz,tbxyz,
464 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
465 Real GradUz = 0.25 * dxInv[2] * ( u(i ,j ,k+1)/mf_u(i,j,0) + u(i ,j-1,k+1)/mf_u(i,j-1,0)
466 -u(i ,j ,k-1)/mf_u(i,j,0) - u(i ,j-1,k-1)/mf_u(i,j-1,0) );
467 Real GradVz = 0.25 * dxInv[2] * ( v(i ,j ,k+1)/mf_v(i,j,0) + v(i-1,j ,k+1)/mf_v(i-1,j,0)
468 -v(i ,j ,k-1)/mf_v(i,j,0) - v(i-1,j ,k-1)/mf_v(i-1,j,0) );
470 Real met_h_xi,met_h_eta,met_h_zeta;
475 tau12(i,j,k) = 0.5 * ( (u(i, j, k)/mf_u(i,j,0) - u(i , j-1, k)/mf_u(i,j-1,0))*dxInv[1]
476 + (v(i, j, k)/mf_v(i,j,0) - v(i-1, j , k)/mf_v(i-1,j,0))*dxInv[0]
477 - (met_h_eta/met_h_zeta)*GradUz
478 - (met_h_xi /met_h_zeta)*GradVz ) * mf_u(i,j,0)*mf_u(i,j,0);
479 tau21(i,j,k) = tau12(i,j,k);
481 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
482 Real GradWz = 0.25 * dxInv[2] * ( w(i ,j ,k+1) + w(i-1,j ,k+1)
483 - w(i ,j ,k-1) - w(i-1,j ,k-1) );
485 Real met_h_xi,met_h_zeta;
489 tau13(i,j,k) = 0.5 * ( (u(i, j, k) - u(i , j, k-1))*dxInv[2]/met_h_zeta
490 + ( (w(i, j, k) - w(i-1, j, k ))*dxInv[0]
491 - (met_h_xi/met_h_zeta)*GradWz ) * mf_u(i,j,0) );
492 tau31(i,j,k) = tau13(i,j,k);
494 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
495 Real GradWz = 0.25 * dxInv[2] * ( w(i ,j ,k+1) + w(i ,j-1,k+1)
496 - w(i ,j ,k-1) - w(i ,j-1,k-1) );
498 Real met_h_eta,met_h_zeta;
502 tau23(i,j,k) = 0.5 * ( (v(i, j, k) - v(i, j , k-1))*dxInv[2]/met_h_zeta
503 + ( (w(i, j, k) - w(i, j-1, k ))*dxInv[1]
504 - (met_h_eta/met_h_zeta)*GradWz ) * mf_v(i,j,0) );
505 tau32(i,j,k) = tau23(i,j,k);
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_xi_AtEdgeCenterK(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:234
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_xi_AtEdgeCenterJ(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:280
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtEdgeCenterJ(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:266
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtEdgeCenterK(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:221
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtEdgeCenterI(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:310
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_eta_AtCellCenter(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:69
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_eta_AtEdgeCenterK(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:249
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_xi_AtCellCenter(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:54
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_eta_AtEdgeCenterI(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:337
@ zvel_bc
Definition: ERF_IndexDefines.H:90
@ yvel_bc
Definition: ERF_IndexDefines.H:89
@ xvel_bc
Definition: ERF_IndexDefines.H:88
@ ext_dir_ingested
Definition: ERF_IndexDefines.H:183
@ ext_dir
Definition: ERF_IndexDefines.H:180