59 real(kind=
rp),
intent(in) :: t
60 integer,
intent(in) :: tstep
61 type(
coef_t),
intent(in) :: coef
62 type(
field_t),
intent(inout) :: nut
63 type(
field_t),
intent(in) :: delta
64 real(kind=
rp),
intent(in) :: c
66 type(
field_t),
pointer :: a11, a12, a13, a21, a22, a23, a31, a32, a33
67 type(
field_t),
pointer :: u, v, w
69 real(kind=
rp) :: beta11
70 real(kind=
rp) :: beta12
71 real(kind=
rp) :: beta13
72 real(kind=
rp) :: beta22
73 real(kind=
rp) :: beta23
74 real(kind=
rp) :: beta33
75 real(kind=
rp) :: b_beta
76 real(kind=
rp) :: aijaij
77 integer :: temp_indices(9)
96 call dudxyz (a11%x, u%x, coef%drdx, coef%dsdx, coef%dtdx, coef)
97 call dudxyz (a12%x, u%x, coef%drdy, coef%dsdy, coef%dtdy, coef)
98 call dudxyz (a13%x, u%x, coef%drdz, coef%dsdz, coef%dtdz, coef)
100 call dudxyz (a21%x, v%x, coef%drdx, coef%dsdx, coef%dtdx, coef)
101 call dudxyz (a22%x, v%x, coef%drdy, coef%dsdy, coef%dtdy, coef)
102 call dudxyz (a23%x, v%x, coef%drdz, coef%dsdz, coef%dtdz, coef)
104 call dudxyz (a31%x, w%x, coef%drdx, coef%dsdx, coef%dtdx, coef)
105 call dudxyz (a32%x, w%x, coef%drdy, coef%dsdy, coef%dtdy, coef)
106 call dudxyz (a33%x, w%x, coef%drdz, coef%dsdz, coef%dtdz, coef)
118 do concurrent(i = 1:a11%dof%size())
119 a11%x(i,1,1,1) = a11%x(i,1,1,1) * coef%mult(i,1,1,1)
120 a12%x(i,1,1,1) = a12%x(i,1,1,1) * coef%mult(i,1,1,1)
121 a13%x(i,1,1,1) = a13%x(i,1,1,1) * coef%mult(i,1,1,1)
122 a21%x(i,1,1,1) = a21%x(i,1,1,1) * coef%mult(i,1,1,1)
123 a22%x(i,1,1,1) = a22%x(i,1,1,1) * coef%mult(i,1,1,1)
124 a23%x(i,1,1,1) = a23%x(i,1,1,1) * coef%mult(i,1,1,1)
125 a31%x(i,1,1,1) = a31%x(i,1,1,1) * coef%mult(i,1,1,1)
126 a32%x(i,1,1,1) = a32%x(i,1,1,1) * coef%mult(i,1,1,1)
127 a33%x(i,1,1,1) = a33%x(i,1,1,1) * coef%mult(i,1,1,1)
130 do concurrent(e = 1:coef%msh%nelv)
131 do concurrent(i = 1:coef%Xh%lxyz)
133 beta11 = a11%x(i,1,1,e)**2 + a21%x(i,1,1,e)**2 + a31%x(i,1,1,e)**2
134 beta22 = a12%x(i,1,1,e)**2 + a22%x(i,1,1,e)**2 + a32%x(i,1,1,e)**2
135 beta33 = a13%x(i,1,1,e)**2 + a23%x(i,1,1,e)**2 + a33%x(i,1,1,e)**2
136 beta12 = a11%x(i,1,1,e)*a12%x(i,1,1,e) + &
137 a21%x(i,1,1,e)*a22%x(i,1,1,e) + &
138 a31%x(i,1,1,e)*a32%x(i,1,1,e)
139 beta13 = a11%x(i,1,1,e)*a13%x(i,1,1,e) + &
140 a21%x(i,1,1,e)*a23%x(i,1,1,e) + &
141 a31%x(i,1,1,e)*a33%x(i,1,1,e)
142 beta23 = a12%x(i,1,1,e)*a13%x(i,1,1,e) + &
143 a22%x(i,1,1,e)*a23%x(i,1,1,e) + &
144 a32%x(i,1,1,e)*a33%x(i,1,1,e)
146 b_beta = beta11*beta22 - beta12*beta12 + beta11*beta33 - beta13*beta13 &
147 + beta22*beta33 - beta23*beta23
149 b_beta =
max(0.0_rp, b_beta)
152 aijaij = beta11 + beta22 + beta33
154 nut%x(i,1,1,e) = c*delta%x(i,1,1,e)*delta%x(i,1,1,e) &