Skip to content
Snippets Groups Projects
Commit 75eb3414 authored by Dave Whipp's avatar Dave Whipp
Browse files

Fixed output of double precision values for VTK files

parent 454a75ee
No related branches found
No related tags found
No related merge requests found
......@@ -562,7 +562,7 @@ if (output_cubes==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,ov%nleaves
do k=1,8
if (abs(ov%e2d(i)).ge.1.d99) ov%e2d(i)=sign(1.d99,ov%e2d(i))
if (abs(ov%e2d(i)).ge.1.d98) ov%e2d(i)=sign(1.d98,ov%e2d(i))
if (abs(ov%e2d(i)).le.1.d-99) ov%e2d(i)=0.d0
write(iunit,'(e13.6)') ov%e2d(i)
end do
......@@ -573,7 +573,7 @@ if (output_cubes==1) then
do i=1,ov%nleaves
do k=1,8
wsum=sum(ov%w(ov%icon(:,i)))/8.d0
if (abs(wsum).ge.1.d99) wsum=sign(1.d99,wsum)
if (abs(wsum).ge.1.d98) wsum=sign(1.d98,wsum)
if (abs(wsum).le.1.d-99) wsum=0.d0
write(iunit,'(e13.6)') wsum
end do
......@@ -583,7 +583,7 @@ if (output_cubes==1) then
do i=1,ov%nleaves
do k=1,8
vsum=sum(ov%v(ov%icon(:,i)))/8.d0
if (abs(vsum).ge.1.d99) vsum=sign(1.d99,vsum)
if (abs(vsum).ge.1.d98) vsum=sign(1.d98,vsum)
if (abs(vsum).le.1.d-99) vsum=0.d0
write(iunit,'(e13.6)') vsum
end do
......@@ -593,7 +593,7 @@ if (output_cubes==1) then
do i=1,ov%nleaves
do k=1,8
usum=sum(ov%u(ov%icon(:,i)))/8.d0
if (abs(usum).ge.1.d99) usum=sign(1.d99,usum)
if (abs(usum).ge.1.d98) usum=sign(1.d98,usum)
if (abs(usum).le.1.d-99) usum=0.d0
write(iunit,'(e13.6)') usum
end do
......@@ -604,7 +604,7 @@ if (output_cubes==1) then
do i=1,ov%nleaves
do k=1,8
uvwsum=sqrt((sum(ov%u(ov%icon(:,i)))/8.d0)**2+(sum(ov%v(ov%icon(:,i)))/8.d0)**2+(sum(ov%w(ov%icon(:,i)))/8.d0)**2)
if (abs(uvwsum).ge.1.d99) uvwsum=sign(1.d99,uvwsum)
if (abs(uvwsum).ge.1.d98) uvwsum=sign(1.d98,uvwsum)
if (abs(uvwsum).le.1.d-99) uvwsum=0.d0
write(iunit,'(e13.6)') uvwsum
end do
......@@ -672,12 +672,12 @@ do i=1,ov%nleaves
yy=sum(ov%y(ov%icon(:,i)))/8.d0
zz=sum(ov%z(ov%icon(:,i)))/8.d0
if (instrain(i)) then
!if (strain(1,:,i).ge.1.d99) strain(1,:,i)=1.d99
!if (strain(1,:,i).le.1.d-99) strain(1,:,i)=1.d-99
!if (strain(2,:,i).ge.1.d99) strain(2,:,i)=1.d99
!if (strain(2,:,i).le.1.d-99) strain(2,:,i)=1.d-99
!if (strain(3,:,i).ge.1.d99) strain(3,:,i)=1.d99
!if (strain(3,:,i).le.1.d-99) strain(3,:,i)=1.d-99
!if (strain(1,:,i).ge.1.d98) strain(1,:,i)=1.d98
!if (strain(1,:,i).le.1.d-99) strain(1,:,i)=0.d0
!if (strain(2,:,i).ge.1.d98) strain(2,:,i)=1.d98
!if (strain(2,:,i).le.1.d-99) strain(2,:,i)=1.d0
!if (strain(3,:,i).ge.1.d98) strain(3,:,i)=1.d98
!if (strain(3,:,i).le.1.d-99) strain(3,:,i)=1.d0
write(iunit,'(3e13.6)') strain(1,:,i)
write(iunit,'(3e13.6)') strain(2,:,i)
write(iunit,'(3e13.6)') strain(3,:,i)
......@@ -852,7 +852,7 @@ if(output_u_field==1) then
write(iunit,'(a)')'SCALARS u double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%u(rtf(i))).ge.1.d99) ov%u(rtf(i))=sign(1.d99,ov%u(rtf(i)))
if (abs(ov%u(rtf(i))).ge.1.d98) ov%u(rtf(i))=sign(1.d98,ov%u(rtf(i)))
if (abs(ov%u(rtf(i))).le.1.d-99) ov%u(rtf(i))=0.d0
write(iunit,'(e13.6)') ov%u(rtf(i))
enddo
......@@ -862,7 +862,7 @@ if(output_v_field==1) then
write(iunit,'(a)')'SCALARS v double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%v(rtf(i))).ge.1.d99) ov%v(rtf(i))=sign(1.d99,ov%v(rtf(i)))
if (abs(ov%v(rtf(i))).ge.1.d98) ov%v(rtf(i))=sign(1.d98,ov%v(rtf(i)))
if (abs(ov%v(rtf(i))).le.1.d-99) ov%v(rtf(i))=0.d0
write(iunit,'(e13.6)') ov%v(rtf(i))
enddo
......@@ -872,7 +872,7 @@ if(output_w_field==1) then
write(iunit,'(a)')'SCALARS w double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%w(rtf(i))).ge.1.d99) ov%w(rtf(i))=sign(1.d99,ov%w(rtf(i)))
if (abs(ov%w(rtf(i))).ge.1.d98) ov%w(rtf(i))=sign(1.d98,ov%w(rtf(i)))
if (abs(ov%w(rtf(i))).le.1.d-99) ov%w(rtf(i))=0.d0
write(iunit,'(e13.6)') ov%w(rtf(i))
enddo
......@@ -883,7 +883,7 @@ if(output_disp_field==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
disp=sqrt(ov%u(rtf(i))**2+ov%v(rtf(i))**2+ov%w(rtf(i))**2)
if (abs(disp).ge.1.d99) disp=sign(1.d99,disp)
if (abs(disp).ge.1.d98) disp=sign(1.d98,disp)
if (abs(disp).le.1.d-99) disp=0.d0
write(iunit,'(e13.6)') disp
enddo
......@@ -893,8 +893,8 @@ if(output_press_fieldn==1) then
write(iunit,'(a)')'SCALARS pressure_n double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%nodal_pressure(rtf(i))).ge.1.d99) then
ov%nodal_pressure(rtf(i))=sign(1.d99,ov%nodal_pressure(rtf(i)))
if (abs(ov%nodal_pressure(rtf(i))).ge.1.d98) then
ov%nodal_pressure(rtf(i))=sign(1.d98,ov%nodal_pressure(rtf(i)))
endif
if (abs(ov%nodal_pressure(rtf(i))).le.1.d-99) then
ov%nodal_pressure(rtf(i))=0.d0
......@@ -907,8 +907,8 @@ if(output_countnode_field==1) then
write(iunit,'(a)')'SCALARS countnode double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(countnode(rtf(i))).ge.1.d99) then
countnode(rtf(i))=sign(1.d99,countnode(rtf(i)))
if (abs(countnode(rtf(i))).ge.1.d98) then
countnode(rtf(i))=sign(1.d98,countnode(rtf(i)))
endif
if (abs(countnode(rtf(i))).le.1.d-99) countnode(rtf(i))=0.d0
write(iunit,'(e13.6)') countnode(rtf(i))
......@@ -919,8 +919,8 @@ if(output_e2d_fieldn==1) then
write(iunit,'(a)')'SCALARS e2dn double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov_nodee2d(rtf(i))).ge.1.d99) then
ov_nodee2d(rtf(i))=sign(1.d99,ov_nodee2d(rtf(i)))
if (abs(ov_nodee2d(rtf(i))).ge.1.d98) then
ov_nodee2d(rtf(i))=sign(1.d98,ov_nodee2d(rtf(i)))
endif
if (abs(ov_nodee2d(rtf(i))).le.1.d-99) ov_nodee2d(rtf(i))=0.d0
write(iunit,'(e13.6)') ov_nodee2d(rtf(i))
......@@ -931,8 +931,8 @@ if(output_crit_field==1) then
write(iunit,'(a)')'SCALARS crit double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov_nodecrit(rtf(i))).ge.1.d99) then
ov_nodecrit(rtf(i))=sign(1.d99,ov_nodecrit(rtf(i)))
if (abs(ov_nodecrit(rtf(i))).ge.1.d98) then
ov_nodecrit(rtf(i))=sign(1.d98,ov_nodecrit(rtf(i)))
endif
if (abs(ov_nodecrit(rtf(i))).le.1.d-99) ov_nodecrit(rtf(i))=0.d0
write(iunit,'(e13.6)') ov_nodecrit(rtf(i))
......@@ -943,8 +943,8 @@ if(output_strain_field==1) then
write(iunit,'(a)')'SCALARS s double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%strain(rtf(i))).ge.1.d99) then
ov%strain(rtf(i))=sign(1.d99,ov%strain(rtf(i)))
if (abs(ov%strain(rtf(i))).ge.1.d98) then
ov%strain(rtf(i))=sign(1.d98,ov%strain(rtf(i)))
endif
if (abs(ov%strain(rtf(i))).le.1.d-99) ov%strain(rtf(i))=0.d0
write(iunit,'(e13.6)') ov%strain(rtf(i))
......@@ -955,8 +955,8 @@ if(output_temp_field==1) then
write(iunit,'(a)')'SCALARS t double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%temp(rtf(i))).ge.1.d99) then
ov%temp(rtf(i))=sign(1.d99,ov%temp(rtf(i)))
if (abs(ov%temp(rtf(i))).ge.1.d98) then
ov%temp(rtf(i))=sign(1.d98,ov%temp(rtf(i)))
endif
if (abs(ov%temp(rtf(i))).le.1.d-99) ov%temp(rtf(i))=0.d0
write(iunit,'(e13.6)') ov%temp(rtf(i))
......@@ -970,8 +970,8 @@ if(output_lsf_field==1) then
write(iunit,'(a)')'SCALARS lsf'//clsf//' double 1'
write(iunit,'(a)')'LOOKUP_TABLE default'
do i=1,nnn
if (abs(ov%lsf(rtf(i),ilsf)).ge.1.d99) then
ov%lsf(rtf(i),ilsf)=sign(1.d99,ov%lsf(rtf(i),ilsf))
if (abs(ov%lsf(rtf(i),ilsf)).ge.1.d98) then
ov%lsf(rtf(i),ilsf)=sign(1.d98,ov%lsf(rtf(i),ilsf))
endif
if (abs(ov%lsf(rtf(i),ilsf)).le.1.d-99) ov%lsf(rtf(i),ilsf)=0.d0
write(iunit,'(e13.6)') ov%lsf(rtf(i),ilsf)
......@@ -982,11 +982,11 @@ end if
if(output_velo_vect==1) then
write(iunit,'(a)')'VECTORS velo double'
do i=1,nnn
if (abs(ov%u(rtf(i))).ge.1.d99) ov%u(rtf(i))=sign(1.d99,ov%u(rtf(i)))
if (abs(ov%u(rtf(i))).ge.1.d98) ov%u(rtf(i))=sign(1.d98,ov%u(rtf(i)))
if (abs(ov%u(rtf(i))).le.1.d-99) ov%u(rtf(i))=0.d0
if (abs(ov%v(rtf(i))).ge.1.d99) ov%v(rtf(i))=sign(1.d99,ov%v(rtf(i)))
if (abs(ov%v(rtf(i))).ge.1.d98) ov%v(rtf(i))=sign(1.d98,ov%v(rtf(i)))
if (abs(ov%v(rtf(i))).le.1.d-99) ov%v(rtf(i))=0.d0
if (abs(ov%w(rtf(i))).ge.1.d99) ov%w(rtf(i))=sign(1.d99,ov%w(rtf(i)))
if (abs(ov%w(rtf(i))).ge.1.d98) ov%w(rtf(i))=sign(1.d98,ov%w(rtf(i)))
if (abs(ov%w(rtf(i))).le.1.d-99) ov%w(rtf(i))=0.d0
write(iunit,'(3e17.6)')ov%u(rtf(i)),ov%v(rtf(i)),ov%w(rtf(i))
enddo
......@@ -995,12 +995,12 @@ endif
if(output_preiso_velo_vect==1) then
write(iunit,'(a)')'VECTORS preiso-velo double'
do i=1,nnn
if (abs(ov%u(rtf(i))).ge.1.d99) ov%u(rtf(i))=sign(1.d99,ov%u(rtf(i)))
if (abs(ov%u(rtf(i))).ge.1.d98) ov%u(rtf(i))=sign(1.d98,ov%u(rtf(i)))
if (abs(ov%u(rtf(i))).le.1.d-99) ov%u(rtf(i))=0.d0
if (abs(ov%v(rtf(i))).ge.1.d99) ov%v(rtf(i))=sign(1.d99,ov%v(rtf(i)))
if (abs(ov%v(rtf(i))).ge.1.d98) ov%v(rtf(i))=sign(1.d98,ov%v(rtf(i)))
if (abs(ov%v(rtf(i))).le.1.d-99) ov%v(rtf(i))=0.d0
wmod=ov%w(rtf(i))-ov%wiso(rtf(i))
if (abs(wmod).ge.1.d99) wmod=sign(1.d99,wmod)
if (abs(wmod).ge.1.d98) wmod=sign(1.d98,wmod)
if (abs(wmod).le.1.d-99) wmod=0.d0
write(iunit,'(3e17.6)')ov%u(rtf(i)),ov%v(rtf(i)),wmod
enddo
......@@ -1009,7 +1009,7 @@ endif
if(output_iso_velo_vect==1) then
write(iunit,'(a)')'VECTORS iso-velo double'
do i=1,nnn
if (abs(ov%wiso(rtf(i))).ge.1.d99) ov%wiso(rtf(i))=sign(1.d99,ov%wiso(rtf(i)))
if (abs(ov%wiso(rtf(i))).ge.1.d98) ov%wiso(rtf(i))=sign(1.d98,ov%wiso(rtf(i)))
if (abs(ov%wiso(rtf(i))).le.1.d-99) ov%wiso(rtf(i))=0.d0
write(iunit,'(3e17.6)')0.d0,0.d0,ov%wiso(rtf(i))
enddo
......@@ -1032,12 +1032,12 @@ if (output_strain_tensor/=0) then
enddo
write(iunit,'(a)')'TENSORS strain double'
do i=1,nnn
!if (strainn(1,:,i).ge.1.d99) strainn(1,:,i)=1.d99
!if (strainn(1,:,i).le.1.d-99) strainn(1,:,i)=1.d-99
!if (strainn(2,:,i).ge.1.d99) strainn(2,:,i)=1.d99
!if (strainn(2,:,i).le.1.d-99) strainn(2,:,i)=1.d-99
!if (strainn(3,:,i).ge.1.d99) strainn(3,:,i)=1.d99
!if (strainn(3,:,i).le.1.d-99) strainn(3,:,i)=1.d-99
!if (strainn(1,:,i).ge.1.d98) strainn(1,:,i)=1.d98
!if (strainn(1,:,i).le.1.d-99) strainn(1,:,i)=1.d0
!if (strainn(2,:,i).ge.1.d98) strainn(2,:,i)=1.d98
!if (strainn(2,:,i).le.1.d-99) strainn(2,:,i)=1.d0
!if (strainn(3,:,i).ge.1.d98) strainn(3,:,i)=1.d98
!if (strainn(3,:,i).le.1.d-99) strainn(3,:,i)=1.d0
write(iunit,'(3e13.6)') strainn(1,:,i)
write(iunit,'(3e13.6)') strainn(2,:,i)
write(iunit,'(3e13.6)') strainn(3,:,i)
......@@ -1052,7 +1052,7 @@ if (output_e2d_fielde==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do ie=1,ov%nleaves
if (elvoid(ie).eq.0) then
if (abs(ov%e2d(ie)).ge.1.d99) ov%e2d(ie)=sign(1.d99,ov%e2d(ie))
if (abs(ov%e2d(ie)).ge.1.d98) ov%e2d(ie)=sign(1.d98,ov%e2d(ie))
if (abs(ov%e2d(ie)).le.1.d-99) ov%e2d(ie)=0.d0
write(iunit,'(e13.6)') ov%e2d(ie)
endif
......@@ -1064,8 +1064,8 @@ if(output_press_fielde==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do ie=1,ov%nleaves
if (elvoid(ie).eq.0) then
if (abs(ov%pressure(ie)).ge.1.d99) then
ov%pressure(ie)=sign(1.d99,ov%pressure(ie))
if (abs(ov%pressure(ie)).ge.1.d98) then
ov%pressure(ie)=sign(1.d98,ov%pressure(ie))
endif
if (abs(ov%pressure(ie)).le.1.d-99) ov%pressure(ie)=0.d0
write(iunit,'(e13.6)') ov%pressure(ie)
......@@ -1078,8 +1078,8 @@ if(output_smooth_press_fielde==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do ie=1,ov%nleaves
if (elvoid(ie).eq.0) then
if (abs(ov%spressure(ie)).ge.1.d99) then
ov%spressure(ie)=sign(1.d99,ov%spressure(ie))
if (abs(ov%spressure(ie)).ge.1.d98) then
ov%spressure(ie)=sign(1.d98,ov%spressure(ie))
endif
if (abs(ov%spressure(ie)).le.1.d-99) ov%spressure(ie)=0.d0
write(iunit,'(e13.6)') ov%spressure(ie)
......@@ -1092,8 +1092,8 @@ if(output_eviscosity_fielde==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do ie=1,ov%nleaves
if (elvoid(ie).eq.0) then
if (abs(ov%eviscosity(ie)).ge.1.d99) then
ov%eviscosity(ie)=sign(1.d99,ov%eviscosity(ie))
if (abs(ov%eviscosity(ie)).ge.1.d98) then
ov%eviscosity(ie)=sign(1.d98,ov%eviscosity(ie))
endif
if (abs(ov%eviscosity(ie)).le.1.d-99) ov%eviscosity(ie)=0.d0
write(iunit,'(e13.6)') ov%eviscosity(ie)
......@@ -1116,8 +1116,8 @@ if (output_yield_ratio_fielde==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do ie=1,ov%nleaves
if (elvoid(ie).eq.0) then
if (abs(ov%yield_ratio(ie)).ge.1.d99) then
ov%yield_ratio(ie)=sign(1.d99,ov%yield_ratio(ie))
if (abs(ov%yield_ratio(ie)).ge.1.d98) then
ov%yield_ratio(ie)=sign(1.d98,ov%yield_ratio(ie))
endif
if (abs(ov%yield_ratio(ie)).le.1.d-99) ov%yield_ratio(ie)=0.d0
write(iunit,'(e13.6)') ov%yield_ratio(ie)
......@@ -1130,8 +1130,8 @@ if (output_dilatr_fielde==1) then
write(iunit,'(a)')'LOOKUP_TABLE default'
do ie=1,ov%nleaves
if (elvoid(ie).eq.0) then
if (abs(ov%dilatr(ie)).ge.1.d99) then
ov%dilatr(ie)=sign(1.d99,ov%dilatr(ie))
if (abs(ov%dilatr(ie)).ge.1.d98) then
ov%dilatr(ie)=sign(1.d98,ov%dilatr(ie))
endif
if (abs(ov%dilatr(ie)).le.1.d-99) ov%dilatr(ie)=0.d0
write(iunit,'(e13.6)') ov%dilatr(ie)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment