30 call outpost(pstat_ruavg(1,1,1),pstat_ruavg(1,1,2),
31 $ pstat_ruavg(1,1,3),pr,pstat_ruavg(1,1,5),
'a01')
32 call outpost(pstat_ruavg(1,1,6),pstat_ruavg(1,1,7),
33 $ pstat_ruavg(1,1,9),pr,pstat_ruavg(1,1,11),
'a02')
34 call outpost(pstat_ruavg(1,1,10),pstat_ruavg(1,1,4),
35 $ pstat_ruavg(1,1,8),pr,pstat_ruavg(1,1,27),
'a03')
36 call outpost(pstat_ruavg(1,1,38),pstat_ruavg(1,1,24),
37 $ pstat_ruavg(1,1,25),pr,pstat_ruavg(1,1,26),
'a04')
38 call outpost(pstat_ruavg(1,1,28),pstat_ruavg(1,1,29),
39 $ pstat_ruavg(1,1,30),pr,pstat_ruavg(1,1,31),
'a05')
40 call outpost(pstat_ruavg(1,1,32),pstat_ruavg(1,1,33),
41 $ pstat_ruavg(1,1,34),pr,pstat_rutmp(1,1,1),
'a06')
42 call outpost(pstat_rutmp(1,1,2),pstat_rutmp(1,1,3),
43 $ pstat_rutmp(1,1,4),pr,pstat_rutmp(1,1,5),
'a07')
44 call outpost(pstat_rutmp(1,1,6),pstat_ruavg(1,1,39),
45 $ pstat_ruavg(1,1,40),pr,pstat_ruavg(1,1,41),
'a08')
46 call outpost(pstat_ruavg(1,1,42),pstat_ruavg(1,1,43),
47 $ pstat_ruavg(1,1,44),pr,pstat_runew(1,1,22),
'a09')
48 call outpost(pstat_runew(1,1,23),pstat_runew(1,1,24),
49 $ pstat_runew(1,1,25),pr,pstat_runew(1,1,27),
'a10')
50 call outpost(pstat_runew(1,1,26),pstat_runew(1,1,16),
51 $ pstat_runew(1,1,17),pr,pstat_runew(1,1,18),
'a11')
52 call outpost(pstat_runew(1,1,19),pstat_runew(1,1,21),
53 $ pstat_runew(1,1,20),pr,pstat_rutmp(1,1,7),
'a12')
54 call outpost(pstat_rutmp(1,1,8),pstat_rutmp(1,1,9),
55 $ pstat_rutmp(1,1,10),pr,pstat_rutmp(1,1,11),
'a13')
56 call outpost(pstat_rutmp(1,1,12),pstat_runew(1,1,10),
57 $ pstat_runew(1,1,11),pr,pstat_runew(1,1,12),
'a14')
58 call outpost(pstat_runew(1,1,13),pstat_runew(1,1,15),
59 $ pstat_runew(1,1,14),pr,pstat_rutmp(1,1,13),
'a15')
60 call outpost(pstat_rutmp(1,1,14),pstat_rutmp(1,1,15),
61 $ pstat_rutmp(1,1,16),pr,pstat_rutmp(1,1,17),
'a16')
62 call outpost(pstat_rutmp(1,1,18),pstat_rutmp(1,1,19),
63 $ pstat_ruavg(1,1,12),pr,pstat_ruavg(1,1,13),
'a17')
64 call outpost(pstat_ruavg(1,1,14),pstat_ruavg(1,1,15),
65 $ pstat_ruavg(1,1,16),pr,pstat_ruavg(1,1,17),
'a18')
66 call outpost(pstat_ruavg(1,1,18),pstat_ruavg(1,1,19),
67 $ pstat_ruavg(1,1,20),pr,pstat_ruavg(1,1,21),
'a19')
68 call outpost(pstat_ruavg(1,1,22),pstat_ruavg(1,1,23),
69 $ pstat_runew(1,1,1),pr,pstat_runew(1,1,2),
'a20')
70 call outpost(pstat_runew(1,1,3),pstat_runew(1,1,4),
71 $ pstat_runew(1,1,5),pr,pstat_runew(1,1,6),
'a21')
72 call outpost(pstat_runew(1,1,7),pstat_runew(1,1,8),
73 $ pstat_runew(1,1,9),pr,pstat_rutmp(1,1,15),
'a22')
74 call outpost(pstat_pgrad(1,1,1),pstat_pgrad(1,1,2),
75 $ pstat_pgrad(1,1,3),pr,pstat_rutmp(1,1,15),
'a23')
93 integer mid,mp,nekcomm,nekgroup,nekreal
94 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
102 real rtmp_pts(ldim,lhis)
103 real*4 rbuffl(2*ldim*lhis)
113 logical if_byte_swap_test
117 character*3 str1, str2
127 if (nid.eq.pid00)
then
133 call blank (hdr,hdrl)
135 if (ierr.ne.0)
goto 101
139 if(ierr.ne.0)
goto 101
140 if_byte_sw = if_byte_swap_test(bytetest,ierr)
141 if(ierr.ne.0)
goto 101
144 read(hdr,*,iostat=ierr) dummy, wdsizr, ldiml, nptsr
150 $
'pstat_mfi_interp: Error opening point files')
153 call bcast(wdsizr,isize)
154 call bcast(ldiml,isize)
155 call bcast(nptsr,isize)
156 call bcast(if_byte_sw,lsize)
160 $
'pstat_mfi_interp: Inconsisten dimension.')
166 if (pstat_npt.gt.0)
then
167 pstat_npt1 = mod(pstat_nptot,mp)
169 pstat_npt1 = pstat_nptot
171 if (nid.lt.pstat_npt1) pstat_npt = pstat_npt +1
175 $
'Interpolation point number :', pstat_nptot)
178 if (pstat_npt.gt.lhis) ierr = 1
180 $
'pstat_mfi_interp: lhis too small')
185 if (nid.eq.pid00)
then
186 if (pstat_nptot.gt.0)
then
188 ldiml = ldim*pstat_npt*wdsizr/4
201 ldiml = ldim*pstat_npt
202 if (wdsizr.eq.4)
then
203 call copy4r(pstat_int_pts,rbuffl,ldiml)
205 call copy(pstat_int_pts,rbuffl,ldiml)
209 npass = min(mp,pstat_nptot)
212 if (pstat_npt1.gt.0.and.il.ge.pstat_npt1)
then
216 ldiml = ldim*nptsr*wdsizr/4
230 if (wdsizr.eq.4)
then
231 call copy4r(rtmp_pts,rbuffl,ldiml)
233 call copy(rtmp_pts,rbuffl,ldiml)
238 call csend(il,rtmp_pts,ldiml,il,jl)
242 if (pstat_npt.gt.0)
then
243 call crecv2(nid,pstat_int_pts,ldim*pstat_npt*wdsize,0)
248 if (nid.eq.pid00)
then
257 write(str1,
'(i3.3)') nid
258 write(str2,
'(i3.3)') icalld
259 open(unit=iunit,
file=
'INTpos.txt'//str1//
'i'//str2)
261 write(iunit,*) pstat_nptot, pstat_npt
263 write(iunit,*) il, (pstat_int_pts(jl,il),jl=1,ldim)
292 parameter(test=6.54321)
311 il = lx1*ly1*lz1*nelt
312 lx = glmax(xm1,il) - glmin(xm1,il)
313 ly = glmax(ym1,il) - glmin(ym1,il)
315 lz = glmax(zm1,il) - glmin(zm1,il)
326 rtmp = pstat_etime-pstat_stime
332 if (nid.eq.pid00)
then
337 if (ierr.ne.0)
goto 20
340 ftm=
"('#iv1',1x,i1,1x,"//
341 $
"1p,'(Re =',e17.9,') (Lx, Ly, Lz =',3e17.9,"//
342 $
"') (nelx, nely, nelz =',3i9,') (Polynomial order =',3i9,"//
343 $
"') (Nstat =',i9,') (start time =',e17.9,"//
344 $
"') (end time =',e17.9,') (effective average time =',e17.9,"//
345 $
"') (time step =',e17.9,') (nrec =',i9"//
346 $
"') (time interval =',e17.9,') (npoints =',i9,')')"
347 write(head,ftm) wdsize,
348 $ 1.0/param(2),lx,ly,lz,nlx,nly,nlz,lx1,ly1,lz1,
349 $ int_nvar,pstat_stime,pstat_etime,rtmp/iavfr,
350 $ rtmp/pstat_istepr,pstat_istepr/iavfr,rtmp,pstat_nptot
356 if (ierr.ne.0)
goto 20
381 $
'Error opening interpolation file in pstat_mfo_interp.')
386 $
'Error writing coordinates in pstat_mfo_interp.')
572 if (nid.eq.pid00)
then
577 $
'Error closing interpolation file in pstat_mfo_interp.')
596 integer mid,mp,nekcomm,nekgroup,nekreal
597 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
601 real int_field(fldim*lhis)
608 real rtmpv(lhis*ldim), rtmpv1(lhis*ldim), rtmp
609 real*4 rtmpv2(2*lhis*ldim)
610 equivalence(rtmpv1,rtmpv2)
620 call copy(rtmpv1,int_field,pstat_npt*fldim)
621 call byte_write(rtmpv2,pstat_npt*fldim*wdsl,ierr)
623 call copyx4(rtmpv2,int_field,pstat_npt*fldim)
628 npass = min(mp,pstat_nptot)
631 if (pstat_npt1.gt.0.and.jl.ge.pstat_npt1)
then
634 call csend(jl,itmp,isize,jl,kl)
635 call crecv2(jl,rtmpv,npts*fldim*wdsize,jl)
639 call copy(rtmpv1,rtmpv,npts*fldim)
642 call copyx4(rtmpv2,rtmpv,npts*fldim)
648 if (pstat_npt.gt.0)
then
649 call crecv2(nid,itmp,isize,0)
650 call csend(nid,int_field,pstat_npt*fldim*wdsize,0,itmp)
subroutine crecv2(mtype, buf, lenm, jnid)
subroutine csend(mtype, buf, len, jnid, jpid)
subroutine bcast(buf, len)
subroutine mntr_logi(mid, priority, logs, ivar)
Write log message adding single integer.
subroutine mntr_check_abort(mid, ierr, logs)
Abort simulation.
subroutine pstat3d_mfi_interp
Read interpolation points position and redistribute them.
subroutine pstat3d_mfo_interp
Geather data and write it down.
subroutine pstat3d_field_out(int_field, fldim, ierr)
Geather single field data and write it down.
subroutine pstat3d_mfo
Write field data data to the file.
subroutine copy4r(a, b, n)
subroutine copyx4(a, b, n)
subroutine outpost(v1, v2, v3, vp, vt, name3)