129 integer :: n_stats = 40
154 type(
coef_t),
target,
optional :: coef
155 type(
mean_field_t),
target,
intent(inout) :: u_mf, v_mf, w_mf, p_mf
158 this%u_mean => u_mf%mf
159 this%v_mean => v_mf%mf
160 this%w_mean => w_mf%mf
161 this%p_mean => p_mf%mf
167 call this%stats_work%init(this%u%dof,
'stats')
168 call this%stats_u%init(this%u%dof,
'u temp')
169 call this%stats_v%init(this%u%dof,
'v temp')
170 call this%stats_w%init(this%u%dof,
'w temp')
171 call this%stats_p%init(this%u%dof,
'p temp')
173 call this%dudx%init(this%u%dof,
'dudx')
174 call this%dudy%init(this%u%dof,
'dudy')
175 call this%dudz%init(this%u%dof,
'dudz')
176 call this%dvdx%init(this%u%dof,
'dvdx')
177 call this%dvdy%init(this%u%dof,
'dvdy')
178 call this%dvdz%init(this%u%dof,
'dvdz')
179 call this%dwdx%init(this%u%dof,
'dwdx')
180 call this%dwdy%init(this%u%dof,
'dwdy')
181 call this%dwdz%init(this%u%dof,
'dwdz')
183 call this%uu%init(this%stats_u,
'uu')
184 call this%vv%init(this%stats_v,
'vv')
185 call this%ww%init(this%stats_w,
'ww')
186 call this%uv%init(this%stats_work,
'uv')
187 call this%uw%init(this%stats_work,
'uw')
188 call this%vw%init(this%stats_work,
'vw')
189 call this%uuu%init(this%stats_work,
'uuu')
190 call this%vvv%init(this%stats_work,
'vvv')
191 call this%www%init(this%stats_work,
'www')
192 call this%uuv%init(this%stats_work,
'uuv')
193 call this%uuw%init(this%stats_work,
'uuw')
194 call this%uvv%init(this%stats_work,
'uvv')
195 call this%uvw%init(this%stats_work,
'uvw')
196 call this%vvw%init(this%stats_work,
'vvw')
197 call this%uww%init(this%stats_work,
'uww')
198 call this%vww%init(this%stats_work,
'vww')
199 call this%uuuu%init(this%stats_work,
'uuuu')
200 call this%vvvv%init(this%stats_work,
'vvvv')
201 call this%wwww%init(this%stats_work,
'wwww')
203 call this%pp%init(this%stats_p,
'pp')
204 call this%ppp%init(this%stats_work,
'ppp')
205 call this%pppp%init(this%stats_work,
'pppp')
207 call this%pu%init(this%stats_work,
'pu')
208 call this%pv%init(this%stats_work,
'pv')
209 call this%pw%init(this%stats_work,
'pw')
211 call this%pdudx%init(this%stats_work,
'pdudx')
212 call this%pdudy%init(this%stats_work,
'pdudy')
213 call this%pdudz%init(this%stats_work,
'pdudz')
214 call this%pdvdx%init(this%stats_work,
'pdvdx')
215 call this%pdvdy%init(this%stats_work,
'pdvdy')
216 call this%pdvdz%init(this%stats_work,
'pdvdz')
217 call this%pdwdx%init(this%stats_work,
'pdwdx')
218 call this%pdwdy%init(this%stats_work,
'pdwdy')
219 call this%pdwdz%init(this%stats_work,
'pdwdz')
221 call this%e11%init(this%stats_work,
'e11')
222 call this%e22%init(this%stats_work,
'e22')
223 call this%e33%init(this%stats_work,
'e33')
224 call this%e12%init(this%stats_work,
'e12')
225 call this%e13%init(this%stats_work,
'e13')
226 call this%e23%init(this%stats_work,
'e23')
228 allocate(this%stat_fields%items(this%n_stats))
230 call this%stat_fields%assign_to_field(1, this%pp%mf)
231 call this%stat_fields%assign_to_field(2, this%uu%mf)
232 call this%stat_fields%assign_to_field(3, this%vv%mf)
233 call this%stat_fields%assign_to_field(4, this%ww%mf)
234 call this%stat_fields%assign_to_field(5, this%uv%mf)
235 call this%stat_fields%assign_to_field(6, this%uw%mf)
236 call this%stat_fields%assign_to_field(7, this%vw%mf)
237 call this%stat_fields%assign_to_field(8, this%uuu%mf)
238 call this%stat_fields%assign_to_field(9, this%vvv%mf)
239 call this%stat_fields%assign_to_field(10, this%www%mf)
240 call this%stat_fields%assign_to_field(11, this%uuv%mf)
241 call this%stat_fields%assign_to_field(12, this%uuw%mf)
242 call this%stat_fields%assign_to_field(13, this%uvv%mf)
243 call this%stat_fields%assign_to_field(14, this%uvw%mf)
244 call this%stat_fields%assign_to_field(15, this%vvw%mf)
245 call this%stat_fields%assign_to_field(16, this%uww%mf)
246 call this%stat_fields%assign_to_field(17, this%vww%mf)
247 call this%stat_fields%assign_to_field(18, this%uuuu%mf)
248 call this%stat_fields%assign_to_field(19, this%vvvv%mf)
249 call this%stat_fields%assign_to_field(20, this%wwww%mf)
250 call this%stat_fields%assign_to_field(21, this%ppp%mf)
251 call this%stat_fields%assign_to_field(22, this%pppp%mf)
252 call this%stat_fields%assign_to_field(23, this%pu%mf)
253 call this%stat_fields%assign_to_field(24, this%pv%mf)
254 call this%stat_fields%assign_to_field(25, this%pw%mf)
256 call this%stat_fields%assign_to_field(26, this%pdudx%mf)
257 call this%stat_fields%assign_to_field(27, this%pdudy%mf)
258 call this%stat_fields%assign_to_field(28, this%pdudz%mf)
259 call this%stat_fields%assign_to_field(29, this%pdvdx%mf)
260 call this%stat_fields%assign_to_field(30, this%pdvdy%mf)
261 call this%stat_fields%assign_to_field(31, this%pdvdz%mf)
262 call this%stat_fields%assign_to_field(32, this%pdwdx%mf)
263 call this%stat_fields%assign_to_field(33, this%pdwdy%mf)
264 call this%stat_fields%assign_to_field(34, this%pdwdz%mf)
265 call this%stat_fields%assign_to_field(35, this%e11%mf)
266 call this%stat_fields%assign_to_field(36, this%e22%mf)
267 call this%stat_fields%assign_to_field(37, this%e33%mf)
268 call this%stat_fields%assign_to_field(38, this%e12%mf)
269 call this%stat_fields%assign_to_field(39, this%e13%mf)
270 call this%stat_fields%assign_to_field(40, this%e23%mf)
278 real(kind=
rp),
intent(in) :: k
283 associate(stats_work => this%stats_work, stats_u => this%stats_u, &
284 stats_v => this%stats_v, stats_w => this%stats_w, &
285 stats_p => this%stats_p)
286 n = stats_work%dof%size()
291 call device_col3(stats_u%x_d, this%u%x_d, this%u%x_d,n)
292 call device_col3(stats_v%x_d, this%v%x_d, this%v%x_d,n)
293 call device_col3(stats_w%x_d, this%w%x_d, this%w%x_d,n)
294 call device_col3(stats_p%x_d, this%p%x_d, this%p%x_d,n)
296 call this%uu%update(k)
297 call this%vv%update(k)
298 call this%ww%update(k)
299 call this%pp%update(k)
301 call device_col3(stats_work%x_d, this%u%x_d, this%v%x_d,n)
302 call this%uv%update(k)
303 call device_col3(stats_work%x_d, this%u%x_d, this%w%x_d,n)
304 call this%uw%update(k)
305 call device_col3(stats_work%x_d, this%v%x_d, this%w%x_d,n)
306 call this%vw%update(k)
309 call this%uvw%update(k)
310 call device_col3(stats_work%x_d, this%stats_u%x_d, this%u%x_d,n)
311 call this%uuu%update(k)
312 call device_col3(stats_work%x_d, this%stats_v%x_d, this%v%x_d,n)
313 call this%vvv%update(k)
314 call device_col3(stats_work%x_d, this%stats_w%x_d, this%w%x_d,n)
315 call this%www%update(k)
316 call device_col3(stats_work%x_d, this%stats_u%x_d, this%v%x_d,n)
317 call this%uuv%update(k)
318 call device_col3(stats_work%x_d, this%stats_u%x_d, this%w%x_d,n)
319 call this%uuw%update(k)
320 call device_col3(stats_work%x_d, this%stats_v%x_d, this%u%x_d,n)
321 call this%uvv%update(k)
322 call device_col3(stats_work%x_d, this%stats_v%x_d, this%w%x_d,n)
323 call this%vvw%update(k)
324 call device_col3(stats_work%x_d, this%stats_w%x_d, this%u%x_d,n)
325 call this%uww%update(k)
326 call device_col3(stats_work%x_d, this%stats_w%x_d, this%v%x_d,n)
327 call this%vww%update(k)
329 call device_col3(stats_work%x_d, this%stats_u%x_d, this%stats_u%x_d,n)
330 call this%uuuu%update(k)
331 call device_col3(stats_work%x_d, this%stats_v%x_d, this%stats_v%x_d,n)
332 call this%vvvv%update(k)
333 call device_col3(stats_work%x_d, this%stats_w%x_d, this%stats_w%x_d,n)
334 call this%wwww%update(k)
336 call device_col3(stats_work%x_d, this%stats_p%x_d, this%p%x_d,n)
337 call this%ppp%update(k)
338 call device_col3(stats_work%x_d, this%stats_p%x_d, this%stats_p%x_d,n)
339 call this%pppp%update(k)
341 call device_col3(stats_work%x_d, this%p%x_d, this%u%x_d,n)
342 call this%pu%update(k)
343 call device_col3(stats_work%x_d, this%p%x_d, this%v%x_d,n)
344 call this%pv%update(k)
345 call device_col3(stats_work%x_d, this%p%x_d, this%w%x_d,n)
346 call this%pw%update(k)
350 call col3(stats_u%x, this%u%x, this%u%x,n)
351 call col3(stats_v%x, this%v%x, this%v%x,n)
352 call col3(stats_w%x, this%w%x, this%w%x,n)
353 call col3(stats_p%x, this%p%x, this%p%x,n)
355 call this%uu%update(k)
356 call this%vv%update(k)
357 call this%ww%update(k)
358 call this%pp%update(k)
360 call col3(stats_work%x, this%u%x, this%v%x,n)
361 call this%uv%update(k)
362 call col3(stats_work%x, this%u%x, this%w%x,n)
363 call this%uw%update(k)
364 call col3(stats_work%x, this%v%x, this%w%x,n)
365 call this%vw%update(k)
367 call col2(stats_work%x, this%u%x,n)
368 call this%uvw%update(k)
369 call col3(stats_work%x, this%stats_u%x, this%u%x,n)
370 call this%uuu%update(k)
371 call col3(stats_work%x, this%stats_v%x, this%v%x,n)
372 call this%vvv%update(k)
373 call col3(stats_work%x, this%stats_w%x, this%w%x,n)
374 call this%www%update(k)
375 call col3(stats_work%x, this%stats_u%x, this%v%x,n)
376 call this%uuv%update(k)
377 call col3(stats_work%x, this%stats_u%x, this%w%x,n)
378 call this%uuw%update(k)
379 call col3(stats_work%x, this%stats_v%x, this%u%x,n)
380 call this%uvv%update(k)
381 call col3(stats_work%x, this%stats_v%x, this%w%x,n)
382 call this%vvw%update(k)
383 call col3(stats_work%x, this%stats_w%x, this%u%x,n)
384 call this%uww%update(k)
385 call col3(stats_work%x, this%stats_w%x, this%v%x,n)
386 call this%vww%update(k)
388 call col3(stats_work%x, this%stats_u%x, this%stats_u%x,n)
389 call this%uuuu%update(k)
390 call col3(stats_work%x, this%stats_v%x, this%stats_v%x,n)
391 call this%vvvv%update(k)
392 call col3(stats_work%x, this%stats_w%x, this%stats_w%x,n)
393 call this%wwww%update(k)
395 call col3(stats_work%x, this%stats_p%x, this%p%x,n)
396 call this%ppp%update(k)
397 call col3(stats_work%x, this%stats_p%x, this%stats_p%x,n)
398 call this%pppp%update(k)
400 call col3(stats_work%x, this%p%x, this%u%x,n)
401 call this%pu%update(k)
402 call col3(stats_work%x, this%p%x, this%v%x,n)
403 call this%pv%update(k)
404 call col3(stats_work%x, this%p%x, this%w%x,n)
405 call this%pw%update(k)
409 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, this%u%x, this%coef)
410 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, this%v%x, this%coef)
411 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, this%w%x, this%coef)
414 call device_col3(stats_work%x_d, this%dudx%x_d, this%p%x_d,n)
415 call this%pdudx%update(k)
416 call device_col3(stats_work%x_d, this%dudy%x_d, this%p%x_d,n)
417 call this%pdudy%update(k)
418 call device_col3(stats_work%x_d, this%dudz%x_d, this%p%x_d,n)
419 call this%pdudz%update(k)
421 call device_col3(stats_work%x_d, this%dvdx%x_d, this%p%x_d,n)
422 call this%pdvdx%update(k)
423 call device_col3(stats_work%x_d, this%dvdy%x_d, this%p%x_d,n)
424 call this%pdvdy%update(k)
425 call device_col3(stats_work%x_d, this%dvdz%x_d, this%p%x_d,n)
426 call this%pdvdz%update(k)
428 call device_col3(stats_work%x_d, this%dwdx%x_d, this%p%x_d,n)
429 call this%pdwdx%update(k)
430 call device_col3(stats_work%x_d, this%dwdy%x_d, this%p%x_d,n)
431 call this%pdwdy%update(k)
432 call device_col3(stats_work%x_d, this%dwdz%x_d, this%p%x_d,n)
433 call this%pdwdz%update(k)
435 call device_col3(this%stats_work%x_d, this%dudx%x_d, this%dudx%x_d,n)
437 this%dudy%x_d, this%dudy%x_d,n)
439 this%dudz%x_d, this%dudz%x_d,n)
440 call this%e11%update(k)
442 this%dvdx%x_d, this%dvdx%x_d,n)
444 this%dvdy%x_d, this%dvdy%x_d,n)
446 this%dvdz%x_d, this%dvdz%x_d,n)
447 call this%e22%update(k)
448 call device_col3(this%stats_work%x_d, this%dwdx%x_d, this%dwdx%x_d,n)
450 this%dwdy%x_d, this%dwdy%x_d,n)
452 this%dwdz%x_d, this%dwdz%x_d,n)
453 call this%e33%update(k)
454 call device_col3(this%stats_work%x_d, this%dudx%x_d, this%dvdx%x_d,n)
456 this%dudy%x_d, this%dvdy%x_d,n)
458 this%dudz%x_d, this%dvdz%x_d,n)
459 call this%e12%update(k)
460 call device_col3(this%stats_work%x_d, this%dvdx%x_d, this%dwdx%x_d,n)
462 this%dvdy%x_d, this%dwdy%x_d,n)
464 this%dvdz%x_d, this%dwdz%x_d,n)
465 call this%e23%update(k)
469 call col3(stats_work%x, this%dudx%x, this%p%x,n)
470 call this%pdudx%update(k)
471 call col3(stats_work%x, this%dudy%x, this%p%x,n)
472 call this%pdudy%update(k)
473 call col3(stats_work%x, this%dudz%x, this%p%x,n)
474 call this%pdudz%update(k)
476 call col3(stats_work%x, this%dvdx%x, this%p%x,n)
477 call this%pdvdx%update(k)
478 call col3(stats_work%x, this%dvdy%x, this%p%x,n)
479 call this%pdvdy%update(k)
480 call col3(stats_work%x, this%dvdz%x, this%p%x,n)
481 call this%pdvdz%update(k)
483 call col3(stats_work%x, this%dwdx%x, this%p%x,n)
484 call this%pdwdx%update(k)
485 call col3(stats_work%x, this%dwdy%x, this%p%x,n)
486 call this%pdwdy%update(k)
487 call col3(stats_work%x, this%dwdz%x, this%p%x,n)
488 call this%pdwdz%update(k)
490 call col3(this%stats_work%x, this%dudx%x, this%dudx%x,n)
491 call addcol3(this%stats_work%x, this%dudy%x, this%dudy%x,n)
492 call addcol3(this%stats_work%x, this%dudz%x, this%dudz%x,n)
493 call this%e11%update(k)
494 call col3(this%stats_work%x, this%dvdx%x, this%dvdx%x,n)
495 call addcol3(this%stats_work%x, this%dvdy%x, this%dvdy%x,n)
496 call addcol3(this%stats_work%x, this%dvdz%x, this%dvdz%x,n)
497 call this%e22%update(k)
498 call col3(this%stats_work%x, this%dwdx%x, this%dwdx%x,n)
499 call addcol3(this%stats_work%x, this%dwdy%x, this%dwdy%x,n)
500 call addcol3(this%stats_work%x, this%dwdz%x, this%dwdz%x,n)
501 call this%e33%update(k)
502 call col3(this%stats_work%x, this%dudx%x, this%dvdx%x,n)
503 call addcol3(this%stats_work%x, this%dudy%x, this%dvdy%x,n)
504 call addcol3(this%stats_work%x, this%dudz%x, this%dvdz%x,n)
505 call this%e12%update(k)
506 call col3(this%stats_work%x, this%dvdx%x, this%dwdx%x,n)
507 call addcol3(this%stats_work%x, this%dvdy%x, this%dwdy%x,n)
508 call addcol3(this%stats_work%x, this%dvdz%x, this%dwdz%x,n)
509 call this%e23%update(k)
522 call this%stats_work%free()
523 call this%stats_u%free()
524 call this%stats_v%free()
525 call this%stats_w%free()
535 call this%dUdx%free()
536 call this%dUdy%free()
537 call this%dUdz%free()
538 call this%dVdx%free()
539 call this%dVdy%free()
540 call this%dVdz%free()
541 call this%dWdx%free()
542 call this%dWdy%free()
543 call this%dWdz%free()
557 call this%uuu%reset()
558 call this%vvv%reset()
559 call this%www%reset()
560 call this%uuv%reset()
561 call this%uuw%reset()
562 call this%uvv%reset()
563 call this%uvw%reset()
564 call this%vvw%reset()
565 call this%uww%reset()
566 call this%vww%reset()
567 call this%uuuu%reset()
568 call this%vvvv%reset()
569 call this%wwww%reset()
572 call this%ppp%reset()
573 call this%pppp%reset()
579 call this%pdudx%reset()
580 call this%pdudy%reset()
581 call this%pdudz%reset()
582 call this%pdvdx%reset()
583 call this%pdvdy%reset()
584 call this%pdvdz%reset()
585 call this%pdwdx%reset()
586 call this%pdwdy%reset()
587 call this%pdwdz%reset()
589 call this%e11%reset()
590 call this%e22%reset()
591 call this%e33%reset()
592 call this%e12%reset()
593 call this%e13%reset()
594 call this%e23%reset()
601 n =
size(this%coef%B)
602 if (neko_bcknd_device .eq. 1)
then
603 call device_cfill(this%stats_work%x_d, 1.0_rp,n)
604 call device_invcol2(this%stats_work%x_d, this%coef%B_d,n)
605 call device_col2(this%pdudx%mf%x_d, this%stats_work%x_d, n)
606 call device_col2(this%pdudy%mf%x_d, this%stats_work%x_d, n)
607 call device_col2(this%pdudz%mf%x_d, this%stats_work%x_d, n)
608 call device_col2(this%pdvdx%mf%x_d, this%stats_work%x_d, n)
609 call device_col2(this%pdvdy%mf%x_d, this%stats_work%x_d, n)
610 call device_col2(this%pdvdz%mf%x_d, this%stats_work%x_d, n)
611 call device_col2(this%pdwdx%mf%x_d, this%stats_work%x_d, n)
612 call device_col2(this%pdwdy%mf%x_d, this%stats_work%x_d, n)
613 call device_col2(this%pdwdz%mf%x_d, this%stats_work%x_d, n)
615 call device_col2(this%stats_work%x_d, this%stats_work%x_d,n)
616 call device_col2(this%e11%mf%x_d, this%stats_work%x_d, n)
617 call device_col2(this%e22%mf%x_d, this%stats_work%x_d, n)
618 call device_col2(this%e33%mf%x_d, this%stats_work%x_d, n)
619 call device_col2(this%e12%mf%x_d, this%stats_work%x_d, n)
620 call device_col2(this%e13%mf%x_d, this%stats_work%x_d, n)
621 call device_col2(this%e23%mf%x_d, this%stats_work%x_d, n)
625 call invers2(this%stats_work%x, this%coef%B,n)
626 call col2(this%pdudx%mf%x, this%stats_work%x, n)
627 call col2(this%pdudy%mf%x, this%stats_work%x, n)
628 call col2(this%pdudz%mf%x, this%stats_work%x, n)
629 call col2(this%pdvdx%mf%x, this%stats_work%x, n)
630 call col2(this%pdvdy%mf%x, this%stats_work%x, n)
631 call col2(this%pdvdz%mf%x, this%stats_work%x, n)
632 call col2(this%pdwdx%mf%x, this%stats_work%x, n)
633 call col2(this%pdwdy%mf%x, this%stats_work%x, n)
634 call col2(this%pdwdz%mf%x, this%stats_work%x, n)
636 call col2(this%stats_work%x, this%stats_work%x,n)
637 call col2(this%e11%mf%x, this%stats_work%x, n)
638 call col2(this%e22%mf%x, this%stats_work%x, n)
639 call col2(this%e33%mf%x, this%stats_work%x, n)
640 call col2(this%e12%mf%x, this%stats_work%x, n)
641 call col2(this%e13%mf%x, this%stats_work%x, n)
642 call col2(this%e23%mf%x, this%stats_work%x, n)
649 pressure_skewness, skewness_tensor, &
650 mean_vel_grad, dissipation_tensor)
652 type(field_list_t),
intent(inout),
optional :: mean
653 type(field_list_t),
intent(inout),
optional :: reynolds
654 type(field_list_t),
intent(inout),
optional :: pressure_skewness
655 type(field_list_t),
intent(inout),
optional :: pressure_flatness
656 type(field_list_t),
intent(inout),
optional :: skewness_tensor
657 type(field_list_t),
intent(inout),
optional :: mean_vel_grad
658 type(field_list_t),
intent(inout),
optional :: dissipation_tensor
661 if (
present(mean))
then
662 n = mean%item_size(1)
663 call copy(mean%items(1)%ptr%x, this%u_mean%x, n)
664 call copy(mean%items(2)%ptr%x, this%v_mean%x, n)
665 call copy(mean%items(3)%ptr%x, this%w_mean%x, n)
666 call copy(mean%items(4)%ptr%x, this%p_mean%x, n)
669 if (
present(reynolds))
then
670 n = reynolds%item_size(1)
671 call copy(reynolds%items(1)%ptr%x, this%pp%mf%x, n)
672 call subcol3(reynolds%items(1)%ptr%x, this%p_mean%x, this%p_mean%x, n)
674 call copy(reynolds%items(2)%ptr%x, this%uu%mf%x, n)
675 call subcol3(reynolds%items(2)%ptr%x, this%u_mean%x, this%u_mean%x, n)
677 call copy(reynolds%items(3)%ptr%x, this%vv%mf%x, n)
678 call subcol3(reynolds%items(3)%ptr%x, this%v_mean%x, this%v_mean%x,n)
680 call copy(reynolds%items(4)%ptr%x, this%ww%mf%x, n)
681 call subcol3(reynolds%items(4)%ptr%x, this%w_mean%x, this%w_mean%x,n)
683 call copy(reynolds%items(5)%ptr%x, this%uv%mf%x, n)
684 call subcol3(reynolds%items(5)%ptr%x, this%u_mean%x, this%v_mean%x, n)
686 call copy(reynolds%items(6)%ptr%x, this%uw%mf%x, n)
687 call subcol3(reynolds%items(6)%ptr%x, this%u_mean%x, this%w_mean%x, n)
689 call copy(reynolds%items(7)%ptr%x, this%vw%mf%x, n)
690 call subcol3(reynolds%items(7)%ptr%x, this%v_mean%x, this%w_mean%x, n)
692 if (
present(pressure_skewness))
then
694 call neko_warning(
'Presssure skewness stat not implemented in &
695 &fluid_stats yet, please help!')
699 if (
present(pressure_flatness))
then
700 call neko_warning(
'Presssure flatness stat not implemented yet, &
705 if (
present(skewness_tensor))
then
706 call neko_warning(
'Skewness tensor stat not implemented yet, &
710 if (
present(mean_vel_grad))
then
712 n = mean_vel_grad%item_size(1)
713 if (neko_bcknd_device .eq. 1)
then
714 call device_memcpy(this%u_mean%x, this%u_mean%x_d, n, &
715 host_to_device, sync = .false.)
716 call device_memcpy(this%v_mean%x, this%v_mean%x_d, n, &
717 host_to_device, sync = .false.)
718 call device_memcpy(this%w_mean%x, this%w_mean%x_d, n, &
719 host_to_device, sync = .false.)
720 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, &
721 this%u_mean%x, this%coef)
722 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, &
723 this%v_mean%x, this%coef)
724 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, &
725 this%w_mean%x, this%coef)
726 call device_memcpy(this%dudx%x, this%dudx%x_d, n, &
727 device_to_host, sync = .false.)
728 call device_memcpy(this%dvdx%x, this%dvdx%x_d, n, &
729 device_to_host, sync = .false.)
730 call device_memcpy(this%dwdx%x, this%dwdx%x_d, n, &
731 device_to_host, sync = .false.)
732 call device_memcpy(this%dudy%x, this%dudy%x_d, n, &
733 device_to_host, sync = .false.)
734 call device_memcpy(this%dvdy%x, this%dvdy%x_d, n, &
735 device_to_host, sync = .false.)
736 call device_memcpy(this%dwdy%x, this%dwdy%x_d, n, &
737 device_to_host, sync = .false.)
738 call device_memcpy(this%dudz%x, this%dudz%x_d, n, &
739 device_to_host, sync = .false.)
740 call device_memcpy(this%dvdz%x, this%dvdz%x_d, n, &
741 device_to_host, sync = .false.)
742 call device_memcpy(this%dwdz%x, this%dwdz%x_d, n, &
743 device_to_host, sync = .true.)
745 call opgrad(this%dudx%x, this%dudy%x, this%dudz%x, &
746 this%u_mean%x, this%coef)
747 call opgrad(this%dvdx%x, this%dvdy%x, this%dvdz%x, &
748 this%v_mean%x, this%coef)
749 call opgrad(this%dwdx%x, this%dwdy%x, this%dwdz%x, &
750 this%w_mean%x, this%coef)
752 call invers2(this%stats_work%x, this%coef%B,n)
753 call col3(mean_vel_grad%items(1)%ptr%x, this%dudx%x, &
754 this%stats_work%x, n)
755 call col3(mean_vel_grad%items(2)%ptr%x, this%dudy%x, &
756 this%stats_work%x, n)
757 call col3(mean_vel_grad%items(3)%ptr%x, this%dudz%x, &
758 this%stats_work%x, n)
759 call col3(mean_vel_grad%items(4)%ptr%x, this%dvdx%x, &
760 this%stats_work%x, n)
761 call col3(mean_vel_grad%items(5)%ptr%x, this%dvdy%x, &
762 this%stats_work%x, n)
763 call col3(mean_vel_grad%items(6)%ptr%x, this%dvdz%x, &
764 this%stats_work%x, n)
765 call col3(mean_vel_grad%items(7)%ptr%x, this%dwdx%x, &
766 this%stats_work%x, n)
767 call col3(mean_vel_grad%items(8)%ptr%x, this%dwdy%x, &
768 this%stats_work%x, n)
769 call col3(mean_vel_grad%items(9)%ptr%x, this%dwdz%x, &
770 this%stats_work%x, n)
774 if (
present(dissipation_tensor))
then
subroutine, public device_addcol3(a_d, b_d, c_d, n)
Returns .
subroutine, public device_col2(a_d, b_d, n)
Vector multiplication .
subroutine, public device_col3(a_d, b_d, c_d, n)
Vector multiplication with 3 vectors .
subroutine, public device_cfill(a_d, c, n)
Set all elements to a constant c .
subroutine, public device_invcol2(a_d, b_d, n)
Vector division .
Device abstraction, common interface for various accelerators.
Computes various statistics for the fluid fields. We use the Reynolds decomposition for a field u = ...
subroutine fluid_stats_init(this, coef, u_mf, v_mf, w_mf, p_mf)
Initialize the fields associated with fluid_stats.
subroutine fluid_stats_reset(this)
Initialize a mean flow field.
subroutine fluid_stats_make_strong_grad(this)
subroutine fluid_stats_update(this, k)
Updates all fields.
subroutine fluid_stats_free(this)
Deallocates a mean flow field.
subroutine fluid_stats_post_process(this, mean, reynolds, pressure_flatness, pressure_skewness, skewness_tensor, mean_vel_grad, dissipation_tensor)
subroutine, public invers2(a, b, n)
Compute inverted vector .
subroutine, public subcol3(a, b, c, n)
Returns .
subroutine, public addcol3(a, b, c, n)
Returns .
subroutine, public col2(a, b, n)
Vector multiplication .
subroutine, public copy(a, b, n)
Copy a vector .
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
subroutine, public opgrad(ux, uy, uz, u, coef, es, ee)
Compute the weak gradient of a scalar field, i.e. the gradient multiplied by the mass matrix.
Defines a statistical quantity.
subroutine, public neko_warning(warning_msg)
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
field_list_t, To be able to group fields together
Abstract type defining a statistical quantity.