34 xx_loc, yy_loc, zz_loc, cs_nnz_loc, cs_loc, U2, stress)
42 integer*4 :: nm, nel_loc, nn_loc, cs_nnz_loc, mpi_id, its
43 integer*4 :: ie, inode, nn, im
45 integer*4 :: ic1, ic2, ic3, ic4, ic5, ic6, ic7, ic8
47 integer*4,
dimension(nm) :: sdeg
48 integer*4,
dimension(nn_loc) :: loc_n_num
49 integer*4,
dimension(0:cs_nnz_loc) :: cs_loc
51 real*8,
dimension(nn_loc) :: xx_loc, yy_loc, zz_loc
52 real*8,
dimension(nn_loc*3) :: u2
53 real*8,
dimension(nn_loc*6) :: stress
55 character*70 :: file_nhe_proc, file_nhe_new, mpi_file
57 nel_loc = cs_loc(0) - 1
60 unit_mpi = 2500 + mpi_id
61 write(file_nhe_proc,
'(A10,I5.5,A1,I8.8,A4)')
'DIS_X_PROC', mpi_id,
'_', its,
'.vtk'
63 if(len_trim(mpi_file) .ne. 70)
then
64 file_nhe_new = mpi_file(1:len_trim(mpi_file)) //
'/' // file_nhe_proc
66 file_nhe_new = file_nhe_proc
70 open(unit_mpi,file=file_nhe_new,status=
'replace')
71 write(unit_mpi,
'(a)')
'# vtk DataFile Version 3.1'
72 write(unit_mpi,
'(a)')
'material model VTK file'
73 write(unit_mpi,
'(a)')
'ASCII'
74 write(unit_mpi,
'(a)')
'DATASET UNSTRUCTURED_GRID'
75 write(unit_mpi,
'(a,i12,a)')
'POINTS ', nn_loc,
' float'
79 write(unit_mpi,
'(3e20.12)') xx_loc(inode),yy_loc(inode),zz_loc(inode)
84 write(unit_mpi,
'(a,i12,i12)')
"CELLS ",nel_loc,nel_loc*9
86 im = cs_loc(cs_loc(ie -1) + 0 )
89 ic1 = cs_loc(cs_loc(ie -1) + nn*nn*(1 -1) + nn*(1 -1) + 1) - 1
90 ic2 = cs_loc(cs_loc(ie -1) + nn*nn*(1 -1) + nn*(1 -1) + nn) - 1
91 ic3 = cs_loc(cs_loc(ie -1) + nn*nn*(1 -1) + nn*(nn -1) + nn) - 1
92 ic4 = cs_loc(cs_loc(ie -1) + nn*nn*(1 -1) + nn*(nn -1) + 1) - 1
93 ic5 = cs_loc(cs_loc(ie -1) + nn*nn*(nn -1) + nn*(1 -1) + 1) - 1
94 ic6 = cs_loc(cs_loc(ie -1) + nn*nn*(nn -1) + nn*(1 -1) + nn) - 1
95 ic7 = cs_loc(cs_loc(ie -1) + nn*nn*(nn -1) + nn*(nn -1) + nn) - 1
96 ic8 = cs_loc(cs_loc(ie -1) + nn*nn*(nn -1) + nn*(nn -1) + 1) - 1
98 write(unit_mpi,
'(9i12)') 8, ic1, ic2, ic3, ic4, ic5, ic6, ic7, ic8
103 write(unit_mpi,
'(a,i12)')
"CELL_TYPES ",nel_loc
104 write(unit_mpi,
'(6i12)') (12,ie=1,nel_loc)
108 write(unit_mpi,
'(a,i12)')
"POINT_DATA ",nn_loc
111 write(unit_mpi,
'(a)')
"SCALARS stress_xy float"
112 write(unit_mpi,
'(a)')
"LOOKUP_TABLE default"
115 write(unit_mpi,*) stress(6*(inode -1) +4)
subroutine write_vtk_volume_timeseries(its, mpi_id, nn_loc, loc_n_num, nm, sdeg, xx_loc, yy_loc, zz_loc, cs_nnz_loc, cs_loc, u2, stress)
...Writing VTK file to visualise in Paraview