33 $
'module ['//trim(pstat_name)//
'] already registered')
42 $
'parent module ['//
'FRAME'//
'] not registered')
47 $
'Post processing for 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_DER',
'Pstat derivative 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_amr_irnr_id,pstat_sec_id,
'AMR_NREF',
75 $
'Nr. of initial refinemnt (AMR only)',rpar_int,1,0.0,.false.,
' ')
76 call rprm_rp_reg(pstat_ffile_id,pstat_sec_id,
'STS_FFILE',
77 $
'First stat file number',rpar_int,1,0.0,.false.,
' ')
78 call rprm_rp_reg(pstat_nfile_id,pstat_sec_id,
'STS_NFILE',
79 $
'Last stat file number',rpar_int,1,0.0,.false.,
' ')
80 call rprm_rp_reg(pstat_stime_id,pstat_sec_id,
'STS_STIME',
81 $
'Statistics starting time',rpar_real,1,0.0,.false.,
' ')
82 call rprm_rp_reg(pstat_nstep_id,pstat_sec_id,
'STS_NSTEP',
83 $
'Number of steps between averaging (in sts file)',
84 $ rpar_int,10,0.0,.false.,
' ')
90 ltim = dnekclock() - ltim
116 if (pstat_ifinit)
then
118 $
'module ['//trim(pstat_name)//
'] already initiaised.')
126 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_amr_irnr_id,rpar_int)
127 pstat_amr_irnr = abs(itmp)
128 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_ffile_id,rpar_int)
129 pstat_ffile = abs(itmp)
130 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_nfile_id,rpar_int)
131 pstat_nfile = abs(itmp)
132 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_stime_id,rpar_real)
134 call rprm_rp_get(itmp,rtmp,ltmp,ctmp,pstat_nstep_id,rpar_int)
135 pstat_nstep = abs(itmp)
139 pstat_swfield(il) = il
142 pstat_swfield(il) = il+1
144 pstat_swfield(33) = 27
145 pstat_swfield(34) = 38
147 pstat_swfield(il) = il-1
149 do il = 39,pstat_svar
150 pstat_swfield(il) = il
155 call mntr_log(pstat_id,lp_inf,
'Updating 2D mesh structure')
165 ltim = dnekclock() - ltim
205 call mntr_log(pstat_id,lp_inf,
'Field averaging')
207 ltim = dnekclock() - ltim
212 call mntr_log(pstat_id,lp_inf,
'Derivative calculation')
214 ltim = dnekclock() - ltim
219 call mntr_log(pstat_id,lp_inf,
'Point interpolation')
221 ltim = dnekclock() - ltim
250 do il=1,pstat_amr_irnr
251 call amr_refinement()
261 call amr_refinement()
263 inf_cnt = inf_cnt + 1
265 $
'Infinit loop too long; possible problem with mark check.')
267 pstat_elmod = iglsum(pstat_elmod,1)
268 if (nelgv.eq.pstat_nelg.and.pstat_elmod.eq.0)
then
270 $
'Finished refinement; cycles number :', inf_cnt)
293 integer mid,mp,nekcomm,nekgroup,nekreal
294 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
301 integer il, jl, kl, inf_cnt
306 integer nxf, nyf, nzf
309 parameter(toldist = 5e-6)
311 integer rcode(lelt), proc(lelt),elid(lelt)
312 real dist(lelt), rst(ldim*lelt)
318 parameter(idim=4, isdim = 4*lelt)
319 integer isort(idim,isdim), ind(isdim), iwork(idim)
320 integer ipass, iseg, nseg
331 character*3 str1, str2
341 nt = lx1*ly1*lz1*lelt
349 call fgslib_findpts_setup(ifpts,nekcomm,mp,ldim,xm1,ym1,zm1,
350 & lx1,ly1,lz1,nelt,nxf,nyf,nzf,bb_t,nt,nt,npt_max,tol)
352 call fgslib_findpts(ifpts,rcode,1,proc,1,elid,1,rst,ldim,
353 & dist,1,pstat_cnt(1,1),ldim,pstat_cnt(2,1),ldim,
354 & pstat_cnt(ldim,1),ldim,pstat_nel)
356 call fgslib_findpts_free(ifpts)
362 if (rcode(il).eq.1)
then
363 if (sqrt(dist(il)).gt.toldist) nfail = nfail + 1
364 elseif(rcode(il).eq.2)
then
368 nfail = iglsum(nfail,1)
375 write(str1,
'(i3.3)') nid
376 write(str2,
'(i3.3)') icalld
377 open(unit=iunit,
file=
'CRDfpts.txt'//str1//
'i'//str2)
379 write(iunit,*) pstat_nelg, pstat_nel, nfail
381 write(iunit,*) il, pstat_gnel(il), proc(il), elid(il)+1,
382 & rcode(il), dist(il), (rst(jl+(il-1)*ldim),jl=1,ldim)
389 $
'Elements not identified in pstat_mesh_map')
394 isort(1,il) = proc(il)
395 isort(2,il) = elid(il) + 1
396 isort(3,il) = pstat_gnel(il)
398 isort(4,il) = pstat_lev(il)
413 ninseg(1) = pstat_nel
419 call ituple_sort(isort(1,il),idim,ninseg(iseg),jl,1,
421 il = il + ninseg(iseg)
426 if (isort(jl,il).ne.isort(jl,il-1)) ifseg(il)=.true.
436 ninseg(nseg) = ninseg(nseg) + 1
447 isort(kl,iseg) = isort(kl,jl)
450 do il=jl+1,jl + ninseg(iseg)
451 if(isort(4,iseg).lt.isort(4,il))
then
452 isort(3,iseg) = isort(3,il)
453 isort(4,iseg) = isort(4,il)
457 jl = jl + ninseg(iseg)
464 write(str1,
'(i3.3)') nid
465 write(str2,
'(i3.3)') icalld
466 open(unit=iunit,
file=
'CRDsort.txt'//str1//
'i'//str2)
471 write(iunit,*) il, ninseg(il), (isort(jl,il),jl=1,idim)
478 call fgslib_crystal_ituple_transfer(cr_h,isort,idim,nseg,isdim,1)
480 call fgslib_crystal_ituple_sort(cr_h,isort,idim,nseg,il,1)
485 if (isort(2,iseg).eq.isort(2,il))
then
487 if (isort(4,iseg).lt.isort(4,il))
then
488 isort(3,iseg) = isort(3,il)
489 isort(4,iseg) = isort(4,il)
496 isort(kl,iseg) = isort(kl,il)
507 write(str1,
'(i3.3)') nid
508 write(str2,
'(i3.3)') icalld
509 open(unit=iunit,
file=
'CRDtrans.txt'//str1//
'i'//str2)
511 write(iunit,*) nseg, nelv
514 write(iunit,*) il, (isort(jl,il),jl=1,idim)
521 if (nseg.ne.nelt)
then
527 $
'Inconsistent segment number in pstat_mesh_map')
533 pstat_refl(isort(2,il)) = isort(4,il)
543 pstat_gnel(isort(2,il)) = isort(3,il)
548 isort(1,il) =
gllnid(pstat_gnel(il))
549 isort(2,il) =
gllel(pstat_gnel(il))
551 isort(4,il) = lglel(il)
556 call fgslib_crystal_ituple_transfer(cr_h,isort,idim,iseg,isdim,1)
559 if (iseg.ne.nelt) ierr = 1
561 $
'Inconsistent element number in pstat_mesh_map')
563 call fgslib_crystal_ituple_sort(cr_h,isort,idim,iseg,il,1)
570 if (isort(3,il).ne.
gllel(isort(4,il))) ierr = 1
573 $
'Inconsistent element transfer number in pstat_mesh_map')
576 if (isort(1,il).ne.
gllnid(isort(4,il))) ierr = 1
579 $
'Inconsistent process transfer number in pstat_mesh_map')
584 pstat_gnel(il) = isort(4,il)
591 write(str1,
'(i3.3)') nid
592 write(str2,
'(i3.3)') icalld
593 open(unit=iunit,
file=
'CRDmap.txt'//str1//
'i'//str2)
595 write(iunit,*) nelgt,nelt
597 write(iunit,*) il, pstat_gnel(il)
641 vi(1,il) =
gllel(pstat_gnel(il))
642 vi(2,il) =
gllnid(pstat_gnel(il))
646 call fgslib_crystal_tuple_transfer
647 $ (cr_h,lnelt,lelt,vi,isw,vl,0,xm1,itmp,2)
650 if (lnelt.ne.nelt)
then
651 call mntr_abort(
'Error: pstat_transfer; lnelt /= nelt')
656 call fgslib_crystal_tuple_sort
657 $ (cr_h,lnelt,vi,isw,vl,0,xm1,itmp,key,1)
664 vi(1,il) =
gllel(pstat_gnel(il))
665 vi(2,il) =
gllnid(pstat_gnel(il))
669 call fgslib_crystal_tuple_transfer
670 $ (cr_h,lnelt,lelt,vi,isw,vl,0,ym1,itmp,2)
673 if (lnelt.ne.nelt)
then
674 call mntr_abort(
'Error: pstat_transfer; lnelt /= nelt')
679 call fgslib_crystal_tuple_sort
680 $ (cr_h,lnelt,vi,isw,vl,0,ym1,itmp,key,1)
689 vi(1,jl) =
gllel(pstat_gnel(jl))
690 vi(2,jl) =
gllnid(pstat_gnel(jl))
694 call fgslib_crystal_tuple_transfer
695 $ (cr_h,lnelt,lelt,vi,isw,vl,0,t(1,1,1,1,il+1),itmp,2)
698 if (lnelt.ne.nelt)
then
699 call mntr_abort(
'Error: pstat_transfer; lnelt /= nelt')
704 call fgslib_crystal_tuple_sort
705 $ (cr_h,lnelt,vi,isw,vl,0,t(1,1,1,1,il+1),itmp,key,1)
732 integer nps1,nps0,npsr
747 bname = trim(adjustl(session))
765 call rzero(pstat_ruavg,lx1**ldim*lelt*pstat_svar)
769 do il = pstat_ffile, pstat_nfile
771 call mntr_logi(pstat_id,lp_inf,
'Opening sts file nr=',il)
779 write(str,
'(i5.5)') il
780 fname = trim(fname)//trim(str)
786 fname =
'DATA/'//trim(fname)
793 if (rdcode1(jl).eq.
'S')
then
794 read(rdcode1(jl+1),
'(i1)') nps1
795 read(rdcode1(jl+2),
'(i1)') nps0
799 if (npsr.ne.pstat_svar)
call mntr_abort(pstat_id,
800 $
'Inconsistent number of fielsd in sts file.')
803 dtime = timer - ltime
807 istepr = istepr + istpr
816 call add2s2(pstat_ruavg(1,1,jl),t(1,1,1,1,jl+1),dtime,nvec)
823 pstat_istepr = istepr
826 if (ltime.ne.pstat_stime)
then
827 rtmp = 1.0/(ltime-pstat_stime)
833 call cmult(pstat_ruavg(1,1,il),rtmp,nvec)
845 call copy(t(1,1,1,1,il+1),pstat_ruavg(1,1,il),nvec)
847 call outpost2(vx,vy,vz,pr,t,pstat_svar+1,
'st1')
850 call copy(pstat_ruavg(1,1,pstat_swfield(il)),t(1,1,1,1,il+1),
871 real dudx(lx1*ly1*lz1,lelt,3)
877 call rzero(pstat_ruder,lx1**ldim*lelt*pstat_dvar)
881 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
882 $ pstat_ruavg(1,1,1))
883 call copy(pstat_ruder(1,1,1),dudx(1,1,1),nvec)
884 call copy(pstat_ruder(1,1,2),dudx(1,1,2),nvec)
887 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
888 $ pstat_ruavg(1,1,2))
889 call copy(pstat_ruder(1,1,3),dudx(1,1,1),nvec)
890 call copy(pstat_ruder(1,1,4),dudx(1,1,2),nvec)
893 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
894 $ pstat_ruavg(1,1,3))
895 call copy(pstat_ruder(1,1,5),dudx(1,1,1),nvec)
896 call copy(pstat_ruder(1,1,6),dudx(1,1,2),nvec)
899 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
900 $ pstat_ruavg(1,1,4))
901 call copy(pstat_ruder(1,1,7),dudx(1,1,1),nvec)
902 call copy(pstat_ruder(1,1,8),dudx(1,1,2),nvec)
905 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
906 $ pstat_ruavg(1,1,5))
907 call copy(pstat_ruder(1,1,9),dudx(1,1,1),nvec)
908 call copy(pstat_ruder(1,1,10),dudx(1,1,2),nvec)
911 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
912 $ pstat_ruavg(1,1,6))
913 call copy(pstat_ruder(1,1,11),dudx(1,1,1),nvec)
914 call copy(pstat_ruder(1,1,12),dudx(1,1,2),nvec)
917 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
918 $ pstat_ruavg(1,1,7))
919 call copy(pstat_ruder(1,1,13),dudx(1,1,1),nvec)
920 call copy(pstat_ruder(1,1,14),dudx(1,1,2),nvec)
923 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
924 $ pstat_ruavg(1,1,8))
925 call copy(pstat_ruder(1,1,15),dudx(1,1,1),nvec)
926 call copy(pstat_ruder(1,1,16),dudx(1,1,2),nvec)
929 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
930 $ pstat_ruavg(1,1,9))
931 call copy(pstat_ruder(1,1,17),dudx(1,1,1),nvec)
932 call copy(pstat_ruder(1,1,18),dudx(1,1,2),nvec)
935 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
936 $ pstat_ruavg(1,1,10))
937 call copy(pstat_ruder(1,1,19),dudx(1,1,1),nvec)
938 call copy(pstat_ruder(1,1,20),dudx(1,1,2),nvec)
941 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
942 $ pstat_ruavg(1,1,11))
943 call copy(pstat_ruder(1,1,21),dudx(1,1,1),nvec)
944 call copy(pstat_ruder(1,1,22),dudx(1,1,2),nvec)
947 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
948 $ pstat_ruavg(1,1,24))
949 call copy(pstat_ruder(1,1,23),dudx(1,1,1),nvec)
950 call copy(pstat_ruder(1,1,24),dudx(1,1,2),nvec)
953 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
954 $ pstat_ruavg(1,1,25))
955 call copy(pstat_ruder(1,1,25),dudx(1,1,1),nvec)
956 call copy(pstat_ruder(1,1,26),dudx(1,1,2),nvec)
959 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
960 $ pstat_ruavg(1,1,26))
961 call copy(pstat_ruder(1,1,27),dudx(1,1,1),nvec)
962 call copy(pstat_ruder(1,1,28),dudx(1,1,2),nvec)
965 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
966 $ pstat_ruavg(1,1,27))
967 call copy(pstat_ruder(1,1,29),dudx(1,1,1),nvec)
968 call copy(pstat_ruder(1,1,30),dudx(1,1,2),nvec)
971 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
972 $ pstat_ruavg(1,1,28))
973 call copy(pstat_ruder(1,1,31),dudx(1,1,1),nvec)
974 call copy(pstat_ruder(1,1,32),dudx(1,1,2),nvec)
977 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
978 $ pstat_ruavg(1,1,29))
979 call copy(pstat_ruder(1,1,33),dudx(1,1,1),nvec)
980 call copy(pstat_ruder(1,1,34),dudx(1,1,2),nvec)
983 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
984 $ pstat_ruavg(1,1,30))
985 call copy(pstat_ruder(1,1,35),dudx(1,1,1),nvec)
986 call copy(pstat_ruder(1,1,36),dudx(1,1,2),nvec)
989 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
990 $ pstat_ruavg(1,1,31))
991 call copy(pstat_ruder(1,1,37),dudx(1,1,1),nvec)
992 call copy(pstat_ruder(1,1,38),dudx(1,1,2),nvec)
995 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
996 $ pstat_ruavg(1,1,32))
997 call copy(pstat_ruder(1,1,39),dudx(1,1,1),nvec)
998 call copy(pstat_ruder(1,1,40),dudx(1,1,2),nvec)
1001 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1002 $ pstat_ruavg(1,1,33))
1003 call copy(pstat_ruder(1,1,41),dudx(1,1,1),nvec)
1004 call copy(pstat_ruder(1,1,42),dudx(1,1,2),nvec)
1007 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1008 $ pstat_ruavg(1,1,34))
1009 call copy(pstat_ruder(1,1,43),dudx(1,1,1),nvec)
1010 call copy(pstat_ruder(1,1,44),dudx(1,1,2),nvec)
1013 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1014 $ pstat_ruder(1,1,1))
1015 call copy(pstat_ruder(1,1,45),dudx(1,1,1),nvec)
1018 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1019 $ pstat_ruder(1,1,2))
1020 call copy(pstat_ruder(1,1,46),dudx(1,1,2),nvec)
1023 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1024 $ pstat_ruder(1,1,3))
1025 call copy(pstat_ruder(1,1,47),dudx(1,1,1),nvec)
1028 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1029 $ pstat_ruder(1,1,4))
1030 call copy(pstat_ruder(1,1,48),dudx(1,1,2),nvec)
1033 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1034 $ pstat_ruder(1,1,5))
1035 call copy(pstat_ruder(1,1,49),dudx(1,1,1),nvec)
1038 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1039 $ pstat_ruder(1,1,6))
1040 call copy(pstat_ruder(1,1,50),dudx(1,1,2),nvec)
1043 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1044 $ pstat_ruder(1,1,9))
1045 call copy(pstat_ruder(1,1,51),dudx(1,1,1),nvec)
1048 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1049 $ pstat_ruder(1,1,10))
1050 call copy(pstat_ruder(1,1,52),dudx(1,1,2),nvec)
1053 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1054 $ pstat_ruder(1,1,11))
1055 call copy(pstat_ruder(1,1,53),dudx(1,1,1),nvec)
1058 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1059 $ pstat_ruder(1,1,12))
1060 call copy(pstat_ruder(1,1,54),dudx(1,1,2),nvec)
1063 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1064 $ pstat_ruder(1,1,13))
1065 call copy(pstat_ruder(1,1,55),dudx(1,1,1),nvec)
1068 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1069 $ pstat_ruder(1,1,14))
1070 call copy(pstat_ruder(1,1,56),dudx(1,1,2),nvec)
1073 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1074 $ pstat_ruder(1,1,17))
1075 call copy(pstat_ruder(1,1,57),dudx(1,1,1),nvec)
1078 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1079 $ pstat_ruder(1,1,18))
1080 call copy(pstat_ruder(1,1,58),dudx(1,1,2),nvec)
1083 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1084 $ pstat_ruder(1,1,21))
1085 call copy(pstat_ruder(1,1,59),dudx(1,1,1),nvec)
1088 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1089 $ pstat_ruder(1,1,22))
1090 call copy(pstat_ruder(1,1,60),dudx(1,1,2),nvec)
1093 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1094 $ pstat_ruder(1,1,19))
1095 call copy(pstat_ruder(1,1,61),dudx(1,1,1),nvec)
1098 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1099 $ pstat_ruder(1,1,20))
1100 call copy(pstat_ruder(1,1,62),dudx(1,1,2),nvec)
1103 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1104 $ pstat_ruavg(1,1,12))
1105 call copy(pstat_ruder(1,1,63),dudx(1,1,1),nvec)
1106 call copy(pstat_ruder(1,1,64),dudx(1,1,2),nvec)
1109 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1110 $ pstat_ruavg(1,1,13))
1111 call copy(pstat_ruder(1,1,65),dudx(1,1,1),nvec)
1112 call copy(pstat_ruder(1,1,66),dudx(1,1,2),nvec)
1115 call gradm1(dudx(1,1,1),dudx(1,1,2),dudx(1,1,3),
1116 $ pstat_ruavg(1,1,14))
1117 call copy(pstat_ruder(1,1,67),dudx(1,1,1),nvec)
1118 call copy(pstat_ruder(1,1,68),dudx(1,1,2),nvec)
1129 call copy(t(1,1,1,1,il+1),pstat_ruder(1,1,il),nvec)
1131 call outpost2(vx,vy,vz,pr,t,pstat_dvar+1,
'st2')
1147 integer mid,mp,nekcomm,nekgroup,nekreal
1148 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
1155 integer nxf, nyf, nzf
1158 parameter(toldist = 5e-6)
1160 integer rcode(lhis), proc(lhis),elid(lhis)
1161 real dist(lhis), rst(ldim*lhis)
1163 integer nfail, npass
1173 character*3 str1, str2
1174 integer iunit, ierr, jl
1186 nt = lx1*ly1*lz1*lelt
1194 call fgslib_findpts_setup(ifpts,nekcomm,mp,ldim,xm1,ym1,zm1,
1195 & lx1,ly1,lz1,nelt,nxf,nyf,nzf,bb_t,nt,nt,npt_max,tol)
1198 call fgslib_findpts(ifpts,rcode,1,proc,1,elid,1,rst,ldim,dist,1,
1199 & pstat_int_pts(1,1),ldim,pstat_int_pts(2,1),ldim,
1200 & pstat_int_pts(ldim,1),ldim,pstat_npt)
1206 if (rcode(il).eq.1)
then
1207 if (sqrt(dist(il)).gt.toldist) nfail = nfail + 1
1208 elseif(rcode(il).eq.2)
then
1212 nfail = iglsum(nfail,1)
1219 write(str1,
'(i3.3)') nid
1220 write(str2,
'(i3.3)') icalld
1221 open(unit=iunit,
file=
'INTfpts.txt'//str1//
'i'//str2)
1223 write(iunit,*) pstat_nptot, pstat_npt, nfail
1225 write(iunit,*) il, proc(il), elid(il), rcode(il), dist(il),
1226 $ (rst(jl+(il-1)*ldim),jl=1,ldim)
1233 $
'pstat_interp: Points not mapped')
1237 call fgslib_findpts_eval(ifpts,pstat_int_avg(1,il),1,
1238 & rcode,1,proc,1,elid,1,rst,ndim,pstat_npt,
1239 & pstat_ruavg(1,1,il))
1246 write(str1,
'(i3.3)') nid
1247 write(str2,
'(i3.3)') icalld
1248 open(unit=iunit,
file=
'INTavg.txt'//str1//
'i'//str2)
1250 write(iunit,*) pstat_nptot, pstat_npt
1252 write(iunit,*) il, (pstat_int_avg(il,jl),jl=1,4)
1260 call fgslib_findpts_eval(ifpts,pstat_int_der(1,il),1,
1261 & rcode,1,proc,1,elid,1,rst,ndim,pstat_npt,
1262 & pstat_ruder(1,1,il))
1269 write(str1,
'(i3.3)') nid
1270 write(str2,
'(i3.3)') icalld
1271 open(unit=iunit,
file=
'INTder.txt'//str1//
'i'//str2)
1273 write(iunit,*) pstat_nptot, pstat_npt
1275 write(iunit,*) il, (pstat_int_der(il,jl),jl=1,4)
1282 call fgslib_findpts_free(ifpts)
integer function gllel(ieg)
integer function gllnid(ieg)
subroutine mntr_logi(mid, priority, logs, ivar)
Write log message adding single integer.
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 mntr_check_abort(mid, ierr, logs)
Abort simulation.
subroutine pstat2d_init()
Initilise pstat module.
logical function pstat2d_is_initialised()
Check if module was initialised.
subroutine pstat2d_mfi_crd2d(fidl)
Read nonconforming data from the file.
subroutine pstat2d_interp
Interpolate int the set of points.
subroutine pstat2d_transfer()
Reshuffle elements between sts and current ordering.
subroutine pstat2d_deriv
Calculate derivatives.
subroutine pstat2d_mfo_interp
Geather data and write it down.
subroutine pstat2d_mesh_amr
Manipulate mesh to get proper AMR refinement.
subroutine pstat2d_register()
Register post processing statistics module.
subroutine pstat2d_main
Main interface of pstat module.
subroutine pstat2d_sts_avg
Read in fields and average them.
subroutine pstat2d_mesh_map(ifrref)
Find mapping of sts mesh to the existing in the run.
subroutine pstat2d_mfi_interp
Read interpolation points position and redistribute them.
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 geom_reset(icall)
subroutine add2s2(a, b, c1, n)
subroutine cmult(a, const, n)
subroutine gradm1(ux, uy, uz, u)
subroutine ituple_sort(a, lda, n, key, nkey, ind, aa)
subroutine outpost2(v1, v2, v3, vp, vt, nfldt, name3)