Skip to content

Commit

Permalink
iprec for paraview
Browse files Browse the repository at this point in the history
  • Loading branch information
gd_laptop committed Apr 18, 2019
1 parent 4fa56b1 commit 16cc13d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
30 changes: 15 additions & 15 deletions paraview_incompact3d.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ program visu_paraview

implicit none

integer(4) :: nx,ny,nz,ialm,iadm,ivirt,jles,ibuoyancy,isnapshot
integer(4) :: nx,ny,nz,ialm,iadm,ivirt,jles,ibuoyancy,isnapshot,iprec
real(4) :: xlx,yly,zlz,dt,dx,dy,dz
integer(4) :: nfiles, icrfile, file1, filen, ifile, isnap, snap1,snapn,dig1, dig2, dig3, dig4
real(4), allocatable :: yp(:),y1(:),y3(:)
Expand All @@ -14,7 +14,7 @@ program visu_paraview

character(4) :: chits
NAMELIST/PostProcess/nx,ny,nz,xlx,yly,zlz,nclx,ncly,nclz,istret,nfiles,file1,filen,ialm,iadm,ivirt,jles,ibuoyancy,dynhypvisc,&
isnapshot,imin,imax,jmin,jmax,kmin,kmax,snap1,snapn
isnapshot,imin,imax,jmin,jmax,kmin,kmax,snap1,snapn,iprec
!==========================================================================
! Handle Input file
nargin=command_argument_count()
Expand All @@ -32,7 +32,7 @@ program visu_paraview
end if
!===========================================================================


iprec=8
open(10,file=InputFN)
read(10,nml=PostProcess)
close(10)
Expand Down Expand Up @@ -125,39 +125,39 @@ program visu_paraview
!DOUBLE PRECISION-->Precision=8
write(nfil,*)' <Attribute Name="ux" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' ux'//chits
write(nfil,*)' </DataItem>'
write(nfil,*)' </Attribute>'

write(nfil,*)' <Attribute Name="uy" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' uy'//chits
write(nfil,*)' </DataItem>'
write(nfil,*)' </Attribute>'

write(nfil,*)' <Attribute Name="uz" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' uz'//chits
write(nfil,*)' </DataItem>'
write(nfil,*)' </Attribute>'

write(nfil,*)' <Attribute Name="pp" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' pp'//chits
write(nfil,*)' </DataItem>'
write(nfil,*)' </Attribute>'

write(nfil,*)' <Attribute Name="vort" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' vort'//chits
write(nfil,*)' </DataItem>'
Expand All @@ -166,7 +166,7 @@ program visu_paraview
if(iadm==1) then
write(nfil,*)' <Attribute Name="gammadisc" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' gammadisc'//chits
write(nfil,*)' </DataItem>'
Expand All @@ -176,23 +176,23 @@ program visu_paraview
if(ialm==1) then
write(nfil,*)' <Attribute Name="Ftx" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' Ftx'//chits
write(nfil,*)' </DataItem>'
write(nfil,*)' </Attribute>'

write(nfil,*)' <Attribute Name="Fty" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' Fty'//chits
write(nfil,*)' </DataItem>'
write(nfil,*)' </Attribute>'

write(nfil,*)' <Attribute Name="Ftz" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' Ftz'//chits
write(nfil,*)' </DataItem>'
Expand All @@ -202,7 +202,7 @@ program visu_paraview
if(jles.eq.1.and.dynhypvisc.eq.1) then
write(nfil,*)' <Attribute Name="dynvisc" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' dynvisc'//chits
write(nfil,*)' </DataItem>'
Expand All @@ -212,7 +212,7 @@ program visu_paraview
if(ibuoyancy==1) then
write(nfil,*)' <Attribute Name="temp" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' temp'//chits
write(nfil,*)' </DataItem>'
Expand All @@ -222,7 +222,7 @@ program visu_paraview
if(ivirt>0) then
write(nfil,*)' <Attribute Name="IBM" Center="Node">'
write(nfil,*)' <DataItem Format="Binary" '
write(nfil,*)' DataType="Float" Precision="8" Endian="little"'
write(nfil,*)' DataType="Float" Precision="',iprec,'" Endian="little"'
write(nfil,*)' Dimensions="',nz,ny,nx,'">'
write(nfil,*)' IBM'//chits
write(nfil,*)' </DataItem>'
Expand Down
1 change: 0 additions & 1 deletion tools.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,6 @@ subroutine radial_tripping(x0,y0,z0,Radius,time) !TRIPPING SUBROUTINE FOR TURBIN
enddo
enddo


! Compute the temporal term
call system_clock(count=code)
call random_seed(size = ii)
Expand Down

0 comments on commit 16cc13d

Please sign in to comment.