13 real*4 rout_pos(3 *lpm_lpart)
14 > ,rout_sln(lpm_lrs*lpm_lpart)
15 > ,rout_lrp(lpm_lrp*lpm_lpart)
16 > ,rout_lip(3 *lpm_lpart)
18 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
20 real tcoef(3,3),dt_cmt,time_cmt
21 common /timestepcoef/ tcoef,dt_cmt,time_cmt
26 character (len = *) filein1
38 integer vtu,vtu1,prevs(2,np)
40 integer*8 idisp_pos,idisp_sln,idisp_lrp,idisp_lip,disp
61 if_pos = 3 *isize*npt_total
62 if_sln = lpm_lrs*isize*npt_total
63 if_lrp = lpm_lrp*isize*npt_total
64 if_lip = 3 *isize*npt_total
69 open(unit=vtu,
file=filein1,access=
'stream',form=
"unformatted")
75 if (dum_read ==
'_') ifound = ifound + 1
76 if (ifound .eq. 2)
then
84 npt_total = npt_total/isize/3
88 call bcast(npt_total,isize)
90 idisp_pos = ivtu_size + isize*(1)
91 idisp_sln = ivtu_size + isize*(3 *npt_total + 2)
92 idisp_lrp = ivtu_size + isize*(3 *npt_total + lpm_lrs*npt_total
94 idisp_lip = ivtu_size + isize*(3 *npt_total + lpm_lrs*npt_total
95 > + lpm_lrp*npt_total + 4)
97 npmax = min(npt_total/lpm_lpart+1,mp)
99 if (nid .le. npmax-1 .and. nid. ne. 0) stride_len = nid*lpm_lpart
102 if (nid .gt. npmax-1) npart = 0
104 ndiff = npt_total - (npmax-1)*lpm_lpart
105 if (nid .eq. npmax-1) npart = ndiff
107 idisp_pos = idisp_pos + isize*3 *stride_len
108 idisp_sln = idisp_sln + isize*lpm_lrs*stride_len
109 idisp_lrp = idisp_lrp + isize*lpm_lrp*stride_len
110 idisp_lip = idisp_lip + isize*3 *stride_len
113 icount_sln = npart*lpm_lrs
114 icount_lrp = npart*lpm_lrp
141 lpm_y(jx,i) = rout_pos(ic_pos)
143 lpm_y(jy,i) = rout_pos(ic_pos)
146 lpm_y(jz,i) = rout_pos(ic_pos)
154 lpm_y(j,i) = rout_sln(ic_sln)
159 lpm_rprop(j,i) = rout_lrp(ic_lrp)
163 lpm_iprop(5,i) = int(rout_lip(ic_lip))
165 lpm_iprop(6,i) = int(rout_lip(ic_lip))
167 lpm_iprop(7,i) = int(rout_lip(ic_lip))
185 real*4 rout_pos(3 *lpm_lpart)
186 > ,rout_sln(lpm_lrs*lpm_lpart)
187 > ,rout_lrp(lpm_lrp*lpm_lpart)
188 > ,rout_lip(3 *lpm_lpart)
190 real tcoef(3,3),dt_cmt,time_cmt
191 common /timestepcoef/ tcoef,dt_cmt,time_cmt
196 character filein1*(*)
199 character*13 vtufile1
207 integer vtu,vtu1,prevs(2,np)
209 integer*8 idisp_pos,idisp_sln,idisp_lrp,idisp_lip
223 if (if_sz .lt. 3)
then
226 write(filein,
'(A3)') filein1
234 if_pos = 3 *isize*npt_total
235 if_sln = lpm_lrs*isize*npt_total
236 if_lrp = lpm_lrp*isize*npt_total
237 if_lip = 3 *isize*npt_total
246 rout_pos(ic_pos) = lpm_y(jx,i)
248 rout_pos(ic_pos) = lpm_y(jy,i)
251 rout_pos(ic_pos) = lpm_y(jz,i)
254 rout_pos(ic_pos) = 0.0
259 rout_sln(ic_sln) = lpm_y(j,i)
264 rout_lrp(ic_lrp) = lpm_rprop(j,i)
268 rout_lip(ic_lip) = lpm_iprop(5,i)
270 rout_lip(ic_lip) = lpm_iprop(6,i)
272 rout_lip(ic_lip) = lpm_iprop(7,i)
288 call fgslib_crystal_ituple_transfer(i_cr_hndl,prevs,
290 call fgslib_crystal_ituple_sort(i_cr_hndl,prevs,
291 > ndum,nnp,nglob,nkey)
296 stride_len = stride_len + prevs(2,i)
303 write(vtufile,
'(A3,I5.5,A4)') filein,icalld1,
'.vtu'
308 open(unit=vtu,
file=vtufile,status=
'replace')
313 write(vtu,
'(A)',advance=
'no')
'<VTKFile '
314 write(vtu,
'(A)',advance=
'no')
'type="UnstructuredGrid" '
315 write(vtu,
'(A)',advance=
'no')
'version="1.0" '
316 if (iobig .eq. 0)
then
317 write(vtu,
'(A)',advance=
'yes')
'byte_order="LittleEndian">'
318 elseif (iobig .eq. 1)
then
319 write(vtu,
'(A)',advance=
'yes')
'byte_order="BigEndian">'
322 write(vtu,
'(A)',advance=
'yes')
' <UnstructuredGrid>'
324 write(vtu,
'(A)',advance=
'yes')
' <FieldData>'
325 write(vtu,
'(A)',advance=
'no')
' <DataArray '
326 write(vtu,
'(A)',advance=
'no')
'type="Float32" '
327 write(vtu,
'(A)',advance=
'no')
'Name="TIME" '
328 write(vtu,
'(A)',advance=
'no')
'NumberOfTuples="1" '
329 write(vtu,
'(A)',advance=
'no')
'format="ascii"> '
330 write(vtu,
'(E14.7)',advance=
'no') time
331 write(vtu,
'(A)',advance=
'yes')
' </DataArray> '
332 write(vtu,
'(A)',advance=
'no')
' <DataArray '
333 write(vtu,
'(A)',advance=
'no')
'type="Int32" '
334 write(vtu,
'(A)',advance=
'no')
'Name="CYCLE" '
335 write(vtu,
'(A)',advance=
'no')
'NumberOfTuples="1" '
336 write(vtu,
'(A)',advance=
'no')
'format="ascii"> '
337 write(vtu,
'(I0)',advance=
'no') istep
338 write(vtu,
'(A)',advance=
'yes')
' </DataArray> '
340 write(vtu,
'(A)',advance=
'yes')
' </FieldData>'
341 write(vtu,
'(A)',advance=
'no')
' <Piece '
342 write(vtu,
'(A)',advance=
'no')
'NumberOfPoints="'
343 write(vtu,
'(I0)',advance=
'no') npt_total
344 write(vtu,
'(A)',advance=
'yes')
'" NumberOfCells="0"> '
350 write(vtu,
'(A)',advance=
'yes')
' <Points>'
352 iint = iint + 3 *isize*npt_total + isize
353 write(vtu,
'(A)',advance=
'yes')
' </Points>'
358 write(vtu,
'(A)',advance=
'yes')
' <PointData>'
361 iint = iint + lpm_lrs*isize*npt_total + isize
364 iint = iint + lpm_lrp*isize*npt_total + isize
367 iint = iint + 3*isize*npt_total + isize
369 write(vtu,
'(A)',advance=
'yes')
' </PointData> '
374 write(vtu,
'(A)',advance=
'yes')
' <Cells> '
375 write(vtu,
'(A)',advance=
'no')
' <DataArray '
376 write(vtu,
'(A)',advance=
'no')
'type="Int32" '
377 write(vtu,
'(A)',advance=
'no')
'Name="connectivity" '
378 write(vtu,
'(A)',advance=
'yes')
'format="ascii"/> '
379 write(vtu,
'(A)',advance=
'no')
' <DataArray '
380 write(vtu,
'(A)',advance=
'no')
'type="Int32" '
381 write(vtu,
'(A)',advance=
'no')
'Name="offsets" '
382 write(vtu,
'(A)',advance=
'yes')
'format="ascii"/> '
383 write(vtu,
'(A)',advance=
'no')
' <DataArray '
384 write(vtu,
'(A)',advance=
'no')
'type="Int32" '
385 write(vtu,
'(A)',advance=
'no')
'Name="types" '
386 write(vtu,
'(A)',advance=
'yes')
'format="ascii"/> '
387 write(vtu,
'(A)',advance=
'yes')
' </Cells> '
388 write(vtu,
'(A)',advance=
'yes')
' </Piece> '
389 write(vtu,
'(A)',advance=
'yes')
' </UnstructuredGrid> '
394 write(vtu,
'(A)',advance=
'no')
' <AppendedData encoding="raw">'
397 open(unit=vtu,
file=vtufile,access=
'stream',form=
"unformatted"
398 > ,position=
'append')
402 inquire(
file=vtufile,size=ivtu_size)
405 call bcast(ivtu_size, isize)
408 idisp_pos = ivtu_size + isize*(3 *stride_len + 1)
409 idisp_sln = ivtu_size + isize*(3 *npt_total + lpm_lrs*stride_len
411 idisp_lrp = ivtu_size + isize*(3 *npt_total + lpm_lrs*npt_total
412 > + lpm_lrp*stride_len + 3)
413 idisp_lip = ivtu_size + isize*(3 *npt_total + lpm_lrs*npt_total
414 > + lpm_lrp*npt_total + 3*stride_len + 4 )
418 icount_sln = lpm_lrs*nxx
419 icount_lrp = lpm_lrp*nxx
426 open(unit=vtu,
file=vtufile,access=
'stream',form=
"unformatted"
427 > ,position=
'append')
444 open(unit=vtu,
file=vtufile,access=
'stream',form=
"unformatted"
445 > ,position=
'append')
460 open(unit=vtu,
file=vtufile,access=
'stream',form=
"unformatted"
461 > ,position=
'append')
476 open(unit=vtu,
file=vtufile,access=
'stream',form=
"unformatted"
477 > ,position=
'append')
490 open(unit=vtu,
file=vtufile,status=
'old',position=
'append')
492 write(vtu,
'(A)',advance=
'yes')
'</AppendedData>'
493 write(vtu,
'(A)',advance=
'yes')
'</VTKFile>'
505 character (len = *) dataname
508 write(vtu,
'(A)',advance=
'no')
' <DataArray '
509 write(vtu,
'(A)',advance=
'no')
'type="Float32" '
510 write(vtu,
'(A)',advance=
'no')
'Name="'
511 write(vtu,
'(A)',advance=
'no') dataname
512 write(vtu,
'(A)',advance=
'no')
'" NumberOfComponents="'
513 write(vtu,
'(I0)',advance=
'no') ncomp
514 write(vtu,
'(A)',advance=
'no')
'" format="append" '
515 write(vtu,
'(A)',advance=
'no')
'offset="'
516 write(vtu,
'(I0)',advance=
'no') idist
517 write(vtu,
'(A)',advance=
'yes')
'"/>'
532 parameter(lpm_lrf=3+lpm_lrp+lpm_lrs)
533 COMMON /lpm_rfpts_c/ lpm_rfpts
534 real*4 lpm_rfpts(lpm_lrf,lpm_lpart)
536 common /nekmpi/ mid,mp,nekcomm,nekgroup,nekreal
538 character*12 filename
542 integer vtu,vtu1,prevs(2,mp)
560 if (nid .eq. 0) icount = 1
568 call bcast(nptot, isize)
573 npmax = min(nptot/lpm_lpart+1,mp)
575 if (nid .le. npmax-1 .and. nid. ne. 0) stride_len = nid*lpm_lpart
578 if (nid .gt. npmax-1) nread = 0
580 ndiff = nptot - (npmax-1)*lpm_lpart
581 if (nid .eq. npmax-1) nread = ndiff
586 disp = isize + stride_len*lpm_lrf*isize
587 icount = nread*lpm_lrf
602 lpm_iprop(5,i) = int(lpm_rfpts(ic,ii))
604 lpm_iprop(6,i) = int(lpm_rfpts(ic,ii))
606 lpm_iprop(7,i) = int(lpm_rfpts(ic,ii))
610 lpm_y(j,i) = lpm_rfpts(ic,ii)
614 lpm_rprop(j,i) = lpm_rfpts(ic,ii)
subroutine byte_open_mpi(fnamei, mpi_fh, ifro, ierr)
subroutine byte_write_mpi(buf, icount, iorank, mpi_fh, ierr)
subroutine byte_read_mpi(buf, icount, iorank, mpi_fh, ierr)
subroutine byte_close_mpi(mpi_fh, ierr)
subroutine byte_set_view(ioff_in, mpi_fh)
subroutine bcast(buf, len)
real *8 function dnekclock_sync()
subroutine lpm_comm_crystal
subroutine lpm_comm_findpts
subroutine lpm_io_write(filein1, iobig)
subroutine lpm_io_read_restart(filename)
subroutine lpm_io_vtu_data(vtu, dataname, ncomp, idist)
subroutine lpm_io_read(filein1, npart)
subroutine iadd(i1, iscal, n)