151 real(kind=rp),
intent(in) :: t
152 integer,
intent(in) :: tstep
154 type(field_t),
pointer :: u, v, w, u_e, v_e, w_e
156 if (this%if_ext .eqv. .true.)
then
158 associate(ulag => this%ulag, vlag => this%vlag, &
159 wlag => this%wlag, ext_bdf => this%ext_bdf)
161 u => neko_field_registry%get_field_by_name(
"u")
162 v => neko_field_registry%get_field_by_name(
"v")
163 w => neko_field_registry%get_field_by_name(
"w")
164 u_e => neko_field_registry%get_field_by_name(
"u_e")
165 v_e => neko_field_registry%get_field_by_name(
"v_e")
166 w_e => neko_field_registry%get_field_by_name(
"w_e")
168 call this%sumab%compute_fluid(u_e, v_e, w_e, u, v, w, &
169 ulag, vlag, wlag, ext_bdf%advection_coeffs, ext_bdf%nadv)
175 if (neko_bcknd_device .eq. 1)
then
176 call dynamic_smagorinsky_compute_device(this%if_ext, t, tstep, &
177 this%coef, this%nut, &
178 this%delta, this%c_dyn, this%test_filter, &
179 this%mij, this%lij, this%num, this%den)
181 call dynamic_smagorinsky_compute_cpu(this%if_ext, t, tstep, &
182 this%coef, this%nut, &
183 this%delta, this%c_dyn, this%test_filter, &
184 this%mij, this%lij, this%num, this%den)
191 type(elementwise_filter_t),
intent(inout) :: filter_1d
194 if (filter_1d%nx .le. 2)
then
195 call neko_error(
"Dynamic Smagorinsky model error: test filter is not &
196 &defined for the current polynomial order")
198 if (mod(filter_1d%nx,2) .eq. 0)
then
200 filter_1d%trnsfr(int((filter_1d%nx)/2)) = 0.95_rp
201 filter_1d%trnsfr(int((filter_1d%nx)/2) + 1) = 0.50_rp
202 filter_1d%trnsfr(int((filter_1d%nx)/2) + 2) = 0.05_rp
203 if ((int((filter_1d%nx)/2) + 2) .lt. filter_1d%nx)
then
204 do i = int((filter_1d%nx)/2) + 3, filter_1d%nx
205 filter_1d%trnsfr(i) = 0.0_rp
209 filter_1d%nt = int(filter_1d%nx/2) + 1
212 filter_1d%trnsfr(int((filter_1d%nx-1)/2)) = 0.95_rp
213 filter_1d%trnsfr(int((filter_1d%nx-1)/2) + 1) = 0.50_rp
214 filter_1d%trnsfr(int((filter_1d%nx-1)/2) + 2) = 0.05_rp
215 if ((int((filter_1d%nx-1)/2) + 2) .lt. filter_1d%nx)
then
216 do i = int((filter_1d%nx-1)/2) + 3, filter_1d%nx
217 filter_1d%trnsfr(i) = 0.0_rp
221 filter_1d%nt = int((filter_1d%nx-1)/2) + 1
224 call filter_1d%build_1d()
subroutine, public dynamic_smagorinsky_compute_cpu(if_ext, t, tstep, coef, nut, delta, c_dyn, test_filter, mij, lij, num, den)
Compute eddy viscosity on the CPU.
subroutine, public dynamic_smagorinsky_compute_device(if_ext, t, tstep, coef, nut, delta, c_dyn, test_filter, mij, lij, num, den)
Compute eddy viscosity on the device.