33 $
'module ['//trim(pstat_name)//
'] already registered')
42 $
'parent module ['//
'FRAME'//
'] not registered')
47 $
'Post processing for 3D statistics')
53 $
'PSTAT_TOT',
'Pstat total time',.false.)
54 lpmid = pstat_tmr_tot_id
57 $
'PSTAT_INI',
'Pstat initialisation time',.true.)
60 $
'PSTAT_AVG',
'Pstat averaging time',.true.)
63 $
'PSTAT_NEW',
'Pstat new field calculation time',.true.)
66 $
'PSTAT_INT',
'Pstat interpolation time',.true.)
69 call rprm_sec_reg(pstat_sec_id,pstat_id,
'_'//adjustl(pstat_name),
70 $
'Runtime paramere section for pstat module')
74 call rprm_rp_reg(pstat_nfile_id,pstat_sec_id,
'STS_NFILE',
75 $
'Number of stat files',rpar_int,1,0.0,.false.,
' ')
76 call rprm_rp_reg(pstat_stime_id,pstat_sec_id,
'STS_STIME',
77 $
'Statistics starting time',rpar_real,1,0.0,.false.,
' ')
78 call rprm_rp_reg(pstat_nstep_id,pstat_sec_id,
'STS_NSTEP',
79 $
'Number of steps between averaging (in sts file)',
80 $ rpar_int,10,0.0,.false.,
' ')
86 ltim = dnekclock() - ltim
107 integer tmp_swfield(pstat_svar)
113 if (pstat_ifinit)
then
115 $
'module ['//trim(pstat_name)//
'] already initiaised.')
123 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_nfile_id,rpar_int)
124 pstat_nfile = abs(itmp)
125 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_stime_id,rpar_real)
127 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_nstep_id,rpar_int)
128 pstat_nstep = abs(itmp)
135 tmp_swfield(il) = il+1
140 tmp_swfield(il) = il-1
145 call icopy(pstat_swfield,tmp_swfield,pstat_svar)
151 ltim = dnekclock() - ltim
191 call mntr_log(pstat_id,lp_inf,
'Field averaging')
193 ltim = dnekclock() - ltim
198 call mntr_log(pstat_id,lp_inf,
'New field calculation')
200 ltim = dnekclock() - ltim
205 call mntr_log(pstat_id,lp_inf,
'Point interpolation')
207 ltim = dnekclock() - ltim
235 integer nps1,nps0,npsr
249 bname = trim(adjustl(session))
271 call rzero(pstat_ruavg,lx1**ldim*lelt*pstat_svar)
272 nvec = lx1*ly1*lz1*nelt
277 do jl=1, pstat_finset
283 write(fins,
'(i2.2)') jl
284 prefix =
's'//trim(fins)
287 do il = 1,pstat_nfile
291 write(str,
'(i5.5)') il
292 fname = trim(fname)//trim(str)
298 fname =
'DATA/'//trim(fname)
304 dtime = timer - ltime
307 call add2s2(pstat_ruavg(1,1,pstat_swfield(1,jl)),
309 call add2s2(pstat_ruavg(1,1,pstat_swfield(2,jl)),
311 call add2s2(pstat_ruavg(1,1,pstat_swfield(3,jl)),
313 call add2s2(pstat_ruavg(1,1,pstat_swfield(4,jl)),
318 istepr = istepr + istpr
326 if (ltime.ne.pstat_stime)
then
327 rtmp = 1.0/(ltime-pstat_stime)
332 call cmult(pstat_ruavg(1,1,pstat_swfield(il,jl)),rtmp,nvec)
336 write(fins,
'(i2.2)') jl
337 prefix =
't'//trim(fins)
338 call outpost(pstat_ruavg(1,1,pstat_swfield(1,jl)),
339 $ pstat_ruavg(1,1,pstat_swfield(2,jl)),
340 $ pstat_ruavg(1,1,pstat_swfield(3,jl)),pr,
341 $ pstat_ruavg(1,1,pstat_swfield(4,jl)),prefix)
346 pstat_istepr = istepr
372 call rzero(pstat_runew,lx1**ldim*lelt*pstat_dvar)
373 call rzero(pstat_rutmp,lx1**ldim*lelt*pstat_tvar)
374 nvec = lx1*ly1*lz1*nelt
383 call col3(pstat_rutmp(1,1,il),pstat_ruavg(1,1,il),
384 $ pstat_ruavg(1,1,il),nvec)
385 call sub2(pstat_ruavg(1,1,4+il),pstat_rutmp(1,1,il),nvec)
389 call subcol3(pstat_ruavg(1,1,9),pstat_ruavg(1,1,1),
390 $ pstat_ruavg(1,1,2),nvec)
391 call subcol3(pstat_ruavg(1,1,10),pstat_ruavg(1,1,2),
392 $ pstat_ruavg(1,1,3),nvec)
393 call subcol3(pstat_ruavg(1,1,11),pstat_ruavg(1,1,1),
394 $ pstat_ruavg(1,1,3),nvec)
397 call col3(pstat_rutmp(1,1,5),pstat_rutmp(1,1,4),
398 $ pstat_ruavg(1,1,4),nvec)
399 call sub2(pstat_ruavg(1,1,27),pstat_rutmp(1,1,5),nvec)
401 call admcol3(pstat_ruavg(1,1,27),pstat_ruavg(1,1,4),
402 $ pstat_ruavg(1,1,8),rtmp,nvec)
406 call admcol3(pstat_ruavg(1,1,38),pstat_ruavg(1,1,4),
407 $ pstat_ruavg(1,1,27),rtmp,nvec)
409 call admcol3(pstat_ruavg(1,1,38),pstat_ruavg(1,1,8),
410 $ pstat_rutmp(1,1,4),rtmp,nvec)
411 call subcol3(pstat_ruavg(1,1,38),pstat_ruavg(1,1,4),
412 $ pstat_rutmp(1,1,5),nvec)
419 call admcol3(pstat_ruavg(1,1,23+il),pstat_ruavg(1,1,il),
420 $ pstat_ruavg(1,1,4+il),rtmp,nvec)
421 call subcol3(pstat_ruavg(1,1,23+il),pstat_ruavg(1,1,il),
422 $ pstat_rutmp(1,1,il),nvec)
427 call admcol3(pstat_ruavg(1,1,28),pstat_ruavg(1,1,1),
428 $ pstat_ruavg(1,1,9),rtmp,nvec)
429 call subcol3(pstat_ruavg(1,1,28),pstat_ruavg(1,1,2),
430 $ pstat_ruavg(1,1,5),nvec)
431 call subcol3(pstat_ruavg(1,1,28),pstat_ruavg(1,1,2),
432 $ pstat_rutmp(1,1,1),nvec)
433 call admcol3(pstat_ruavg(1,1,29),pstat_ruavg(1,1,1),
434 $ pstat_ruavg(1,1,11),rtmp,nvec)
435 call subcol3(pstat_ruavg(1,1,29),pstat_ruavg(1,1,3),
436 $ pstat_ruavg(1,1,5),nvec)
437 call subcol3(pstat_ruavg(1,1,29),pstat_ruavg(1,1,3),
438 $ pstat_rutmp(1,1,1),nvec)
439 call admcol3(pstat_ruavg(1,1,30),pstat_ruavg(1,1,2),
440 $ pstat_ruavg(1,1,9),rtmp,nvec)
441 call subcol3(pstat_ruavg(1,1,30),pstat_ruavg(1,1,1),
442 $ pstat_ruavg(1,1,6),nvec)
443 call subcol3(pstat_ruavg(1,1,30),pstat_ruavg(1,1,1),
444 $ pstat_rutmp(1,1,2),nvec)
445 call admcol3(pstat_ruavg(1,1,31),pstat_ruavg(1,1,2),
446 $ pstat_ruavg(1,1,10),rtmp,nvec)
447 call subcol3(pstat_ruavg(1,1,31),pstat_ruavg(1,1,3),
448 $ pstat_ruavg(1,1,6),nvec)
449 call subcol3(pstat_ruavg(1,1,31),pstat_ruavg(1,1,3),
450 $ pstat_rutmp(1,1,2),nvec)
451 call admcol3(pstat_ruavg(1,1,32),pstat_ruavg(1,1,3),
452 $ pstat_ruavg(1,1,11),rtmp,nvec)
453 call subcol3(pstat_ruavg(1,1,32),pstat_ruavg(1,1,1),
454 $ pstat_ruavg(1,1,7),nvec)
455 call subcol3(pstat_ruavg(1,1,32),pstat_ruavg(1,1,1),
456 $ pstat_rutmp(1,1,3),nvec)
457 call admcol3(pstat_ruavg(1,1,33),pstat_ruavg(1,1,3),
458 $ pstat_ruavg(1,1,10),rtmp,nvec)
459 call subcol3(pstat_ruavg(1,1,33),pstat_ruavg(1,1,2),
460 $ pstat_ruavg(1,1,7),nvec)
461 call subcol3(pstat_ruavg(1,1,33),pstat_ruavg(1,1,2),
462 $ pstat_rutmp(1,1,3),nvec)
463 call subcol3(pstat_ruavg(1,1,34),pstat_ruavg(1,1,1),
464 $ pstat_ruavg(1,1,10),nvec)
465 call subcol3(pstat_ruavg(1,1,34),pstat_ruavg(1,1,2),
466 $ pstat_ruavg(1,1,11),nvec)
467 call subcol3(pstat_ruavg(1,1,34),pstat_ruavg(1,1,3),
468 $ pstat_ruavg(1,1,9),nvec)
469 call subcol4(pstat_ruavg(1,1,34),pstat_ruavg(1,1,1),
470 $ pstat_ruavg(1,1,2),pstat_ruavg(1,1,3),nvec)
478 call gradm1(pstat_runew(1,1,itmp+1),pstat_runew(1,1,itmp+2),
479 $ pstat_runew(1,1,itmp+3),pstat_ruavg(1,1,il))
489 call subcol3(pstat_ruavg(1,1,38+il),
490 $ pstat_runew(1,1,itmp+jl),pstat_runew(1,1,itmp+jl),
493 call cmult(pstat_ruavg(1,1,38+il),rtmp,nvec)
497 call subcol3(pstat_ruavg(1,1,42),pstat_runew(1,1,jl),
498 $ pstat_runew(1,1,3+jl),nvec)
500 call cmult(pstat_ruavg(1,1,42),rtmp,nvec)
502 call subcol3(pstat_ruavg(1,1,43),pstat_runew(1,1,jl),
503 $ pstat_runew(1,1,6+jl),nvec)
505 call cmult(pstat_ruavg(1,1,43),rtmp,nvec)
507 call subcol3(pstat_ruavg(1,1,44),pstat_runew(1,1,3+jl),
508 $ pstat_runew(1,1,6+jl),nvec)
510 call cmult(pstat_ruavg(1,1,44),rtmp,nvec)
521 call gradm1(pstat_rutmp(1,1,itmp+2),pstat_rutmp(1,1,itmp+3),
522 $ pstat_rutmp(1,1,itmp+4),pstat_ruavg(1,1,4+il))
524 call gradm1(pstat_rutmp(1,1,itmp+2),pstat_rutmp(1,1,itmp+3),
525 $ pstat_rutmp(1,1,itmp+4),pstat_ruavg(1,1,8+il))
532 call vdot3 (pstat_runew(1,1,9+il),
533 $ pstat_ruavg(1,1,1),pstat_ruavg(1,1,2),pstat_ruavg(1,1,3),
534 $ pstat_rutmp(1,1,itmp+2),pstat_rutmp(1,1,itmp+3),
535 $ pstat_rutmp(1,1,itmp+4),nvec)
539 call gradm1(pstat_rutmp(1,1,1),pstat_rutmp(1,1,20),
540 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,2))
541 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,2),
542 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,3))
543 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
544 $ pstat_rutmp(1,1,3),pstat_rutmp(1,1,4))
545 call gradm1(pstat_rutmp(1,1,4),pstat_rutmp(1,1,20),
546 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,5))
547 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,5),
548 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,6))
549 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
550 $ pstat_rutmp(1,1,6),pstat_rutmp(1,1,7))
551 call gradm1(pstat_rutmp(1,1,7),pstat_rutmp(1,1,20),
552 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,8))
553 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,8),
554 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,9))
555 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
556 $ pstat_rutmp(1,1,9),pstat_rutmp(1,1,10))
557 call gradm1(pstat_rutmp(1,1,10),pstat_rutmp(1,1,20),
558 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,11))
559 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,11),
560 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,12))
561 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
562 $ pstat_rutmp(1,1,12),pstat_rutmp(1,1,13))
563 call gradm1(pstat_rutmp(1,1,13),pstat_rutmp(1,1,20),
564 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,14))
565 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,14),
566 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,15))
567 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
568 $ pstat_rutmp(1,1,15),pstat_rutmp(1,1,16))
569 call gradm1(pstat_rutmp(1,1,16),pstat_rutmp(1,1,20),
570 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,17))
571 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,17),
572 $ pstat_rutmp(1,1,21),pstat_rutmp(1,1,18))
573 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
574 $ pstat_rutmp(1,1,18),pstat_rutmp(1,1,19))
581 call add4(pstat_runew(1,1,15+il),pstat_rutmp(1,1,itmp+1),
582 $ pstat_rutmp(1,1,itmp+2),pstat_rutmp(1,1,itmp+3),nvec)
583 call cmult(pstat_runew(1,1,15+il),rtmp,nvec)
587 call gradm1(pstat_rutmp(1,1,1),pstat_rutmp(1,1,20),
588 $ pstat_rutmp(1,1,21),pstat_ruavg(1,1,24))
589 call gradm1(pstat_rutmp(1,1,4),pstat_rutmp(1,1,11),
590 $ pstat_rutmp(1,1,20),pstat_ruavg(1,1,30))
591 call gradm1(pstat_rutmp(1,1,7),pstat_rutmp(1,1,20),
592 $ pstat_rutmp(1,1,15),pstat_ruavg(1,1,32))
593 call gradm1(pstat_rutmp(1,1,10),pstat_rutmp(1,1,2),
594 $ pstat_rutmp(1,1,20),pstat_ruavg(1,1,28))
595 call gradm1(pstat_rutmp(1,1,13),pstat_rutmp(1,1,20),
596 $ pstat_rutmp(1,1,3),pstat_ruavg(1,1,29))
597 call gradm1(pstat_rutmp(1,1,16),pstat_rutmp(1,1,14),
598 $ pstat_rutmp(1,1,12),pstat_ruavg(1,1,34))
599 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,5),
600 $ pstat_rutmp(1,1,21),pstat_ruavg(1,1,25))
601 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,8),
602 $ pstat_rutmp(1,1,18),pstat_ruavg(1,1,33))
603 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,17),
604 $ pstat_rutmp(1,1,6),pstat_ruavg(1,1,31))
605 call gradm1(pstat_rutmp(1,1,20),pstat_rutmp(1,1,21),
606 $ pstat_rutmp(1,1,9),pstat_ruavg(1,1,26))
612 call add4(pstat_runew(1,1,21+il),pstat_rutmp(1,1,itmp+1),
613 $ pstat_rutmp(1,1,itmp+2),pstat_rutmp(1,1,itmp+3),nvec)
614 call chsign(pstat_runew(1,1,21+il),nvec)
623 call col3(pstat_rutmp(1,1,12+il),pstat_ruavg(1,1,4),
624 $ pstat_runew(1,1,il),nvec)
625 call sub3(pstat_rutmp(1,1,il),pstat_ruavg(1,1,14+il),
626 $ pstat_rutmp(1,1,12+il),nvec)
634 call copy(pstat_ruavg(1,1,17+il),pstat_rutmp(1,1,itmp+1),nvec)
635 call cmult(pstat_ruavg(1,1,17+il),rtmp,nvec)
640 call add3(pstat_ruavg(1,1,21),pstat_rutmp(1,1,2),
641 $ pstat_rutmp(1,1,4),nvec)
642 call cmult(pstat_ruavg(1,1,21),rtmp,nvec)
643 call add3(pstat_ruavg(1,1,22),pstat_rutmp(1,1,3),
644 $ pstat_rutmp(1,1,7),nvec)
645 call cmult(pstat_ruavg(1,1,22),rtmp,nvec)
646 call add3(pstat_ruavg(1,1,23),pstat_rutmp(1,1,6),
647 $ pstat_rutmp(1,1,8),nvec)
648 call cmult(pstat_ruavg(1,1,23),rtmp,nvec)
655 call gradm1(pstat_rutmp(1,1,itmp+1),pstat_rutmp(1,1,itmp+2),
656 $ pstat_rutmp(1,1,itmp+3),pstat_ruavg(1,1,11+il))
660 call gradm1(pstat_rutmp(1,1,10),pstat_rutmp(1,1,11),
661 $ pstat_rutmp(1,1,12),pstat_ruavg(1,1,4))
664 call copy(pstat_pgrad(1,1,il),pstat_rutmp(1,1,9+il),nvec)
670 call sub2(pstat_rutmp(1,1,il),pstat_rutmp(1,1,12+il),nvec)
675 call subcol3(pstat_rutmp(1,1,itmp+jl),pstat_ruavg(1,1,il),
676 $ pstat_rutmp(1,1,9+jl),nvec)
685 call copy(pstat_ruavg(1,1,11+il),pstat_rutmp(1,1,itmp+1),nvec)
686 call cmult(pstat_ruavg(1,1,11+il),rtmp,nvec)
690 call add3(pstat_ruavg(1,1,15),pstat_rutmp(1,1,2),
691 $ pstat_rutmp(1,1,4),nvec)
692 call cmult(pstat_ruavg(1,1,15),rtmp,nvec)
693 call add3(pstat_ruavg(1,1,16),pstat_rutmp(1,1,3),
694 $ pstat_rutmp(1,1,7),nvec)
695 call cmult(pstat_ruavg(1,1,16),rtmp,nvec)
696 call add3(pstat_ruavg(1,1,17),pstat_rutmp(1,1,6),
697 $ pstat_rutmp(1,1,8),nvec)
698 call cmult(pstat_ruavg(1,1,17),rtmp,nvec)
702 call vdot3(pstat_rutmp(1,1,1),
703 $ pstat_ruavg(1,1,5),pstat_ruavg(1,1,9),pstat_ruavg(1,1,11),
704 $ pstat_runew(1,1,1),pstat_runew(1,1,2),pstat_runew(1,1,3),
706 call cmult(pstat_rutmp(1,1,1),rtmp,nvec)
707 call vdot3(pstat_rutmp(1,1,2),
708 $ pstat_ruavg(1,1,9),pstat_ruavg(1,1,6),pstat_ruavg(1,1,10),
709 $ pstat_runew(1,1,4),pstat_runew(1,1,5),pstat_runew(1,1,6),
711 call cmult(pstat_rutmp(1,1,2),rtmp,nvec)
712 call vdot3(pstat_rutmp(1,1,3),
713 $ pstat_ruavg(1,1,11),pstat_ruavg(1,1,10),pstat_ruavg(1,1,7),
714 $ pstat_runew(1,1,7),pstat_runew(1,1,8),pstat_runew(1,1,9),
716 call cmult(pstat_rutmp(1,1,3),rtmp,nvec)
717 call vdot3(pstat_rutmp(1,1,4),
718 $ pstat_ruavg(1,1,9),pstat_ruavg(1,1,6),pstat_ruavg(1,1,10),
719 $ pstat_runew(1,1,1),pstat_runew(1,1,2),pstat_runew(1,1,3),
721 call vdot3(pstat_rutmp(1,1,5),
722 $ pstat_ruavg(1,1,5),pstat_ruavg(1,1,9),pstat_ruavg(1,1,11),
723 $ pstat_runew(1,1,4),pstat_runew(1,1,5),pstat_runew(1,1,6),
725 call add2(pstat_rutmp(1,1,4),pstat_rutmp(1,1,5),nvec)
726 call chsign(pstat_rutmp(1,1,4),nvec)
727 call vdot3(pstat_rutmp(1,1,5),
728 $ pstat_ruavg(1,1,11),pstat_ruavg(1,1,10),pstat_ruavg(1,1,7),
729 $ pstat_runew(1,1,1),pstat_runew(1,1,2),pstat_runew(1,1,3),
731 call vdot3(pstat_rutmp(1,1,6),
732 $ pstat_ruavg(1,1,5),pstat_ruavg(1,1,9),pstat_ruavg(1,1,11),
733 $ pstat_runew(1,1,7),pstat_runew(1,1,8),pstat_runew(1,1,9),
735 call add2(pstat_rutmp(1,1,5),pstat_rutmp(1,1,6),nvec)
736 call chsign(pstat_rutmp(1,1,5),nvec)
737 call vdot3(pstat_rutmp(1,1,6),
738 $ pstat_ruavg(1,1,11),pstat_ruavg(1,1,10),pstat_ruavg(1,1,7),
739 $ pstat_runew(1,1,4),pstat_runew(1,1,5),pstat_runew(1,1,6),
741 call vdot3(pstat_rutmp(1,1,7),
742 $ pstat_ruavg(1,1,9),pstat_ruavg(1,1,6),pstat_ruavg(1,1,10),
743 $ pstat_runew(1,1,7),pstat_runew(1,1,8),pstat_runew(1,1,9),
745 call add2(pstat_rutmp(1,1,6),pstat_rutmp(1,1,7),nvec)
746 call chsign(pstat_rutmp(1,1,6),nvec)
751 call sub3(pstat_rutmp(1,1,6+il),pstat_ruavg(1,1,11+il),
752 $ pstat_ruavg(1,1,17+il),nvec)
757 call add4(pstat_rutmp(1,1,13),pstat_rutmp(1,1,1),
758 $ pstat_rutmp(1,1,2),pstat_rutmp(1,1,3),nvec)
759 call cmult(pstat_rutmp(1,1,13),rtmp,nvec)
760 call add4(pstat_rutmp(1,1,14),pstat_ruavg(1,1,39),
761 $ pstat_ruavg(1,1,40),pstat_ruavg(1,1,41),nvec)
762 call cmult(pstat_rutmp(1,1,14),rtmp,nvec)
763 call add4(pstat_rutmp(1,1,15),pstat_runew(1,1,22),
764 $ pstat_runew(1,1,23),pstat_runew(1,1,24),nvec)
765 call cmult(pstat_rutmp(1,1,15),rtmp,nvec)
766 call add4(pstat_rutmp(1,1,16),pstat_runew(1,1,16),
767 $ pstat_runew(1,1,17),pstat_runew(1,1,18),nvec)
768 call cmult(pstat_rutmp(1,1,16),rtmp,nvec)
769 call add4(pstat_rutmp(1,1,17),pstat_rutmp(1,1,7),
770 $ pstat_rutmp(1,1,8),pstat_rutmp(1,1,9),nvec)
771 call cmult(pstat_rutmp(1,1,17),rtmp,nvec)
772 call add4(pstat_rutmp(1,1,18),pstat_runew(1,1,10),
773 $ pstat_runew(1,1,11),pstat_runew(1,1,12),nvec)
774 call cmult(pstat_rutmp(1,1,18),rtmp,nvec)
775 call add4(pstat_rutmp(1,1,19),pstat_rutmp(1,1,13),
776 $ pstat_rutmp(1,1,14),pstat_rutmp(1,1,15),nvec)
777 call add3(pstat_rutmp(1,1,20),pstat_rutmp(1,1,16),
778 $ pstat_rutmp(1,1,17),nvec)
779 call sub2(pstat_rutmp(1,1,20),pstat_rutmp(1,1,18),nvec)
780 call add2(pstat_rutmp(1,1,19),pstat_rutmp(1,1,20),nvec)
799 integer mid,mp,nekcomm,nekgroup,nekreal
800 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
807 integer nxf, nyf, nzf
810 parameter(toldist = 5e-6)
812 integer rcode(lhis), proc(lhis),elid(lhis)
813 real dist(lhis), rst(ldim*lhis)
825 character*3 str1, str2
826 integer iunit, ierr, jl
838 nt = lx1*ly1*lz1*lelt
846 call fgslib_findpts_setup(ifpts,nekcomm,mp,ldim,xm1,ym1,zm1,
847 & lx1,ly1,lz1,nelt,nxf,nyf,nzf,bb_t,nt,nt,npt_max,tol)
850 call fgslib_findpts(ifpts,rcode,1,proc,1,elid,1,rst,ldim,dist,1,
851 & pstat_int_pts(1,1),ldim,pstat_int_pts(2,1),ldim,
852 & pstat_int_pts(ldim,1),ldim,pstat_npt)
858 if (rcode(il).eq.1)
then
859 if (sqrt(dist(il)).gt.toldist) nfail = nfail + 1
860 elseif(rcode(il).eq.2)
then
864 nfail = iglsum(nfail,1)
871 write(str1,
'(i3.3)') nid
872 write(str2,
'(i3.3)') icalld
873 open(unit=iunit,
file=
'INTfpts.txt'//str1//
'i'//str2)
875 write(iunit,*) pstat_nptot, pstat_npt, nfail
877 write(iunit,*) il, proc(il), elid(il), rcode(il), dist(il),
878 $ (rst(jl+(il-1)*ldim),jl=1,ldim)
885 $
'pstat_interp: Points not mapped')
889 call fgslib_findpts_eval(ifpts,pstat_int_avg(1,il),1,
890 & rcode,1,proc,1,elid,1,rst,ndim,pstat_npt,
891 & pstat_ruavg(1,1,il))
898 write(str1,
'(i3.3)') nid
899 write(str2,
'(i3.3)') icalld
900 open(unit=iunit,
file=
'INTavg.txt'//str1//
'i'//str2)
902 write(iunit,*) pstat_nptot, pstat_npt
904 write(iunit,*) il, (pstat_int_avg(il,jl),jl=1,4)
912 call fgslib_findpts_eval(ifpts,pstat_int_tmp(1,il),1,
913 & rcode,1,proc,1,elid,1,rst,ndim,pstat_npt,
914 & pstat_rutmp(1,1,il))
921 write(str1,
'(i3.3)') nid
922 write(str2,
'(i3.3)') icalld
923 open(unit=iunit,
file=
'INTtmp.txt'//str1//
'i'//str2)
925 write(iunit,*) pstat_nptot, pstat_npt
927 write(iunit,*) il, (pstat_int_tmp(il,jl),jl=1,4)
935 call fgslib_findpts_eval(ifpts,pstat_int_new(1,il),1,
936 & rcode,1,proc,1,elid,1,rst,ndim,pstat_npt,
937 & pstat_runew(1,1,il))
944 write(str1,
'(i3.3)') nid
945 write(str2,
'(i3.3)') icalld
946 open(unit=iunit,
file=
'INTnew.txt'//str1//
'i'//str2)
948 write(iunit,*) pstat_nptot, pstat_npt
950 write(iunit,*) il, (pstat_int_new(il,jl),jl=1,4)
958 call fgslib_findpts_eval(ifpts,pstat_int_pgr(1,il),1,
959 & rcode,1,proc,1,elid,1,rst,ndim,pstat_npt,
960 & pstat_pgrad(1,1,il))
964 call fgslib_findpts_free(ifpts)
subroutine mntr_tmr_is_name_reg(mid, mname)
Check if timer name is registered and return its id.
subroutine mntr_warn(mid, logs)
Write warning message.
subroutine mntr_tmr_add(mid, icount, time)
Check if timer id is registered. This operation is performed locally.
subroutine mntr_mod_is_name_reg(mid, mname)
Check if module name is registered and return its id.
subroutine mntr_abort(mid, logs)
Abort simulation.
subroutine mntr_log(mid, priority, logs)
Write log message.
subroutine mntr_mod_reg(mid, pmid, mname, mdscr)
Register new module.
subroutine mntr_tmr_reg(mid, pmid, modid, mname, mdscr, ifsum)
Register new timer.
subroutine pstat3d_nfield
Calculate new fileds.
subroutine pstat3d_mfi_interp
Read interpolation points position and redistribute them.
subroutine pstat3d_mfo_interp
Geather data and write it down.
subroutine pstat3d_init()
Initilise pstat module.
subroutine pstat3d_interp
Interpolate int the set of points.
subroutine pstat3d_register()
Register post processing statistics module.
subroutine pstat3d_main
Main interface of pstat module.
subroutine pstat3d_sts_avg
Read in fields and average them.
logical function pstat3d_is_initialised()
Check if module was initialised.
subroutine pstat3d_mfo
Write field data data to the file.
subroutine rprm_rp_get(ipval, rpval, lpval, cpval, rpid, ptype)
Get runtime parameter form active section. This operation is performed locally.
subroutine rprm_rp_reg(rpid, mid, pname, pdscr, ptype, ipval, rpval, lpval, cpval)
Register new runtime parameter.
subroutine rprm_sec_set_act(ifact, rpid)
Set section's activation flag. Master value is broadcasted.
subroutine rprm_sec_reg(rpid, mid, pname, pdscr)
Register new parameter section.
subroutine mfi(fname_in, ifile)
subroutine addfid(fname, fid)
subroutine col3(a, b, c, n)
subroutine icopy(a, b, n)
subroutine admcol3(a, b, c, d, n)
subroutine add2s2(a, b, c1, n)
subroutine add3(a, b, c, n)
subroutine add4(a, b, c, d, n)
subroutine subcol3(a, b, c, n)
subroutine subcol4(a, b, c, d, n)
subroutine sub3(a, b, c, n)
subroutine cmult(a, const, n)
subroutine vdot3(dot, u1, u2, u3, v1, v2, v3, n)
subroutine gradm1(ux, uy, uz, u)
subroutine outpost(v1, v2, v3, vp, vt, name3)