Commit dc55c7b7 authored by Henrik Asmuth's avatar Henrik Asmuth
Browse files

Fixed formatting issues arising when compiling with gfortran

parent 656289e5
......@@ -96,9 +96,9 @@ c---- Write VTK MultiBlockDataSet header file --------------------------
head1(1:47)=' <DataSet index="0000" file="grid_0000.vts"/>'
open(21,file='grid.vtm',form='formatted')
write(21,'(A21)')'<?xml version="1.0"?>'
write(21,'(A112)')'<VTKFile type="vtkMultiBlockDataSet"
&version="1.0" byte_order="LittleEndian"
&compressor="vtkZLibDataCompressor">"'
write(21,'(A113)')'<VTKFile type="vtkMultiBlockDataSet" '//
&'version="1.0" byte_order= "LittleEndian" '//
&'compressor="vtkZLibDataCompressor">'
write(21,'(A24)')' <vtkMultiBlockDataSet>'
c---- for each block ---------------------------------------------------
......@@ -116,14 +116,16 @@ c---- write grid data files for each block -----------------------------
filename1(1:13)='grid_0000.vts'
write(filename1(6:9),'(i4.4)')n
open(unit=22,file=filename1(1:13),form='formatted')
c open(unit=22,file=filename1(1:13),form='binary')
c---- header -----------------------------------------------------------
write(22,'(A21)')'<?xml version="1.0"?>'
write(22,'(A112)')'<VTKFile type="StructuredGrid" version="0.1"
& byte_order="LittleEndian" compressor="vtkZLibDataCompressor">'
write(22,'(A112)')'<VTKFile type="StructuredGrid" '//
&'version="0.1" '//
&'byte_order="LittleEndian" compressor="vtkZLibDataCompressor">'
write(22,203)ni-1,ni-1,ni-1
write(22,204)ni-1,ni-1,ni-1
c---- vector and scalar arrays -----------------------------------------
write(22,'(A52)')' <PointData Scalars="Scalars"
write(22,'(A70)')' <PointData Scalars="Scalars"
&Vectors="Velocity">'
c---- velocity vectors -------------------------------------------------
write(22,205)'velocity',3,minval(var(3,:,:,:,n))
......@@ -133,7 +135,13 @@ c---- velocity vectors -------------------------------------------------
write(22,'(A18)')' </DataArray>'
do nn=4,nvar
c---- variables ---------------------------------------------------------
write(22,205)varname(nn),1,minval(var(nn,:,:,:,n))
if(minval(var(nn,:,:,:,n)).gt.1.0e20)then
var(nn,:,:,:,n)=0.d0
print*, 'Warning: Data in array "',varname(nn),'" in block',
& n,' exceeds max. value. Setting data to zero.'
endif
write(22,205)varname(nn),1,minval(var(nn,:,:,:,n))
& ,maxval(var(nn,:,:,:,n))
write(22,'(6f24.10)')(((var(nn,i,j,k,n)
& ,i=1,ni),j=1,ni),k=1,ni)
......@@ -167,10 +175,11 @@ c-----------------------------------------------------------------------
203 format(' <StructuredGrid WholeExtent="0 ',i3,' 0 ',i3,' 0 ',
& i3,' ">')
204 format(' <Piece Extent="0 ',i3,' 0 ',i3,' 0 ',i3,' ">')
205 format(' <DataArray type="Float32" Name="',A10,'" Number
&OfComponents="',i3,
205 format(' <DataArray type="Float32" Name="',A10,'" '
&'NumberOfComponents="',
&i3,
&'" format="ascii" RangeMin="',f16.2,'" RangeMax="',f16.2,'">')
206 format(' <DataArray type="Int32" Name="',A10,'" Number
&OfComponents="',i3,
206 format(' <DataArray type="Int32" Name="',A10,'" '
&'NumberOfComponents="',i3,
&'" format="ascii" RangeMin="',i6,'" RangeMax="',i6,'">')
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment