12 INTEGER,
PRIVATE :: global_cnt
13 INTEGER,
PRIVATE :: local_cnt
40 CHARACTER(len=*),
INTENT(in) :: NAME
41 DOUBLE PRECISION,
INTENT(in) :: DATA(:)
52 IF(is_nonexistent(lc)) cycle
54 IF(is_ghost(lc) .OR. is_entering_ghost(lc) .OR. is_exiting_ghost
55 WRITE(
des_unit, 1001,advance=
"NO")
real(data(lc))
66 IF(mype == pe_io)
THEN 78 1000
FORMAT(
'<DataArray type="Float32" Name="',a,
'" format="ascii">')
79 1001
FORMAT(es14.6,1x)
80 1002
FORMAT(
'</DataArray>')
93 CHARACTER(len=*),
INTENT(in) :: NAME
94 DOUBLE PRECISION,
INTENT(in) :: DATA(:,:)
96 DOUBLE PRECISION,
ALLOCATABLE :: ltemp_array(:,:)
98 CHARACTER(len=16) :: NOC
100 INTEGER :: PC, LC1, LC2
104 noc=
'';
WRITE(noc,*) (ub-lb)+1
108 WRITE(
des_unit,1000) name, trim(adjustl(noc))
113 IF(is_nonexistent(lc1)) cycle
115 IF(is_ghost(lc1) .OR. is_entering_ghost(lc1) .OR. is_exiting_ghost
117 WRITE(
des_unit,1001,advance=
"NO")
real(data(lc1,lc2))
126 allocate (ltemp_array((ub-lb)+1,global_cnt))
133 IF(mype == pe_io)
THEN 134 WRITE(
des_unit,1000) name, trim(adjustl(noc))
138 real(ltemp_array(lc2,lc1))
149 1000
FORMAT(
'<DataArray type="Float32" Name="',a,
'" NumberOf', &
150 'Components="',a,
'" format="ascii">')
151 1001
FORMAT(es14.6,1x)
152 1002
FORMAT(
'</DataArray>')
167 CHARACTER(len=*),
INTENT(in) :: NAME
168 INTEGER,
INTENT(in) :: DATA(:)
179 IF(is_nonexistent(lc)) cycle
181 IF(is_ghost(lc) .OR. is_entering_ghost(lc) .OR. is_exiting_ghost
182 WRITE(
des_unit, 1001,advance=
"NO")
DATA(lc)
193 IF(mype == pe_io)
THEN 205 1000
FORMAT(
'<DataArray type="Float32" Name="',a,
'" format="ascii">')
207 1002
FORMAT(
'</DataArray>')
220 CHARACTER(len=*),
INTENT(in) :: ELEMENT
240 use discretelement
, only: vtp_dir
245 CHARACTER(len=*) :: NoPc
247 INTEGER :: NumberOfPoints
250 integer lgathercnts(0:numpes-1), lproc
258 LOGICAL :: EXISTS_VTP
260 CHARACTER(LEN=8) :: STATUS_VTP
262 IF(trim(vtp_dir)/=
'.')
CALL create_dir(trim(vtp_dir))
267 local_cnt = pip - ighost_cnt
271 numberofpoints = local_cnt
272 WRITE(nopc,
"(I10.10)") numberofpoints
274 IF(trim(vtp_dir)/=
'.')
THEN 275 WRITE(
fname_vtp,
'(A,"/",A,"_DES",I4.4,"_",I5.5,".vtp")') &
276 trim(vtp_dir), trim(
run_name), vtp_findex, mype
278 WRITE(
fname_vtp,
'(A,"_DES",I4.4,"_",I5.5,".vtp")') &
287 numberofpoints = global_cnt
288 WRITE(nopc,
"(I10.10)") numberofpoints
295 lgathercnts(mype) = local_cnt
300 DO lproc = 1,numpes-1
305 IF(trim(vtp_dir)/=
'.')
THEN 306 WRITE(
fname_vtp,
'(A,"/",A,"_DES_",I5.5,".vtp")') &
307 trim(vtp_dir),trim(
run_name), vtp_findex
309 WRITE(
fname_vtp,
'(A,"_DES_",I5.5,".vtp")') &
315 IF(
bdist_io .OR. mype == pe_io)
THEN 328 status_vtp =
'REPLACE' 335 status=status_vtp, iostat=ios)
348 1100
FORMAT(
'Error 1100: Unable to open VTP file. This could be ', &
349 'caused by a VTP',/
'file with the same file name already ', &
350 'existing. or an error code',/
' returned by the OPEN ', &
351 'function.'/
'Error code: ',i2,4x,
'Aborting.')
366 vtp_findex=vtp_findex+1
381 use discretelement
, only: vtp_dir
390 LOGICAL :: EXISTS_PVD
392 CHARACTER(LEN=256) INPUT
395 CHARACTER(LEN=64) :: FNAME_PVD =
'' 397 CHARACTER(LEN=64) :: cTIME =
'' 399 LOGICAL,
SAVE :: FIRST_PASS = .true.
415 fname_pvd = trim(
run_name)//
'_DES.pvd' 418 IF(mype == pe_io .AND. .NOT.
bdist_io)
THEN 421 INQUIRE(file=fname_pvd,exist=exists_pvd)
434 OPEN(unit=
pvd_unit,file=fname_pvd,status=
'NEW')
435 WRITE(
pvd_unit,
"(A)")
'<?xml version="1.0"?>' 436 WRITE(
pvd_unit,
"(A)")
'<VTKFile type="Collection" & 437 &version="0.1" byte_order="LittleEndian">' 438 WRITE(
pvd_unit,
"(3X,'<Collection>')")
447 position=
"REWIND",status=
'OLD',iostat=ios)
460 READ(
pvd_unit,
"(A)",iostat=ios)input
471 idx_f = index(input,
'file="')
472 idx_b = index(input,
'"/>')
474 IF(idx_f == 0 .AND. idx_b == 0) cycle
476 WRITE (input,
"(A)") input(idx_f+6:idx_b-1)
489 position=
"APPEND",status=
'OLD',iostat=ios)
490 IF (ios /= 0) ier = 2
499 CASE(1);
WRITE(
err_msg,1101) trim(fname_pvd)
500 CASE(2);
WRITE(
err_msg,1102) trim(fname_pvd)
501 CASE(3);
WRITE(
err_msg,1103) trim(fname_pvd)
502 CASE(4);
WRITE(
err_msg,1104) trim(fname_pvd)
503 CASE DEFAULT;
WRITE(
err_msg,1105) trim(fname_pvd)
508 1101
FORMAT(
'Error 1101: A PVD file was detected in the run ', &
509 'directory which should',/
'not exist for a NEW run.',/ &
512 1102
FORMAT(
'Error 1102: Fatal error status returned while OPENING ', &
513 'PVD file.',/
'File: ', a)
515 1103
FORMAT(
'Error 1103: PVD file MISSING from run directory.',/ &
518 1104
FORMAT(
'Error 1104: Fatal error status returned while READING ', &
519 'PVD file.',/
'File: ', a)
521 1105
FORMAT(
'Error 1105:: Fatal unclassified error when processing ', &
522 'PVD file.',/
'File: ', a)
526 IF(mype == pe_io .AND. .NOT.
bdist_io)
THEN 529 IF(.NOT.first_pass)
THEN 534 WRITE(ctime,
"(F12.6)") s_time
536 WRITE(
pvd_unit,
"(6X,A,A,A,A,A,A,A)")&
537 '<DataSet timestep="',trim(adjustl(ctime)),
'" ',&
538 'group="" part="0" ',&
542 WRITE(
pvd_unit,
"(3X,A)")
'</Collection>' 587 INTEGER :: WRITE_HEADER = 1
588 INTEGER :: WRITE_DATA = 2
594 IF(.NOT.vtk_defined(vtk_region))
RETURN 596 IF(vtk_data(lcv)/=
'P')
RETURN 610 DO pass=write_header,write_data
615 IF(vtk_part_diameter(vtk_region)) &
618 IF(vtk_part_vel(vtk_region)) &
621 IF(vtk_part_angular_vel(vtk_region)) &
624 IF(particle_orientation)
THEN 625 IF(vtk_part_orientation(vtk_region)) &
629 DO n=1, des_usr_var_size
630 IF(vtk_part_usr_var(vtk_region,n)) &
634 IF(energy_eq.AND.vtk_part_temp(vtk_region)) &
637 IF(any_species_eq)
THEN 638 DO n=1, dimension_n_s
639 IF(vtk_part_x_s(vtk_region,n)) &
644 IF(use_cohesion.AND.vtk_part_cohesion(vtk_region)) &
656 call mpi_barrier(mpi_comm_world,mpierr)
660 IF (mype == pe_io.AND.time_dependent_filename)
THEN 661 OPEN(convert=
'BIG_ENDIAN',unit = vtu_frame_unit, file = trim(vtu_frame_filename
662 DO l = 1, dimension_vtk
663 IF(vtk_defined(l))
WRITE(vtu_frame_unit,*) l,frame(l)
665 CLOSE(vtu_frame_unit)
668 IF (
full_log.AND.mype == pe_io)
WRITE(*,20)
' DONE.' 700 LOGICAL :: VTU_FRAME_FILE_EXISTS, NEED_TO_WRITE_VTP
701 INTEGER :: ISTAT,BUFF1,BUFF2,L
707 need_to_write_vtp = (local_cnt>0)
709 need_to_write_vtp = (mype==0.AND.global_cnt>0)
713 IF (mype /= pe_io.AND.(.NOT.
bdist_io))
RETURN 715 IF(time_dependent_filename)
THEN 716 INQUIRE(file=vtu_frame_filename,exist=vtu_frame_file_exists)
717 IF(vtu_frame_file_exists)
THEN 718 OPEN(convert=
'BIG_ENDIAN',unit = vtu_frame_unit, file = trim
719 DO l = 1, dimension_vtk
720 IF(vtk_defined(l))
THEN 721 READ(vtu_frame_unit,*)buff1,buff2
725 CLOSE(vtu_frame_unit)
727 IF(reset_frame_at_time_zero.AND.
time==
zero)
THEN 728 DO l = 1, dimension_vtk
729 IF(l==vtk_region) frame(l)=-1
732 DO l = 1, dimension_vtk
733 IF(l==vtk_region) frame(l) = frame(l) + 1
739 IF (local_cnt>0)
THEN 740 IF(time_dependent_filename.AND.mode==0)
THEN 747 IF(mype.EQ.pe_io)
THEN 748 IF(time_dependent_filename.AND.mode==0)
THEN 758 IF (need_to_write_vtp)
THEN 765 WRITE(*,10,advance=
'NO')
' WRITING VTP FILE : ', trim(
vtu_filename' .' 767 IF(mype==pe_io)
WRITE(*,15,advance=
'NO')
' EACH PROCESOR IS WRITING ITS OWN VTP FILE.' 773 IF (need_to_write_vtp)
THEN 776 OPEN(convert=
'BIG_ENDIAN',unit =
vtu_unit, &
778 form =
'UNFORMATTED', &
793 1001
FORMAT(/1x,70(
'*')//,
' From: OPEN_VTP_FILE',/,
' Message: ',
794 'Error opening vtp file. Terminating run.',/10x, &
795 'File name: ',a,/10x,
796 'VTP_UNIT : ',i4, /10x,
797 'PLEASE VERIFY THAT VTU_DIR EXISTS: ', a, &
802 buffer=
'<?xml version="1.0"?>' 803 WRITE(
vtu_unit)trim(buffer)//end_rec
805 WRITE(buffer,*)
'<!-- Time =',
time,
' sec. -->' 806 WRITE(
vtu_unit)trim(buffer)//end_rec
808 buffer=
'<VTKFile type="PolyData" version="0.1" byte_order="BigEndian">' 809 WRITE(
vtu_unit)trim(buffer)//end_rec
812 WRITE(
vtu_unit)trim(buffer)//end_rec
819 IF (mype == pe_io.AND.
bdist_io.AND.global_cnt>0)
THEN 821 IF(time_dependent_filename.AND.mode==0)
THEN 822 WRITE(pvtu_filename,40) trim(
vtk_filebase(vtk_region)),frame
827 IF(trim(
vtu_dir)/=
'.') pvtu_filename=
'./'//trim(
vtu_dir)//
'/'//pvtu_filename
829 OPEN(convert=
'BIG_ENDIAN',unit = pvtu_unit, file = trim(pvtu_filename
831 WRITE(pvtu_unit,100)
'<?xml version="1.0"?>' 832 WRITE(pvtu_unit,110)
'<!-- Time =',
time,
' sec. -->' 833 WRITE(pvtu_unit,120)
'<VTKFile type="PPolyData"',&
834 ' version="0.1" byte_order="BigEndian">' 836 WRITE(pvtu_unit,100)
' <PPolyData GhostLevel="0">' 837 WRITE(pvtu_unit,100)
' <PPoints>' 838 WRITE(pvtu_unit,100)
' <PDataArray type="Float32" Name="coordinates" NumberOfComponents="3" & 839 &format="appended" offset=" 0" />' 840 WRITE(pvtu_unit,100)
' </PPoints>' 841 WRITE(pvtu_unit,100)
'' 842 WRITE(pvtu_unit,100)
' <PPointData Scalars="Diameter" Vectors="Velocity">' 847 110
FORMAT(a,e14.7,a)
851 20
FORMAT(a,
"_",i4.4,
"_",i5.5,
".vtp")
852 25
FORMAT(a,
"_",i5.5,
".vtp")
853 30
FORMAT(a,
"_",i4.4,
".vtp")
855 40
FORMAT(a,
"_",i4.4,
".pvtp")
882 REAL(c_float) :: float
883 INTEGER(c_int) :: int
885 INTEGER :: nbytes_vector
886 INTEGER :: offset_xyz
889 INTEGER :: WRITE_HEADER = 1
890 INTEGER :: WRITE_DATA = 2
892 DOUBLE PRECISION,
ALLOCATABLE :: ltemp_array(:,:)
893 DOUBLE PRECISION,
ALLOCATABLE :: gtemp_array(:,:)
896 INTEGER :: PC, LC1, LC2
922 IF(pass==write_header)
THEN 923 IF(mype == pe_io)
THEN 926 '" NumberOfVerts="0" NumberOfLines ="0" NumberOfStrips="0" NumberOfPolys="0" >' 929 WRITE(
buffer,*)
' <Points>' 932 WRITE(
buffer,*)
' <DataArray type="Float32" Name="coordinates" NumberOfComponents="3" & 933 &format="appended" offset="',offset_xyz
'" />' 936 WRITE(
buffer,*)
' </Points>' 939 WRITE(
buffer,*)
'<PointData Scalars="Diameter" Vectors="Velocity"> ' 943 vtu_offset = offset_xyz + sizeof(int) + nbytes_vector
947 ELSEIF(pass==write_data)
THEN 949 IF(mype == pe_io)
THEN 951 WRITE(
buffer,*)
' </PointData>' 954 WRITE(
buffer,*)
' <Verts> </Verts>' 957 WRITE(
buffer,*)
' <Lines> </Lines>' 960 WRITE(
buffer,*)
' <Strips> </Strips>' 963 WRITE(
buffer,*)
' <Polys> </Polys>' 966 WRITE(
buffer,*)
' </Piece>' 969 WRITE(
buffer,*)
' </PolyData>' 972 WRITE(
buffer,*)
' <AppendedData encoding="raw">' 987 lb = lbound(des_pos_new,2)
988 ub = ubound(des_pos_new,2)
992 ALLOCATE (ltemp_array((ub-lb)+1,local_cnt))
993 ALLOCATE (gtemp_array((ub-lb)+1,global_cnt))
1001 ltemp_array(lc2,pc) = des_pos_new(lc1,lc2)
1004 IF(pc==local_cnt)
EXIT 1009 dprocbuf(1:local_cnt)=ltemp_array(lc1,1:local_cnt)
1015 IF(mype == pe_io)
THEN 1016 DO lc1=1, global_cnt
1018 WRITE(
vtu_unit)
real(gtemp_array(lc2,lc1))
1029 ELSEIF(
bdist_io.AND.local_cnt>0)
THEN 1031 IF(local_cnt==0)
RETURN 1043 IF(pass==write_header)
THEN 1046 '" NumberOfVerts="0" NumberOfLines ="0" NumberOfStrips="0" NumberOfPolys="0" >' 1049 WRITE(
buffer,*)
' <Points>' 1052 WRITE(
buffer,*)
' <DataArray type="Float32" Name="coordinates" NumberOfComponents="3" & 1053 &format="appended" offset="',offset_xyz
'" />' 1056 WRITE(
buffer,*)
' </Points>' 1059 WRITE(
buffer,*)
'<PointData Scalars="Diameter" Vectors="Velocity"> ' 1063 vtu_offset = offset_xyz + sizeof(int) + nbytes_vector
1066 ELSEIF(pass==write_data)
THEN 1068 WRITE(
buffer,*)
' </PointData>' 1071 WRITE(
buffer,*)
' <Verts> </Verts>' 1074 WRITE(
buffer,*)
' <Lines> </Lines>' 1077 WRITE(
buffer,*)
' <Strips> </Strips>' 1080 WRITE(
buffer,*)
' <Polys> </Polys>' 1083 WRITE(
buffer,*)
' </Piece>' 1086 WRITE(
buffer,*)
' </PolyData>' 1089 WRITE(
buffer,*)
' <AppendedData encoding="raw">' 1100 lb = lbound(des_pos_new,2)
1101 ub = ubound(des_pos_new,2)
1103 ALLOCATE (ltemp_array((ub-lb)+1,local_cnt))
1111 ltemp_array(lc2,pc) = des_pos_new(lc1,lc2)
1114 IF(pc==local_cnt)
EXIT 1121 WRITE(
vtu_unit)
real(ltemp_array(lc2,lc1))
1125 deallocate (ltemp_array)
1158 CHARACTER (*) :: VAR_NAME
1159 DOUBLE PRECISION,
INTENT(in) :: VAR(:)
1161 REAL(c_float) :: float
1163 INTEGER :: nbytes_scalar
1166 INTEGER :: WRITE_HEADER = 1
1167 INTEGER :: WRITE_DATA = 2
1172 nbytes_scalar = global_cnt * sizeof(float)
1174 IF(pass==write_header)
THEN 1177 DO i = 1,len_trim(var_name)
1178 IF(var_name(i:i) ==
' ') var_name(i:i) =
'_' 1182 WRITE(buffer,90)
' <DataArray type="Float32" Name="',
1183 '" format="appended" offset="',vtu_offset
'" />' 1184 WRITE(vtu_unit)trim(buffer)//
end_rec 1187 vtu_offset = vtu_offset + sizeof(float) + nbytes_scalar
1190 ELSEIF(pass==write_data)
THEN 1202 IF(pc==local_cnt)
EXIT 1210 WRITE(vtu_unit) nbytes_scalar
1212 IF(mype == pe_io)
THEN 1213 DO lc1=1, global_cnt
1214 WRITE(vtu_unit)
real(
drootbuf(lc1))
1224 ELSEIF(
bdist_io.AND.local_cnt>0)
THEN 1227 nbytes_scalar = local_cnt * sizeof(float)
1230 DO i = 1,len_trim(var_name)
1231 IF(var_name(i:i) ==
' ') var_name(i:i) =
'_' 1234 IF(pass==write_header)
THEN 1237 WRITE(buffer,90)
' <DataArray type="Float32" Name="',
1238 '" format="appended" offset="',vtu_offset
'" />' 1239 WRITE(vtu_unit)trim(buffer)//
end_rec 1242 vtu_offset = vtu_offset + sizeof(float) + nbytes_scalar
1245 ELSEIF(pass==write_data)
THEN 1256 IF(pc==local_cnt)
EXIT 1261 WRITE(vtu_unit) nbytes_scalar
1264 WRITE(vtu_unit)
real(
dprocbuf(lc1))
1269 IF (mype == pe_io)
THEN 1270 WRITE(pvtu_unit,90)
' <PointArray type="Float32" Name="' 1271 '" format="appended" offset="',vtu_offset
'" />' 1281 IF (pass==write_data.AND.
full_log.AND.mype == pe_io)
WRITE(*,10,advance
'NO''.' 1284 90
FORMAT(a,a,a,i12,a)
1312 CHARACTER (*) :: VAR_NAME
1313 DOUBLE PRECISION,
INTENT(in) :: VAR(:,:)
1315 REAL(c_float) :: float
1317 INTEGER :: nbytes_vector
1320 INTEGER :: WRITE_HEADER = 1
1321 INTEGER :: WRITE_DATA = 2
1323 DOUBLE PRECISION,
ALLOCATABLE :: ltemp_array(:,:)
1324 DOUBLE PRECISION,
ALLOCATABLE :: gtemp_array(:,:)
1327 INTEGER :: PC, LC1, LC2
1332 nbytes_vector = global_cnt * 3 * sizeof(float)
1334 IF(pass==write_header)
THEN 1337 WRITE(buffer,90)
' <DataArray type="Float32" Name="',
1338 '" NumberOfComponents="3" format="appended" offset="''" />' 1339 WRITE(vtu_unit)trim(buffer)//
end_rec 1342 vtu_offset = vtu_offset + sizeof(float) + nbytes_vector
1345 ELSEIF(pass==write_data)
THEN 1352 ALLOCATE (ltemp_array((ub-lb)+1,local_cnt))
1353 ALLOCATE (gtemp_array((ub-lb)+1,global_cnt))
1361 ltemp_array(lc2,pc) = var(lc1,lc2)
1364 IF(pc==local_cnt)
EXIT 1370 dprocbuf(1:local_cnt)=ltemp_array(lc1,1:local_cnt)
1376 IF(mype == pe_io)
THEN 1377 WRITE(vtu_unit) nbytes_vector
1378 DO lc1=1, global_cnt
1380 WRITE(vtu_unit)
real(gtemp_array(lc2,lc1))
1392 ELSEIF(
bdist_io.AND.local_cnt>0)
THEN 1395 nbytes_vector = local_cnt * 3 * sizeof(float)
1397 IF(pass==write_header)
THEN 1400 WRITE(buffer,90)
' <DataArray type="Float32" Name="',
1401 '" NumberOfComponents="3" format="appended" offset="''" />' 1402 WRITE(vtu_unit)trim(buffer)//
end_rec 1405 vtu_offset = vtu_offset + sizeof(float) + nbytes_vector
1408 ELSEIF(pass==write_data)
THEN 1413 ALLOCATE (ltemp_array((ub-lb)+1,local_cnt))
1421 ltemp_array(lc2,pc) = var(lc2,lc1)
1424 IF(pc==local_cnt)
EXIT 1429 WRITE(vtu_unit) nbytes_vector
1432 WRITE(vtu_unit)
real(ltemp_array(lc2,lc1))
1436 deallocate (ltemp_array)
1439 IF (mype == pe_io)
THEN 1440 WRITE(pvtu_unit,90)
' <PointArray type="Float32" Name="' 1441 '" NumberOfComponents="3" format="appended" offset="''" />' 1450 IF (pass==write_data.AND.
full_log.AND.mype == pe_io)
WRITE(*,10,advance
'NO''.' 1453 90
FORMAT(a,a,a,i12,a)
1481 CHARACTER (LEN=32) :: VTU_NAME
1482 INTEGER,
DIMENSION(0:numPEs-1) :: ALL_PART_CNT
1491 WRITE(buffer,110)
' </AppendedData>' 1492 WRITE(vtu_unit)end_rec//trim(buffer)//end_rec
1494 WRITE(buffer,110)
'</VTKFile>' 1495 WRITE(vtu_unit)trim(buffer)//end_rec
1506 IF (mype == pe_io.AND.global_cnt>0)
THEN 1507 WRITE(pvtu_unit,100)
' </PPointData>' 1510 IF(all_part_cnt(n)>0)
THEN 1511 IF(time_dependent_filename.AND.mode==0)
THEN 1517 WRITE(pvtu_unit,110)
' <Piece Source="',trim(vtu_name
'"/>' 1522 WRITE(pvtu_unit,100)
' </PPolyData>' 1523 WRITE(pvtu_unit,100)
'</VTKFile>' 1528 20
FORMAT(a,
"_",i4.4,
"_",i5.5,
".vtp")
1529 25
FORMAT(a,
"_",i5.5,
".vtp")
1562 USE discretelement
, only: max_pip,pip,des_pos_new
1567 INTEGER :: NXS,NYS,NZS,NS
1568 INTEGER :: X_SLICE(dim_i),Y_SLICE(dim_j),Z_SLICE(dim_k)
1569 DOUBLE PRECISION :: XE,XW,YS,YN,ZB,ZT
1570 DOUBLE PRECISION :: XP,YP,ZP,XP1,YP1,ZP1,XP2,YP2,ZP2,R
1572 DOUBLE PRECISION :: SLICE_TOL
1573 LOGICAL :: KEEP_XDIR,KEEP_YDIR,KEEP_ZDIR
1576 integer lgathercnts(0:numpes-1), lproc
1578 CHARACTER(LEN=1) :: SELECT_PARTICLE_BY
1581 xe = vtk_x_e(vtk_region)
1582 xw = vtk_x_w(vtk_region)
1583 ys = vtk_y_s(vtk_region)
1584 yn = vtk_y_n(vtk_region)
1585 zb = vtk_z_b(vtk_region)
1586 zt = vtk_z_t(vtk_region)
1588 nxs = vtk_nxs(vtk_region)
1589 nys = vtk_nys(vtk_region)
1590 nzs = vtk_nzs(vtk_region)
1592 slice_tol = vtk_slice_tol(vtk_region)
1594 select_particle_by = vtk_select_mode(vtk_region)
1598 x_slice(ns) = xw + (xe-xw)/(nxs-1)*(ns-1)
1602 y_slice(ns) = ys + (yn-ys)/(nys-1)*(ns-1)
1606 z_slice(ns) = zb + (zt-zb)/(nzs-1)*(ns-1)
1623 IF(is_nonexistent(lc1)) cycle
1625 IF(is_ghost(lc1) .OR. is_entering_ghost(lc1) .OR. is_exiting_ghost
1627 SELECT CASE(select_particle_by)
1630 xp = des_pos_new(lc1,1)
1631 yp = des_pos_new(lc1,2)
1632 zp = des_pos_new(lc1,3)
1637 IF(xw<=xp.AND.xp<=xe) keep_xdir=.true.
1640 IF((x_slice(ns)-slice_tol)<=xp.AND.xp<=(x_slice(ns)
1647 IF(ys<=yp.AND.yp<=yn) keep_ydir=.true.
1650 IF((y_slice(ns)-slice_tol)<=yp.AND.yp<=(y_slice(ns)
1657 IF(zb<=zp.AND.zp<=zt) keep_zdir=.true.
1660 IF((z_slice(ns)-slice_tol)<=zp.AND.zp<=(z_slice(ns)
1669 xp1 = des_pos_new(lc1,1) - r
1670 yp1 = des_pos_new(lc1,2) - r
1671 zp1 = des_pos_new(lc1,3) - r
1673 xp2 = des_pos_new(lc1,1) + r
1674 yp2 = des_pos_new(lc1,2) + r
1675 zp2 = des_pos_new(lc1,3) + r
1680 IF(xw<=xp1.AND.xp2<=xe) keep_xdir=.true.
1683 IF((x_slice(ns)-slice_tol)<=xp1.AND.xp2<=(x_slice(ns
1690 IF(ys<=yp1.AND.yp2<=yn) keep_ydir=.true.
1693 IF((y_slice(ns)-slice_tol)<=yp1.AND.yp2<=(y_slice(ns
1700 IF(zb<=zp1.AND.zp2<=zt) keep_zdir=.true.
1703 IF((z_slice(ns)-slice_tol)<=zp1.AND.zp2<=(z_slice(ns
1712 xp1 = des_pos_new(lc1,1) - r
1713 yp1 = des_pos_new(lc1,2) - r
1714 zp1 = des_pos_new(lc1,3) - r
1716 xp2 = des_pos_new(lc1,1) + r
1717 yp2 = des_pos_new(lc1,2) + r
1718 zp2 = des_pos_new(lc1,3) + r
1723 IF(.NOT.(xe<=xp1.OR.xp2<=xw)) keep_xdir=.true.
1726 IF(.NOT.((x_slice(ns)+slice_tol)<=xp1.OR.xp2<=(x_slice
1733 IF(.NOT.(yn<=yp1.OR.yp2<=ys)) keep_ydir=.true.
1736 IF(.NOT.((y_slice(ns)+slice_tol)<=yp1.OR.yp2<=(y_slice
1743 IF(.NOT.(zt<=zp1.OR.zp2<=zb)) keep_zdir=.true.
1746 IF(.NOT.((z_slice(ns)+slice_tol)<=zp1.OR.zp2<=(z_slice
1752 print*,
'should not be here' 1756 IF(keep_xdir.AND.keep_ydir.AND.keep_zdir)
THEN 1758 local_cnt = local_cnt + 1
1773 lgathercnts(mype) = local_cnt
1778 DO lproc = 1,numpes-1
character(len=255) vtu_filename
double precision, dimension(dimension_vtk) vtk_slice_tol
subroutine vtp_write_i1(NAME, DATA)
logical, dimension(dimension_vtk) vtk_defined
logical, dimension(dimension_vtk) vtk_part_vel
integer, dimension(:), allocatable igathercnts
character(len=255) vtu_dir
subroutine vtp_write_dp2(NAME, DATA)
subroutine write_geometry_in_vtp_bin(PASS)
subroutine vtp_open_file(NoPc)
character(len=32) function ivar(VAR, i1, i2, i3)
logical time_dependent_filename
subroutine write_scalar_in_vtp_bin(VAR_NAME, VAR, PASS)
subroutine update_and_close_pvd_file
double precision, dimension(:), allocatable des_t_s
logical, dimension(dimension_vtk) vtk_dbg_file
double precision, dimension(:), allocatable dprocbuf
subroutine write_vtp_file(LCV, MODE)
double precision, dimension(dimension_vtk) vtk_x_e
logical reset_frame_at_time_zero
character(len=60) run_name
logical, dimension(dimension_vtk) vtk_part_orientation
character(len=1), dimension(dimension_vtk) vtk_select_mode
integer, dimension(dimension_vtk) vtk_nxs
subroutine allgather_1i(lbuf, gbuf, idebug)
double precision, dimension(dimension_vtk) vtk_y_n
logical, dimension(dimension_vtk) vtk_part_diameter
subroutine desmpi_gatherv(ptype, pdebug)
character(len=512) buffer
integer, dimension(:), allocatable irootbuf
subroutine vtp_close_file
character(len=1), dimension(dimension_vtk) vtk_data
subroutine init_err_msg(CALLER)
integer, dimension(dimension_vtk) frame
logical, dimension(dimension_vtk, 100) vtk_part_x_s
character(len=511) fname_vtp
double precision, dimension(dimension_vtk) vtk_y_s
character(len=16) run_type
integer, dimension(:), allocatable iprocbuf
logical, dimension(dimension_vtk) vtk_part_cohesion
logical, dimension(dimension_vtk) vtk_part_temp
logical, dimension(dimension_vtk) vtk_part_angular_vel
character(len=1), parameter end_rec
logical, dimension(dimension_vtk, 3) vtk_part_usr_var
subroutine add_vtp_to_pvd
integer, dimension(:), allocatable idispls
subroutine vtp_write_element(ELEMENT)
double precision, dimension(dimension_vtk) vtk_z_b
character(len=line_length), dimension(line_count) err_msg
integer, dimension(dimension_vtk) vtk_nys
subroutine open_vtp_file_bin(MODE)
subroutine vtp_write_dp1(NAME, DATA)
character(len=255), dimension(dimension_vtk) vtk_filebase
double precision, dimension(dimension_vtk) vtk_z_t
logical, dimension(:), allocatable belongs_to_vtk_subdomain
double precision, dimension(:), allocatable drootbuf
integer, parameter dimension_vtk
subroutine close_vtp_file_bin(MODE)
subroutine write_vector_in_vtp_bin(VAR_NAME, VAR, PASS)
integer, parameter pvd_unit
double precision, dimension(dimension_vtk) vtk_x_w
subroutine setup_vtk_region_particles
double precision, parameter zero
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)
integer, dimension(dimension_vtk) vtk_nzs
character(len=255) vtu_frame_filename