169 type(
coef_t),
target,
optional :: coef
170 type(
field_t),
target,
intent(in) :: u, v, w, p
171 character(*),
intent(in),
optional :: set
181 if (
present(set))
then
182 this%stat_set = trim(set)
183 if (this%stat_set .eq.
'basic')
then
187 this%stat_set =
'full'
191 call this%stats_work%init(this%u%dof,
'stats')
192 call this%stats_u%init(this%u%dof,
'u temp')
193 call this%stats_v%init(this%u%dof,
'v temp')
194 call this%stats_w%init(this%u%dof,
'w temp')
195 call this%stats_p%init(this%u%dof,
'p temp')
196 call this%u_mean%init(this%u)
197 call this%v_mean%init(this%v)
198 call this%w_mean%init(this%w)
199 call this%p_mean%init(this%p)
200 call this%uu%init(this%stats_u,
'uu')
201 call this%vv%init(this%stats_v,
'vv')
202 call this%ww%init(this%stats_w,
'ww')
203 call this%uv%init(this%stats_work,
'uv')
204 call this%uw%init(this%stats_work,
'uw')
205 call this%vw%init(this%stats_work,
'vw')
206 call this%pp%init(this%stats_p,
'pp')
208 if (this%n_stats .eq. 44)
then
209 call this%dudx%init(this%u%dof,
'dudx')
210 call this%dudy%init(this%u%dof,
'dudy')
211 call this%dudz%init(this%u%dof,
'dudz')
212 call this%dvdx%init(this%u%dof,
'dvdx')
213 call this%dvdy%init(this%u%dof,
'dvdy')
214 call this%dvdz%init(this%u%dof,
'dvdz')
215 call this%dwdx%init(this%u%dof,
'dwdx')
216 call this%dwdy%init(this%u%dof,
'dwdy')
217 call this%dwdz%init(this%u%dof,
'dwdz')
219 call this%uuu%init(this%stats_work,
'uuu')
220 call this%vvv%init(this%stats_work,
'vvv')
221 call this%www%init(this%stats_work,
'www')
222 call this%uuv%init(this%stats_work,
'uuv')
223 call this%uuw%init(this%stats_work,
'uuw')
224 call this%uvv%init(this%stats_work,
'uvv')
225 call this%uvw%init(this%stats_work,
'uvw')
226 call this%vvw%init(this%stats_work,
'vvw')
227 call this%uww%init(this%stats_work,
'uww')
228 call this%vww%init(this%stats_work,
'vww')
229 call this%uuuu%init(this%stats_work,
'uuuu')
230 call this%vvvv%init(this%stats_work,
'vvvv')
231 call this%wwww%init(this%stats_work,
'wwww')
233 call this%ppp%init(this%stats_work,
'ppp')
234 call this%pppp%init(this%stats_work,
'pppp')
236 call this%pu%init(this%stats_work,
'pu')
237 call this%pv%init(this%stats_work,
'pv')
238 call this%pw%init(this%stats_work,
'pw')
240 call this%pdudx%init(this%stats_work,
'pdudx')
241 call this%pdudy%init(this%stats_work,
'pdudy')
242 call this%pdudz%init(this%stats_work,
'pdudz')
243 call this%pdvdx%init(this%stats_work,
'pdvdx')
244 call this%pdvdy%init(this%stats_work,
'pdvdy')
245 call this%pdvdz%init(this%stats_work,
'pdvdz')
246 call this%pdwdx%init(this%stats_work,
'pdwdx')
247 call this%pdwdy%init(this%stats_work,
'pdwdy')
248 call this%pdwdz%init(this%stats_work,
'pdwdz')
250 call this%e11%init(this%stats_work,
'e11')
251 call this%e22%init(this%stats_work,
'e22')
252 call this%e33%init(this%stats_work,
'e33')
253 call this%e12%init(this%stats_work,
'e12')
254 call this%e13%init(this%stats_work,
'e13')
255 call this%e23%init(this%stats_work,
'e23')
258 call this%stat_fields%init(this%n_stats)
260 call this%stat_fields%assign_to_field(1, this%p_mean%mf)
261 call this%stat_fields%assign_to_field(2, this%u_mean%mf)
262 call this%stat_fields%assign_to_field(3, this%v_mean%mf)
263 call this%stat_fields%assign_to_field(4, this%w_mean%mf)
264 call this%stat_fields%assign_to_field(5, this%pp%mf)
265 call this%stat_fields%assign_to_field(6, this%uu%mf)
266 call this%stat_fields%assign_to_field(7, this%vv%mf)
267 call this%stat_fields%assign_to_field(8, this%ww%mf)
268 call this%stat_fields%assign_to_field(9, this%uv%mf)
269 call this%stat_fields%assign_to_field(10, this%uw%mf)
270 call this%stat_fields%assign_to_field(11, this%vw%mf)
272 if (this%n_stats .eq. 44)
then
273 call this%stat_fields%assign_to_field(12, this%uuu%mf)
274 call this%stat_fields%assign_to_field(13, this%vvv%mf)
275 call this%stat_fields%assign_to_field(14, this%www%mf)
276 call this%stat_fields%assign_to_field(15, this%uuv%mf)
277 call this%stat_fields%assign_to_field(16, this%uuw%mf)
278 call this%stat_fields%assign_to_field(17, this%uvv%mf)
279 call this%stat_fields%assign_to_field(18, this%uvw%mf)
280 call this%stat_fields%assign_to_field(19, this%vvw%mf)
281 call this%stat_fields%assign_to_field(20, this%uww%mf)
282 call this%stat_fields%assign_to_field(21, this%vww%mf)
283 call this%stat_fields%assign_to_field(22, this%uuuu%mf)
284 call this%stat_fields%assign_to_field(23, this%vvvv%mf)
285 call this%stat_fields%assign_to_field(24, this%wwww%mf)
286 call this%stat_fields%assign_to_field(25, this%ppp%mf)
287 call this%stat_fields%assign_to_field(26, this%pppp%mf)
288 call this%stat_fields%assign_to_field(27, this%pu%mf)
289 call this%stat_fields%assign_to_field(28, this%pv%mf)
290 call this%stat_fields%assign_to_field(29, this%pw%mf)
292 call this%stat_fields%assign_to_field(30, this%pdudx%mf)
293 call this%stat_fields%assign_to_field(31, this%pdudy%mf)
294 call this%stat_fields%assign_to_field(32, this%pdudz%mf)
295 call this%stat_fields%assign_to_field(33, this%pdvdx%mf)
296 call this%stat_fields%assign_to_field(34, this%pdvdy%mf)
297 call this%stat_fields%assign_to_field(35, this%pdvdz%mf)
298 call this%stat_fields%assign_to_field(36, this%pdwdx%mf)
299 call this%stat_fields%assign_to_field(37, this%pdwdy%mf)
300 call this%stat_fields%assign_to_field(38, this%pdwdz%mf)
301 call this%stat_fields%assign_to_field(39, this%e11%mf)
302 call this%stat_fields%assign_to_field(40, this%e22%mf)
303 call this%stat_fields%assign_to_field(41, this%e33%mf)
304 call this%stat_fields%assign_to_field(42, this%e12%mf)
305 call this%stat_fields%assign_to_field(43, this%e13%mf)
306 call this%stat_fields%assign_to_field(44, this%e23%mf)
315 real(kind=
rp),
intent(in) :: k
318 associate(stats_work => this%stats_work, stats_u => this%stats_u, &
319 stats_v => this%stats_v, stats_w => this%stats_w, &
320 stats_p => this%stats_p)
321 n = stats_work%dof%size()
326 call this%u_mean%update(k)
327 call this%v_mean%update(k)
328 call this%w_mean%update(k)
329 call this%p_mean%update(k)
331 call device_col3(stats_u%x_d, this%u%x_d, this%u%x_d, n)
332 call device_col3(stats_v%x_d, this%v%x_d, this%v%x_d, n)
333 call device_col3(stats_w%x_d, this%w%x_d, this%w%x_d, n)
334 call device_col3(stats_p%x_d, this%p%x_d, this%p%x_d, n)
336 call this%uu%update(k)
337 call this%vv%update(k)
338 call this%ww%update(k)
339 call this%pp%update(k)
341 call device_col3(stats_work%x_d, this%u%x_d, this%v%x_d, n)
342 call this%uv%update(k)
343 call device_col3(stats_work%x_d, this%u%x_d, this%w%x_d, n)
344 call this%uw%update(k)
345 call device_col3(stats_work%x_d, this%v%x_d, this%w%x_d, n)
346 call this%vw%update(k)
347 if (this%n_stats .eq. 11)
return
349 call this%uvw%update(k)
350 call device_col3(stats_work%x_d, this%stats_u%x_d, this%u%x_d, n)
351 call this%uuu%update(k)
352 call device_col3(stats_work%x_d, this%stats_v%x_d, this%v%x_d, n)
353 call this%vvv%update(k)
354 call device_col3(stats_work%x_d, this%stats_w%x_d, this%w%x_d, n)
355 call this%www%update(k)
356 call device_col3(stats_work%x_d, this%stats_u%x_d, this%v%x_d, n)
357 call this%uuv%update(k)
358 call device_col3(stats_work%x_d, this%stats_u%x_d, this%w%x_d, n)
359 call this%uuw%update(k)
360 call device_col3(stats_work%x_d, this%stats_v%x_d, this%u%x_d, n)
361 call this%uvv%update(k)
362 call device_col3(stats_work%x_d, this%stats_v%x_d, this%w%x_d, n)
363 call this%vvw%update(k)
364 call device_col3(stats_work%x_d, this%stats_w%x_d, this%u%x_d, n)
365 call this%uww%update(k)
366 call device_col3(stats_work%x_d, this%stats_w%x_d, this%v%x_d, n)
367 call this%vww%update(k)
369 call device_col3(stats_work%x_d, this%stats_u%x_d, this%stats_u%x_d, n)
370 call this%uuuu%update(k)
371 call device_col3(stats_work%x_d, this%stats_v%x_d, this%stats_v%x_d, n)
372 call this%vvvv%update(k)
373 call device_col3(stats_work%x_d, this%stats_w%x_d, this%stats_w%x_d, n)
374 call this%wwww%update(k)
376 call device_col3(stats_work%x_d, this%stats_p%x_d, this%p%x_d, n)
377 call this%ppp%update(k)
378 call device_col3(stats_work%x_d, this%stats_p%x_d, this%stats_p%x_d, n)
379 call this%pppp%update(k)
381 call device_col3(stats_work%x_d, this%p%x_d, this%u%x_d, n)
382 call this%pu%update(k)
383 call device_col3(stats_work%x_d, this%p%x_d, this%v%x_d, n)
384 call this%pv%update(k)
385 call device_col3(stats_work%x_d, this%p%x_d, this%w%x_d, n)
386 call this%pw%update(k)
390 call this%u_mean%update(k)
391 call this%v_mean%update(k)
392 call this%w_mean%update(k)
393 call this%p_mean%update(k)
394 call col3(stats_u%x, this%u%x, this%u%x, n)
395 call col3(stats_v%x, this%v%x, this%v%x, n)
396 call col3(stats_w%x, this%w%x, this%w%x, n)
397 call col3(stats_p%x, this%p%x, this%p%x, n)
399 call this%uu%update(k)
400 call this%vv%update(k)
401 call this%ww%update(k)
402 call this%pp%update(k)
404 call col3(stats_work%x, this%u%x, this%v%x, n)
405 call this%uv%update(k)
406 call col3(stats_work%x, this%u%x, this%w%x, n)
407 call this%uw%update(k)
408 call col3(stats_work%x, this%v%x, this%w%x, n)
409 call this%vw%update(k)
411 if (this%n_stats .eq. 11)
return
413 call col2(stats_work%x, this%u%x, n)
414 call this%uvw%update(k)
415 call col3(stats_work%x, this%stats_u%x, this%u%x, n)
416 call this%uuu%update(k)
417 call col3(stats_work%x, this%stats_v%x, this%v%x, n)
418 call this%vvv%update(k)
419 call col3(stats_work%x, this%stats_w%x, this%w%x, n)
420 call this%www%update(k)
421 call col3(stats_work%x, this%stats_u%x, this%v%x, n)
422 call this%uuv%update(k)
423 call col3(stats_work%x, this%stats_u%x, this%w%x, n)
424 call this%uuw%update(k)
425 call col3(stats_work%x, this%stats_v%x, this%u%x, n)
426 call this%uvv%update(k)
427 call col3(stats_work%x, this%stats_v%x, this%w%x, n)
428 call this%vvw%update(k)
429 call col3(stats_work%x, this%stats_w%x, this%u%x, n)
430 call this%uww%update(k)
431 call col3(stats_work%x, this%stats_w%x, this%v%x, n)
432 call this%vww%update(k)
434 call col3(stats_work%x, this%stats_u%x, this%stats_u%x, n)
435 call this%uuuu%update(k)
436 call col3(stats_work%x, this%stats_v%x, this%stats_v%x, n)
437 call this%vvvv%update(k)
438 call col3(stats_work%x, this%stats_w%x, this%stats_w%x, n)
439 call this%wwww%update(k)
441 call col3(stats_work%x, this%stats_p%x, this%p%x, n)
442 call this%ppp%update(k)
443 call col3(stats_work%x, this%stats_p%x, this%stats_p%x, n)
444 call this%pppp%update(k)
446 call col3(stats_work%x, this%p%x, this%u%x,n)
447 call this%pu%update(k)
448 call col3(stats_work%x, this%p%x, this%v%x,n)
449 call this%pv%update(k)
450 call col3(stats_work%x, this%p%x, this%w%x,n)
451 call this%pw%update(k)
455 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, this%u%x, this%coef)
456 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, this%v%x, this%coef)
457 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, this%w%x, this%coef)
460 call device_col3(stats_work%x_d, this%dudx%x_d, this%p%x_d, n)
461 call this%pdudx%update(k)
462 call device_col3(stats_work%x_d, this%dudy%x_d, this%p%x_d, n)
463 call this%pdudy%update(k)
464 call device_col3(stats_work%x_d, this%dudz%x_d, this%p%x_d, n)
465 call this%pdudz%update(k)
467 call device_col3(stats_work%x_d, this%dvdx%x_d, this%p%x_d, n)
468 call this%pdvdx%update(k)
469 call device_col3(stats_work%x_d, this%dvdy%x_d, this%p%x_d, n)
470 call this%pdvdy%update(k)
471 call device_col3(stats_work%x_d, this%dvdz%x_d, this%p%x_d, n)
472 call this%pdvdz%update(k)
474 call device_col3(stats_work%x_d, this%dwdx%x_d, this%p%x_d, n)
475 call this%pdwdx%update(k)
476 call device_col3(stats_work%x_d, this%dwdy%x_d, this%p%x_d, n)
477 call this%pdwdy%update(k)
478 call device_col3(stats_work%x_d, this%dwdz%x_d, this%p%x_d, n)
479 call this%pdwdz%update(k)
481 call device_col3(this%stats_work%x_d, this%dudx%x_d, this%dudx%x_d, n)
486 call this%e11%update(k)
487 call device_col3(this%stats_work%x_d, this%dvdx%x_d, this%dvdx%x_d, n)
492 call this%e22%update(k)
493 call device_col3(this%stats_work%x_d, this%dwdx%x_d, this%dwdx%x_d, n)
498 call this%e33%update(k)
499 call device_col3(this%stats_work%x_d, this%dudx%x_d, &
505 call this%e12%update(k)
506 call device_col3(this%stats_work%x_d, this%dudx%x_d, this%dwdx%x_d, n)
511 call this%e13%update(k)
512 call device_col3(this%stats_work%x_d, this%dvdx%x_d, this%dwdx%x_d, n)
517 call this%e23%update(k)
519 call col3(stats_work%x, this%dudx%x, this%p%x, n)
520 call this%pdudx%update(k)
521 call col3(stats_work%x, this%dudy%x, this%p%x, n)
522 call this%pdudy%update(k)
523 call col3(stats_work%x, this%dudz%x, this%p%x, n)
524 call this%pdudz%update(k)
526 call col3(stats_work%x, this%dvdx%x, this%p%x, n)
527 call this%pdvdx%update(k)
528 call col3(stats_work%x, this%dvdy%x, this%p%x, n)
529 call this%pdvdy%update(k)
530 call col3(stats_work%x, this%dvdz%x, this%p%x, n)
531 call this%pdvdz%update(k)
533 call col3(stats_work%x, this%dwdx%x, this%p%x, n)
534 call this%pdwdx%update(k)
535 call col3(stats_work%x, this%dwdy%x, this%p%x, n)
536 call this%pdwdy%update(k)
537 call col3(stats_work%x, this%dwdz%x, this%p%x, n)
538 call this%pdwdz%update(k)
540 call col3(this%stats_work%x, this%dudx%x, this%dudx%x, n)
541 call addcol3(this%stats_work%x, this%dudy%x, this%dudy%x, n)
542 call addcol3(this%stats_work%x, this%dudz%x, this%dudz%x, n)
543 call this%e11%update(k)
544 call col3(this%stats_work%x, this%dvdx%x, this%dvdx%x, n)
545 call addcol3(this%stats_work%x, this%dvdy%x, this%dvdy%x, n)
546 call addcol3(this%stats_work%x, this%dvdz%x, this%dvdz%x, n)
547 call this%e22%update(k)
548 call col3(this%stats_work%x, this%dwdx%x, this%dwdx%x, n)
549 call addcol3(this%stats_work%x, this%dwdy%x, this%dwdy%x, n)
550 call addcol3(this%stats_work%x, this%dwdz%x, this%dwdz%x, n)
551 call this%e33%update(k)
552 call col3(this%stats_work%x, this%dudx%x, this%dvdx%x, n)
553 call addcol3(this%stats_work%x, this%dudy%x, this%dvdy%x, n)
554 call addcol3(this%stats_work%x, this%dudz%x, this%dvdz%x, n)
555 call this%e12%update(k)
556 call col3(this%stats_work%x, this%dudx%x, this%dwdx%x, n)
557 call addcol3(this%stats_work%x, this%dudy%x, this%dwdy%x, n)
558 call addcol3(this%stats_work%x, this%dudz%x, this%dwdz%x, n)
559 call this%e13%update(k)
560 call col3(this%stats_work%x, this%dvdx%x, this%dwdx%x, n)
561 call addcol3(this%stats_work%x, this%dvdy%x, this%dwdy%x, n)
562 call addcol3(this%stats_work%x, this%dvdz%x, this%dwdz%x, n)
563 call this%e23%update(k)
714 if (this%n_stats .eq. 11)
return
716 n =
size(this%coef%B)
718 if (neko_bcknd_device .eq. 1)
then
719 call device_cfill(this%stats_work%x_d, 1.0_rp, n)
720 call device_invcol2(this%stats_work%x_d, this%coef%B_d, n)
721 call device_col2(this%pdudx%mf%x_d, this%stats_work%x_d, n)
722 call device_col2(this%pdudy%mf%x_d, this%stats_work%x_d, n)
723 call device_col2(this%pdudz%mf%x_d, this%stats_work%x_d, n)
724 call device_col2(this%pdvdx%mf%x_d, this%stats_work%x_d, n)
725 call device_col2(this%pdvdy%mf%x_d, this%stats_work%x_d, n)
726 call device_col2(this%pdvdz%mf%x_d, this%stats_work%x_d, n)
727 call device_col2(this%pdwdx%mf%x_d, this%stats_work%x_d, n)
728 call device_col2(this%pdwdy%mf%x_d, this%stats_work%x_d, n)
729 call device_col2(this%pdwdz%mf%x_d, this%stats_work%x_d, n)
731 call device_col2(this%stats_work%x_d, this%stats_work%x_d, n)
732 call device_col2(this%e11%mf%x_d, this%stats_work%x_d, n)
733 call device_col2(this%e22%mf%x_d, this%stats_work%x_d, n)
734 call device_col2(this%e33%mf%x_d, this%stats_work%x_d, n)
735 call device_col2(this%e12%mf%x_d, this%stats_work%x_d, n)
736 call device_col2(this%e13%mf%x_d, this%stats_work%x_d, n)
737 call device_col2(this%e23%mf%x_d, this%stats_work%x_d, n)
741 call invers2(this%stats_work%x, this%coef%B, n)
742 call col2(this%pdudx%mf%x, this%stats_work%x, n)
743 call col2(this%pdudy%mf%x, this%stats_work%x, n)
744 call col2(this%pdudz%mf%x, this%stats_work%x, n)
745 call col2(this%pdvdx%mf%x, this%stats_work%x, n)
746 call col2(this%pdvdy%mf%x, this%stats_work%x, n)
747 call col2(this%pdvdz%mf%x, this%stats_work%x, n)
748 call col2(this%pdwdx%mf%x, this%stats_work%x, n)
749 call col2(this%pdwdy%mf%x, this%stats_work%x, n)
750 call col2(this%pdwdz%mf%x, this%stats_work%x, n)
752 call col2(this%stats_work%x, this%stats_work%x, n)
753 call col2(this%e11%mf%x, this%stats_work%x, n)
754 call col2(this%e22%mf%x, this%stats_work%x, n)
755 call col2(this%e33%mf%x, this%stats_work%x, n)
756 call col2(this%e12%mf%x, this%stats_work%x, n)
757 call col2(this%e13%mf%x, this%stats_work%x, n)
758 call col2(this%e23%mf%x, this%stats_work%x, n)
767 pressure_skewness, skewness_tensor, mean_vel_grad, dissipation_tensor)
769 type(field_list_t),
intent(inout),
optional :: mean
770 type(field_list_t),
intent(inout),
optional :: reynolds
771 type(field_list_t),
intent(in),
optional :: pressure_skewness
772 type(field_list_t),
intent(in),
optional :: pressure_flatness
773 type(field_list_t),
intent(in),
optional :: skewness_tensor
774 type(field_list_t),
intent(inout),
optional :: mean_vel_grad
775 type(field_list_t),
intent(in),
optional :: dissipation_tensor
778 if (
present(mean))
then
779 n = mean%item_size(1)
780 call copy(mean%items(1)%ptr%x, this%u_mean%mf%x, n)
781 call copy(mean%items(2)%ptr%x, this%v_mean%mf%x, n)
782 call copy(mean%items(3)%ptr%x, this%w_mean%mf%x, n)
783 call copy(mean%items(4)%ptr%x, this%p_mean%mf%x, n)
786 if (
present(reynolds))
then
787 n = reynolds%item_size(1)
788 call copy(reynolds%items(1)%ptr%x, this%pp%mf%x, n)
789 call subcol3(reynolds%items(1)%ptr%x, this%p_mean%mf%x, &
792 call copy(reynolds%items(2)%ptr%x, this%uu%mf%x, n)
793 call subcol3(reynolds%items(2)%ptr%x, this%u_mean%mf%x, &
796 call copy(reynolds%items(3)%ptr%x, this%vv%mf%x, n)
797 call subcol3(reynolds%items(3)%ptr%x, this%v_mean%mf%x, &
800 call copy(reynolds%items(4)%ptr%x, this%ww%mf%x, n)
801 call subcol3(reynolds%items(4)%ptr%x, this%w_mean%mf%x, &
804 call copy(reynolds%items(5)%ptr%x, this%uv%mf%x, n)
805 call subcol3(reynolds%items(5)%ptr%x, this%u_mean%mf%x, &
808 call copy(reynolds%items(6)%ptr%x, this%uw%mf%x, n)
809 call subcol3(reynolds%items(6)%ptr%x, this%u_mean%mf%x, &
812 call copy(reynolds%items(7)%ptr%x, this%vw%mf%x, n)
813 call subcol3(reynolds%items(7)%ptr%x, this%v_mean%mf%x, &
816 if (
present(pressure_skewness))
then
818 call neko_warning(
'Presssure skewness stat not implemented'// &
819 ' in fluid_stats, process stats in python instead')
823 if (
present(pressure_flatness))
then
824 call neko_warning(
'Presssure flatness stat not implemented'// &
825 ' in fluid_stats, process stats in python instead')
829 if (
present(skewness_tensor))
then
830 call neko_warning(
'Skewness tensor stat not implemented'// &
831 ' in fluid_stats, process stats in python instead')
834 if (
present(mean_vel_grad))
then
836 n = mean_vel_grad%item_size(1)
837 if (neko_bcknd_device .eq. 1)
then
838 call device_memcpy(this%u_mean%mf%x, this%u_mean%mf%x_d, n, &
839 host_to_device, sync = .false.)
840 call device_memcpy(this%v_mean%mf%x, this%v_mean%mf%x_d, n, &
841 host_to_device, sync = .false.)
842 call device_memcpy(this%w_mean%mf%x, this%w_mean%mf%x_d, n, &
843 host_to_device, sync = .false.)
844 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, &
845 this%u_mean%mf%x, this%coef)
846 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, &
847 this%v_mean%mf%x, this%coef)
848 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, &
849 this%w_mean%mf%x, this%coef)
850 call device_memcpy(this%dudx%x, this%dudx%x_d, n, &
851 device_to_host, sync = .false.)
852 call device_memcpy(this%dvdx%x, this%dvdx%x_d, n, &
853 device_to_host, sync = .false.)
854 call device_memcpy(this%dwdx%x, this%dwdx%x_d, n, &
855 device_to_host, sync = .false.)
856 call device_memcpy(this%dudy%x, this%dudy%x_d, n, &
857 device_to_host, sync = .false.)
858 call device_memcpy(this%dvdy%x, this%dvdy%x_d, n, &
859 device_to_host, sync = .false.)
860 call device_memcpy(this%dwdy%x, this%dwdy%x_d, n, &
861 device_to_host, sync = .false.)
862 call device_memcpy(this%dudz%x, this%dudz%x_d, n, &
863 device_to_host, sync = .false.)
864 call device_memcpy(this%dvdz%x, this%dvdz%x_d, n, &
865 device_to_host, sync = .false.)
866 call device_memcpy(this%dwdz%x, this%dwdz%x_d, n, &
867 device_to_host, sync = .true.)
869 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, &
870 this%u_mean%mf%x, this%coef)
871 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, &
872 this%v_mean%mf%x, this%coef)
873 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, &
874 this%w_mean%mf%x, this%coef)
876 call invers2(this%stats_work%x, this%coef%B,n)
877 call col3(mean_vel_grad%items(1)%ptr%x, this%dudx%x, &
878 this%stats_work%x, n)
879 call col3(mean_vel_grad%items(2)%ptr%x, this%dudy%x, &
880 this%stats_work%x, n)
881 call col3(mean_vel_grad%items(3)%ptr%x, this%dudz%x, &
882 this%stats_work%x, n)
883 call col3(mean_vel_grad%items(4)%ptr%x, this%dvdx%x, &
884 this%stats_work%x, n)
885 call col3(mean_vel_grad%items(5)%ptr%x, this%dvdy%x, &
886 this%stats_work%x, n)
887 call col3(mean_vel_grad%items(6)%ptr%x, this%dvdz%x, &
888 this%stats_work%x, n)
889 call col3(mean_vel_grad%items(7)%ptr%x, this%dwdx%x, &
890 this%stats_work%x, n)
891 call col3(mean_vel_grad%items(8)%ptr%x, this%dwdy%x, &
892 this%stats_work%x, n)
893 call col3(mean_vel_grad%items(9)%ptr%x, this%dwdz%x, &
894 this%stats_work%x, n)
898 if (
present(dissipation_tensor))
then
899 call neko_warning(
'Dissipation tensor stat not implemented'// &
900 ' in fluid_stats, process stats in python instead')