169 type(
coef_t),
target,
optional :: coef
170 type(
field_t),
target,
intent(in) :: u, v, w, p
171 character(*),
intent(in),
optional :: set
172 character(*),
intent(in),
optional :: name
174 character(len=1024) :: unique_name
185 if (
present(set))
then
186 this%stat_set = trim(set)
187 if (this%stat_set .eq.
'basic')
then
191 this%stat_set =
'full'
195 if (
present(name))
then
196 unique_name = name //
"/"
198 unique_name =
"fluid_stats/"
201 call this%stats_work%init(this%u%dof,
'stats')
202 call this%stats_u%init(this%u%dof,
'u temp')
203 call this%stats_v%init(this%u%dof,
'v temp')
204 call this%stats_w%init(this%u%dof,
'w temp')
205 call this%stats_p%init(this%u%dof,
'p temp')
206 call this%u_mean%init(this%u, trim(unique_name) //
'mean_u')
207 call this%v_mean%init(this%v, trim(unique_name) //
'mean_v')
208 call this%w_mean%init(this%w, trim(unique_name) //
'mean_w')
209 call this%p_mean%init(this%p, trim(unique_name) //
'mean_p')
210 call this%uu%init(this%stats_u , trim(unique_name) //
'mean_uu')
211 call this%vv%init(this%stats_v , trim(unique_name) //
'mean_vv')
212 call this%ww%init(this%stats_w , trim(unique_name) //
'mean_ww')
213 call this%uv%init(this%stats_work, trim(unique_name) //
'mean_uv')
214 call this%uw%init(this%stats_work, trim(unique_name) //
'mean_uw')
215 call this%vw%init(this%stats_work, trim(unique_name) //
'mean_vw')
216 call this%pp%init(this%stats_p , trim(unique_name) //
'mean_pp')
218 if (this%n_stats .eq. 44)
then
219 call this%dudx%init(this%u%dof,
'dudx')
220 call this%dudy%init(this%u%dof,
'dudy')
221 call this%dudz%init(this%u%dof,
'dudz')
222 call this%dvdx%init(this%u%dof,
'dvdx')
223 call this%dvdy%init(this%u%dof,
'dvdy')
224 call this%dvdz%init(this%u%dof,
'dvdz')
225 call this%dwdx%init(this%u%dof,
'dwdx')
226 call this%dwdy%init(this%u%dof,
'dwdy')
227 call this%dwdz%init(this%u%dof,
'dwdz')
229 call this%uuu%init(this%stats_work, trim(unique_name) //
'mean_uuu')
230 call this%vvv%init(this%stats_work, trim(unique_name) //
'mean_vvv')
231 call this%www%init(this%stats_work, trim(unique_name) //
'mean_www')
232 call this%uuv%init(this%stats_work, trim(unique_name) //
'mean_uuv')
233 call this%uuw%init(this%stats_work, trim(unique_name) //
'mean_uuw')
234 call this%uvv%init(this%stats_work, trim(unique_name) //
'mean_uvv')
235 call this%uvw%init(this%stats_work, trim(unique_name) //
'mean_uvw')
236 call this%vvw%init(this%stats_work, trim(unique_name) //
'mean_vvw')
237 call this%uww%init(this%stats_work, trim(unique_name) //
'mean_uww')
238 call this%vww%init(this%stats_work, trim(unique_name) //
'mean_vww')
239 call this%uuuu%init(this%stats_work, trim(unique_name) //
'mean_uuuu')
240 call this%vvvv%init(this%stats_work, trim(unique_name) //
'mean_vvvv')
241 call this%wwww%init(this%stats_work, trim(unique_name) //
'mean_wwww')
243 call this%ppp%init(this%stats_work , trim(unique_name) //
'mean_ppp')
244 call this%pppp%init(this%stats_work, trim(unique_name) //
'mean_pppp')
246 call this%pu%init(this%stats_work, trim(unique_name) //
'mean_pu')
247 call this%pv%init(this%stats_work, trim(unique_name) //
'mean_pv')
248 call this%pw%init(this%stats_work, trim(unique_name) //
'mean_pw')
250 call this%pdudx%init(this%stats_work, trim(unique_name) //
'mean_pdudx')
251 call this%pdudy%init(this%stats_work, trim(unique_name) //
'mean_pdudy')
252 call this%pdudz%init(this%stats_work, trim(unique_name) //
'mean_pdudz')
253 call this%pdvdx%init(this%stats_work, trim(unique_name) //
'mean_pdvdx')
254 call this%pdvdy%init(this%stats_work, trim(unique_name) //
'mean_pdvdy')
255 call this%pdvdz%init(this%stats_work, trim(unique_name) //
'mean_pdvdz')
256 call this%pdwdx%init(this%stats_work, trim(unique_name) //
'mean_pdwdx')
257 call this%pdwdy%init(this%stats_work, trim(unique_name) //
'mean_pdwdy')
258 call this%pdwdz%init(this%stats_work, trim(unique_name) //
'mean_pdwdz')
260 call this%e11%init(this%stats_work, trim(unique_name) //
'mean_e11')
261 call this%e22%init(this%stats_work, trim(unique_name) //
'mean_e22')
262 call this%e33%init(this%stats_work, trim(unique_name) //
'mean_e33')
263 call this%e12%init(this%stats_work, trim(unique_name) //
'mean_e12')
264 call this%e13%init(this%stats_work, trim(unique_name) //
'mean_e13')
265 call this%e23%init(this%stats_work, trim(unique_name) //
'mean_e23')
268 call this%stat_fields%init(this%n_stats)
270 call this%stat_fields%assign_to_field(1, this%p_mean%mf)
271 call this%stat_fields%assign_to_field(2, this%u_mean%mf)
272 call this%stat_fields%assign_to_field(3, this%v_mean%mf)
273 call this%stat_fields%assign_to_field(4, this%w_mean%mf)
274 call this%stat_fields%assign_to_field(5, this%pp%mf)
275 call this%stat_fields%assign_to_field(6, this%uu%mf)
276 call this%stat_fields%assign_to_field(7, this%vv%mf)
277 call this%stat_fields%assign_to_field(8, this%ww%mf)
278 call this%stat_fields%assign_to_field(9, this%uv%mf)
279 call this%stat_fields%assign_to_field(10, this%uw%mf)
280 call this%stat_fields%assign_to_field(11, this%vw%mf)
282 if (this%n_stats .eq. 44)
then
283 call this%stat_fields%assign_to_field(12, this%uuu%mf)
284 call this%stat_fields%assign_to_field(13, this%vvv%mf)
285 call this%stat_fields%assign_to_field(14, this%www%mf)
286 call this%stat_fields%assign_to_field(15, this%uuv%mf)
287 call this%stat_fields%assign_to_field(16, this%uuw%mf)
288 call this%stat_fields%assign_to_field(17, this%uvv%mf)
289 call this%stat_fields%assign_to_field(18, this%uvw%mf)
290 call this%stat_fields%assign_to_field(19, this%vvw%mf)
291 call this%stat_fields%assign_to_field(20, this%uww%mf)
292 call this%stat_fields%assign_to_field(21, this%vww%mf)
293 call this%stat_fields%assign_to_field(22, this%uuuu%mf)
294 call this%stat_fields%assign_to_field(23, this%vvvv%mf)
295 call this%stat_fields%assign_to_field(24, this%wwww%mf)
296 call this%stat_fields%assign_to_field(25, this%ppp%mf)
297 call this%stat_fields%assign_to_field(26, this%pppp%mf)
298 call this%stat_fields%assign_to_field(27, this%pu%mf)
299 call this%stat_fields%assign_to_field(28, this%pv%mf)
300 call this%stat_fields%assign_to_field(29, this%pw%mf)
302 call this%stat_fields%assign_to_field(30, this%pdudx%mf)
303 call this%stat_fields%assign_to_field(31, this%pdudy%mf)
304 call this%stat_fields%assign_to_field(32, this%pdudz%mf)
305 call this%stat_fields%assign_to_field(33, this%pdvdx%mf)
306 call this%stat_fields%assign_to_field(34, this%pdvdy%mf)
307 call this%stat_fields%assign_to_field(35, this%pdvdz%mf)
308 call this%stat_fields%assign_to_field(36, this%pdwdx%mf)
309 call this%stat_fields%assign_to_field(37, this%pdwdy%mf)
310 call this%stat_fields%assign_to_field(38, this%pdwdz%mf)
311 call this%stat_fields%assign_to_field(39, this%e11%mf)
312 call this%stat_fields%assign_to_field(40, this%e22%mf)
313 call this%stat_fields%assign_to_field(41, this%e33%mf)
314 call this%stat_fields%assign_to_field(42, this%e12%mf)
315 call this%stat_fields%assign_to_field(43, this%e13%mf)
316 call this%stat_fields%assign_to_field(44, this%e23%mf)
325 real(kind=
rp),
intent(in) :: k
328 associate(stats_work => this%stats_work, stats_u => this%stats_u, &
329 stats_v => this%stats_v, stats_w => this%stats_w, &
330 stats_p => this%stats_p)
331 n = stats_work%dof%size()
336 call this%u_mean%update(k)
337 call this%v_mean%update(k)
338 call this%w_mean%update(k)
339 call this%p_mean%update(k)
341 call device_col3(stats_u%x_d, this%u%x_d, this%u%x_d, n)
342 call device_col3(stats_v%x_d, this%v%x_d, this%v%x_d, n)
343 call device_col3(stats_w%x_d, this%w%x_d, this%w%x_d, n)
344 call device_col3(stats_p%x_d, this%p%x_d, this%p%x_d, n)
346 call this%uu%update(k)
347 call this%vv%update(k)
348 call this%ww%update(k)
349 call this%pp%update(k)
351 call device_col3(stats_work%x_d, this%u%x_d, this%v%x_d, n)
352 call this%uv%update(k)
353 call device_col3(stats_work%x_d, this%u%x_d, this%w%x_d, n)
354 call this%uw%update(k)
355 call device_col3(stats_work%x_d, this%v%x_d, this%w%x_d, n)
356 call this%vw%update(k)
357 if (this%n_stats .eq. 11)
return
359 call this%uvw%update(k)
360 call device_col3(stats_work%x_d, this%stats_u%x_d, this%u%x_d, n)
361 call this%uuu%update(k)
362 call device_col3(stats_work%x_d, this%stats_v%x_d, this%v%x_d, n)
363 call this%vvv%update(k)
364 call device_col3(stats_work%x_d, this%stats_w%x_d, this%w%x_d, n)
365 call this%www%update(k)
366 call device_col3(stats_work%x_d, this%stats_u%x_d, this%v%x_d, n)
367 call this%uuv%update(k)
368 call device_col3(stats_work%x_d, this%stats_u%x_d, this%w%x_d, n)
369 call this%uuw%update(k)
370 call device_col3(stats_work%x_d, this%stats_v%x_d, this%u%x_d, n)
371 call this%uvv%update(k)
372 call device_col3(stats_work%x_d, this%stats_v%x_d, this%w%x_d, n)
373 call this%vvw%update(k)
374 call device_col3(stats_work%x_d, this%stats_w%x_d, this%u%x_d, n)
375 call this%uww%update(k)
376 call device_col3(stats_work%x_d, this%stats_w%x_d, this%v%x_d, n)
377 call this%vww%update(k)
379 call device_col3(stats_work%x_d, this%stats_u%x_d, this%stats_u%x_d, n)
380 call this%uuuu%update(k)
381 call device_col3(stats_work%x_d, this%stats_v%x_d, this%stats_v%x_d, n)
382 call this%vvvv%update(k)
383 call device_col3(stats_work%x_d, this%stats_w%x_d, this%stats_w%x_d, n)
384 call this%wwww%update(k)
386 call device_col3(stats_work%x_d, this%stats_p%x_d, this%p%x_d, n)
387 call this%ppp%update(k)
388 call device_col3(stats_work%x_d, this%stats_p%x_d, this%stats_p%x_d, n)
389 call this%pppp%update(k)
391 call device_col3(stats_work%x_d, this%p%x_d, this%u%x_d, n)
392 call this%pu%update(k)
393 call device_col3(stats_work%x_d, this%p%x_d, this%v%x_d, n)
394 call this%pv%update(k)
395 call device_col3(stats_work%x_d, this%p%x_d, this%w%x_d, n)
396 call this%pw%update(k)
400 call this%u_mean%update(k)
401 call this%v_mean%update(k)
402 call this%w_mean%update(k)
403 call this%p_mean%update(k)
404 call col3(stats_u%x, this%u%x, this%u%x, n)
405 call col3(stats_v%x, this%v%x, this%v%x, n)
406 call col3(stats_w%x, this%w%x, this%w%x, n)
407 call col3(stats_p%x, this%p%x, this%p%x, n)
409 call this%uu%update(k)
410 call this%vv%update(k)
411 call this%ww%update(k)
412 call this%pp%update(k)
414 call col3(stats_work%x, this%u%x, this%v%x, n)
415 call this%uv%update(k)
416 call col3(stats_work%x, this%u%x, this%w%x, n)
417 call this%uw%update(k)
418 call col3(stats_work%x, this%v%x, this%w%x, n)
419 call this%vw%update(k)
421 if (this%n_stats .eq. 11)
return
423 call col2(stats_work%x, this%u%x, n)
424 call this%uvw%update(k)
425 call col3(stats_work%x, this%stats_u%x, this%u%x, n)
426 call this%uuu%update(k)
427 call col3(stats_work%x, this%stats_v%x, this%v%x, n)
428 call this%vvv%update(k)
429 call col3(stats_work%x, this%stats_w%x, this%w%x, n)
430 call this%www%update(k)
431 call col3(stats_work%x, this%stats_u%x, this%v%x, n)
432 call this%uuv%update(k)
433 call col3(stats_work%x, this%stats_u%x, this%w%x, n)
434 call this%uuw%update(k)
435 call col3(stats_work%x, this%stats_v%x, this%u%x, n)
436 call this%uvv%update(k)
437 call col3(stats_work%x, this%stats_v%x, this%w%x, n)
438 call this%vvw%update(k)
439 call col3(stats_work%x, this%stats_w%x, this%u%x, n)
440 call this%uww%update(k)
441 call col3(stats_work%x, this%stats_w%x, this%v%x, n)
442 call this%vww%update(k)
444 call col3(stats_work%x, this%stats_u%x, this%stats_u%x, n)
445 call this%uuuu%update(k)
446 call col3(stats_work%x, this%stats_v%x, this%stats_v%x, n)
447 call this%vvvv%update(k)
448 call col3(stats_work%x, this%stats_w%x, this%stats_w%x, n)
449 call this%wwww%update(k)
451 call col3(stats_work%x, this%stats_p%x, this%p%x, n)
452 call this%ppp%update(k)
453 call col3(stats_work%x, this%stats_p%x, this%stats_p%x, n)
454 call this%pppp%update(k)
456 call col3(stats_work%x, this%p%x, this%u%x,n)
457 call this%pu%update(k)
458 call col3(stats_work%x, this%p%x, this%v%x,n)
459 call this%pv%update(k)
460 call col3(stats_work%x, this%p%x, this%w%x,n)
461 call this%pw%update(k)
465 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, this%u%x, this%coef)
466 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, this%v%x, this%coef)
467 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, this%w%x, this%coef)
470 call device_col3(stats_work%x_d, this%dudx%x_d, this%p%x_d, n)
471 call this%pdudx%update(k)
472 call device_col3(stats_work%x_d, this%dudy%x_d, this%p%x_d, n)
473 call this%pdudy%update(k)
474 call device_col3(stats_work%x_d, this%dudz%x_d, this%p%x_d, n)
475 call this%pdudz%update(k)
477 call device_col3(stats_work%x_d, this%dvdx%x_d, this%p%x_d, n)
478 call this%pdvdx%update(k)
479 call device_col3(stats_work%x_d, this%dvdy%x_d, this%p%x_d, n)
480 call this%pdvdy%update(k)
481 call device_col3(stats_work%x_d, this%dvdz%x_d, this%p%x_d, n)
482 call this%pdvdz%update(k)
484 call device_col3(stats_work%x_d, this%dwdx%x_d, this%p%x_d, n)
485 call this%pdwdx%update(k)
486 call device_col3(stats_work%x_d, this%dwdy%x_d, this%p%x_d, n)
487 call this%pdwdy%update(k)
488 call device_col3(stats_work%x_d, this%dwdz%x_d, this%p%x_d, n)
489 call this%pdwdz%update(k)
491 call device_col3(this%stats_work%x_d, this%dudx%x_d, this%dudx%x_d, n)
496 call this%e11%update(k)
497 call device_col3(this%stats_work%x_d, this%dvdx%x_d, this%dvdx%x_d, n)
502 call this%e22%update(k)
503 call device_col3(this%stats_work%x_d, this%dwdx%x_d, this%dwdx%x_d, n)
508 call this%e33%update(k)
509 call device_col3(this%stats_work%x_d, this%dudx%x_d, &
515 call this%e12%update(k)
516 call device_col3(this%stats_work%x_d, this%dudx%x_d, this%dwdx%x_d, n)
521 call this%e13%update(k)
522 call device_col3(this%stats_work%x_d, this%dvdx%x_d, this%dwdx%x_d, n)
527 call this%e23%update(k)
529 call col3(stats_work%x, this%dudx%x, this%p%x, n)
530 call this%pdudx%update(k)
531 call col3(stats_work%x, this%dudy%x, this%p%x, n)
532 call this%pdudy%update(k)
533 call col3(stats_work%x, this%dudz%x, this%p%x, n)
534 call this%pdudz%update(k)
536 call col3(stats_work%x, this%dvdx%x, this%p%x, n)
537 call this%pdvdx%update(k)
538 call col3(stats_work%x, this%dvdy%x, this%p%x, n)
539 call this%pdvdy%update(k)
540 call col3(stats_work%x, this%dvdz%x, this%p%x, n)
541 call this%pdvdz%update(k)
543 call col3(stats_work%x, this%dwdx%x, this%p%x, n)
544 call this%pdwdx%update(k)
545 call col3(stats_work%x, this%dwdy%x, this%p%x, n)
546 call this%pdwdy%update(k)
547 call col3(stats_work%x, this%dwdz%x, this%p%x, n)
548 call this%pdwdz%update(k)
550 call col3(this%stats_work%x, this%dudx%x, this%dudx%x, n)
551 call addcol3(this%stats_work%x, this%dudy%x, this%dudy%x, n)
552 call addcol3(this%stats_work%x, this%dudz%x, this%dudz%x, n)
553 call this%e11%update(k)
554 call col3(this%stats_work%x, this%dvdx%x, this%dvdx%x, n)
555 call addcol3(this%stats_work%x, this%dvdy%x, this%dvdy%x, n)
556 call addcol3(this%stats_work%x, this%dvdz%x, this%dvdz%x, n)
557 call this%e22%update(k)
558 call col3(this%stats_work%x, this%dwdx%x, this%dwdx%x, n)
559 call addcol3(this%stats_work%x, this%dwdy%x, this%dwdy%x, n)
560 call addcol3(this%stats_work%x, this%dwdz%x, this%dwdz%x, n)
561 call this%e33%update(k)
562 call col3(this%stats_work%x, this%dudx%x, this%dvdx%x, n)
563 call addcol3(this%stats_work%x, this%dudy%x, this%dvdy%x, n)
564 call addcol3(this%stats_work%x, this%dudz%x, this%dvdz%x, n)
565 call this%e12%update(k)
566 call col3(this%stats_work%x, this%dudx%x, this%dwdx%x, n)
567 call addcol3(this%stats_work%x, this%dudy%x, this%dwdy%x, n)
568 call addcol3(this%stats_work%x, this%dudz%x, this%dwdz%x, n)
569 call this%e13%update(k)
570 call col3(this%stats_work%x, this%dvdx%x, this%dwdx%x, n)
571 call addcol3(this%stats_work%x, this%dvdy%x, this%dwdy%x, n)
572 call addcol3(this%stats_work%x, this%dvdz%x, this%dwdz%x, n)
573 call this%e23%update(k)
724 if (this%n_stats .eq. 11)
return
726 n =
size(this%coef%B)
728 if (neko_bcknd_device .eq. 1)
then
729 call device_cfill(this%stats_work%x_d, 1.0_rp, n)
730 call device_invcol2(this%stats_work%x_d, this%coef%B_d, n)
731 call device_col2(this%pdudx%mf%x_d, this%stats_work%x_d, n)
732 call device_col2(this%pdudy%mf%x_d, this%stats_work%x_d, n)
733 call device_col2(this%pdudz%mf%x_d, this%stats_work%x_d, n)
734 call device_col2(this%pdvdx%mf%x_d, this%stats_work%x_d, n)
735 call device_col2(this%pdvdy%mf%x_d, this%stats_work%x_d, n)
736 call device_col2(this%pdvdz%mf%x_d, this%stats_work%x_d, n)
737 call device_col2(this%pdwdx%mf%x_d, this%stats_work%x_d, n)
738 call device_col2(this%pdwdy%mf%x_d, this%stats_work%x_d, n)
739 call device_col2(this%pdwdz%mf%x_d, this%stats_work%x_d, n)
741 call device_col2(this%stats_work%x_d, this%stats_work%x_d, n)
742 call device_col2(this%e11%mf%x_d, this%stats_work%x_d, n)
743 call device_col2(this%e22%mf%x_d, this%stats_work%x_d, n)
744 call device_col2(this%e33%mf%x_d, this%stats_work%x_d, n)
745 call device_col2(this%e12%mf%x_d, this%stats_work%x_d, n)
746 call device_col2(this%e13%mf%x_d, this%stats_work%x_d, n)
747 call device_col2(this%e23%mf%x_d, this%stats_work%x_d, n)
751 call invers2(this%stats_work%x, this%coef%B, n)
752 call col2(this%pdudx%mf%x, this%stats_work%x, n)
753 call col2(this%pdudy%mf%x, this%stats_work%x, n)
754 call col2(this%pdudz%mf%x, this%stats_work%x, n)
755 call col2(this%pdvdx%mf%x, this%stats_work%x, n)
756 call col2(this%pdvdy%mf%x, this%stats_work%x, n)
757 call col2(this%pdvdz%mf%x, this%stats_work%x, n)
758 call col2(this%pdwdx%mf%x, this%stats_work%x, n)
759 call col2(this%pdwdy%mf%x, this%stats_work%x, n)
760 call col2(this%pdwdz%mf%x, this%stats_work%x, n)
762 call col2(this%stats_work%x, this%stats_work%x, n)
763 call col2(this%e11%mf%x, this%stats_work%x, n)
764 call col2(this%e22%mf%x, this%stats_work%x, n)
765 call col2(this%e33%mf%x, this%stats_work%x, n)
766 call col2(this%e12%mf%x, this%stats_work%x, n)
767 call col2(this%e13%mf%x, this%stats_work%x, n)
768 call col2(this%e23%mf%x, this%stats_work%x, n)
777 pressure_skewness, skewness_tensor, mean_vel_grad, dissipation_tensor)
779 type(field_list_t),
intent(inout),
optional :: mean
780 type(field_list_t),
intent(inout),
optional :: reynolds
781 type(field_list_t),
intent(in),
optional :: pressure_skewness
782 type(field_list_t),
intent(in),
optional :: pressure_flatness
783 type(field_list_t),
intent(in),
optional :: skewness_tensor
784 type(field_list_t),
intent(inout),
optional :: mean_vel_grad
785 type(field_list_t),
intent(in),
optional :: dissipation_tensor
788 if (
present(mean))
then
789 n = mean%item_size(1)
790 call copy(mean%items(1)%ptr%x, this%u_mean%mf%x, n)
791 call copy(mean%items(2)%ptr%x, this%v_mean%mf%x, n)
792 call copy(mean%items(3)%ptr%x, this%w_mean%mf%x, n)
793 call copy(mean%items(4)%ptr%x, this%p_mean%mf%x, n)
796 if (
present(reynolds))
then
797 n = reynolds%item_size(1)
798 call copy(reynolds%items(1)%ptr%x, this%pp%mf%x, n)
799 call subcol3(reynolds%items(1)%ptr%x, this%p_mean%mf%x, &
802 call copy(reynolds%items(2)%ptr%x, this%uu%mf%x, n)
803 call subcol3(reynolds%items(2)%ptr%x, this%u_mean%mf%x, &
806 call copy(reynolds%items(3)%ptr%x, this%vv%mf%x, n)
807 call subcol3(reynolds%items(3)%ptr%x, this%v_mean%mf%x, &
810 call copy(reynolds%items(4)%ptr%x, this%ww%mf%x, n)
811 call subcol3(reynolds%items(4)%ptr%x, this%w_mean%mf%x, &
814 call copy(reynolds%items(5)%ptr%x, this%uv%mf%x, n)
815 call subcol3(reynolds%items(5)%ptr%x, this%u_mean%mf%x, &
818 call copy(reynolds%items(6)%ptr%x, this%uw%mf%x, n)
819 call subcol3(reynolds%items(6)%ptr%x, this%u_mean%mf%x, &
822 call copy(reynolds%items(7)%ptr%x, this%vw%mf%x, n)
823 call subcol3(reynolds%items(7)%ptr%x, this%v_mean%mf%x, &
826 if (
present(pressure_skewness))
then
828 call neko_warning(
'Presssure skewness stat not implemented'// &
829 ' in fluid_stats, process stats in python instead')
833 if (
present(pressure_flatness))
then
834 call neko_warning(
'Presssure flatness stat not implemented'// &
835 ' in fluid_stats, process stats in python instead')
839 if (
present(skewness_tensor))
then
840 call neko_warning(
'Skewness tensor stat not implemented'// &
841 ' in fluid_stats, process stats in python instead')
844 if (
present(mean_vel_grad))
then
846 n = mean_vel_grad%item_size(1)
847 if (neko_bcknd_device .eq. 1)
then
848 call device_memcpy(this%u_mean%mf%x, this%u_mean%mf%x_d, n, &
849 host_to_device, sync = .false.)
850 call device_memcpy(this%v_mean%mf%x, this%v_mean%mf%x_d, n, &
851 host_to_device, sync = .false.)
852 call device_memcpy(this%w_mean%mf%x, this%w_mean%mf%x_d, n, &
853 host_to_device, sync = .false.)
854 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, &
855 this%u_mean%mf%x, this%coef)
856 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, &
857 this%v_mean%mf%x, this%coef)
858 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, &
859 this%w_mean%mf%x, this%coef)
860 call device_memcpy(this%dudx%x, this%dudx%x_d, n, &
861 device_to_host, sync = .false.)
862 call device_memcpy(this%dvdx%x, this%dvdx%x_d, n, &
863 device_to_host, sync = .false.)
864 call device_memcpy(this%dwdx%x, this%dwdx%x_d, n, &
865 device_to_host, sync = .false.)
866 call device_memcpy(this%dudy%x, this%dudy%x_d, n, &
867 device_to_host, sync = .false.)
868 call device_memcpy(this%dvdy%x, this%dvdy%x_d, n, &
869 device_to_host, sync = .false.)
870 call device_memcpy(this%dwdy%x, this%dwdy%x_d, n, &
871 device_to_host, sync = .false.)
872 call device_memcpy(this%dudz%x, this%dudz%x_d, n, &
873 device_to_host, sync = .false.)
874 call device_memcpy(this%dvdz%x, this%dvdz%x_d, n, &
875 device_to_host, sync = .false.)
876 call device_memcpy(this%dwdz%x, this%dwdz%x_d, n, &
877 device_to_host, sync = .true.)
879 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, &
880 this%u_mean%mf%x, this%coef)
881 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, &
882 this%v_mean%mf%x, this%coef)
883 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, &
884 this%w_mean%mf%x, this%coef)
886 call invers2(this%stats_work%x, this%coef%B,n)
887 call col3(mean_vel_grad%items(1)%ptr%x, this%dudx%x, &
888 this%stats_work%x, n)
889 call col3(mean_vel_grad%items(2)%ptr%x, this%dudy%x, &
890 this%stats_work%x, n)
891 call col3(mean_vel_grad%items(3)%ptr%x, this%dudz%x, &
892 this%stats_work%x, n)
893 call col3(mean_vel_grad%items(4)%ptr%x, this%dvdx%x, &
894 this%stats_work%x, n)
895 call col3(mean_vel_grad%items(5)%ptr%x, this%dvdy%x, &
896 this%stats_work%x, n)
897 call col3(mean_vel_grad%items(6)%ptr%x, this%dvdz%x, &
898 this%stats_work%x, n)
899 call col3(mean_vel_grad%items(7)%ptr%x, this%dwdx%x, &
900 this%stats_work%x, n)
901 call col3(mean_vel_grad%items(8)%ptr%x, this%dwdy%x, &
902 this%stats_work%x, n)
903 call col3(mean_vel_grad%items(9)%ptr%x, this%dwdz%x, &
904 this%stats_work%x, n)
908 if (
present(dissipation_tensor))
then
909 call neko_warning(
'Dissipation tensor stat not implemented'// &
910 ' in fluid_stats, process stats in python instead')