Function for computing the momentum RHS for diffusion operator without terrain.
40 auto dxinv = dxInv[0], dyinv = dxInv[1], dzinv = dxInv[2];
42 ParallelFor(bxx, bxy, bxz,
43 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
45 Real mf = mf_m(i,j,0);
47 rho_u_rhs(i,j,k) -= ( (tau11(i , j , k ) - tau11(i-1, j ,k )) * dxinv * mf
48 + (tau12(i , j+1, k ) - tau12(i , j ,k )) * dyinv * mf
49 + (tau13(i , j , k+1) - tau13(i , j ,k )) * dzinv );
51 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
53 Real mf = mf_m(i,j,0);
55 rho_v_rhs(i,j,k) -= ( (tau12(i+1, j , k ) - tau12(i , j , k )) * dxinv * mf
56 + (tau22(i , j , k ) - tau22(i , j-1, k )) * dyinv * mf
57 + (tau23(i , j , k+1) - tau23(i , j , k )) * dzinv );
59 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
61 Real mf = mf_m(i,j,0);
63 rho_w_rhs(i,j,k) -= ( (tau13(i+1, j , k ) - tau13(i , j , k )) * dxinv * mf
64 + (tau23(i , j+1, k ) - tau23(i , j , k )) * dyinv * mf
65 + (tau33(i , j , k ) - tau33(i , j , k-1)) * dzinv );