From e33c34d86b94b8a094cab5428b617d9a62b60b2e Mon Sep 17 00:00:00 2001 From: Krishna Komerla Date: Tue, 24 Apr 2012 16:59:38 +0000 Subject: [PATCH] corrected wrong integer arithmetics in calculation of coordinates in DAMASK_spectral.f90 --- code/DAMASK_spectral.f90 | 4 ++-- code/IO.f90 | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/DAMASK_spectral.f90 b/code/DAMASK_spectral.f90 index c88a55fe2..155fda2b4 100644 --- a/code/DAMASK_spectral.f90 +++ b/code/DAMASK_spectral.f90 @@ -535,12 +535,12 @@ program DAMASK_spectral ielem = ielem + 1_pInt F(i,j,k,1:3,1:3) = math_I3 F_lastInc(i,j,k,1:3,1:3) = math_I3 - coordinates(i,j,k,1:3) = geomdim/real(res * [i,j,k], pReal) - geomdim/real(2_pInt*res,pReal) + coordinates(i,j,k,1:3) = geomdim/real(res,pReal)*real([i,j,k],pReal) - geomdim/real(2_pInt*res,pReal) call CPFEM_general(2_pInt,coordinates(i,j,k,1:3),math_I3,math_I3,temperature(i,j,k),& 0.0_pReal,ielem,1_pInt,sigma,dsde,P_real(i,j,k,1:3,1:3),dPdF) C = C + dPdF enddo; enddo; enddo -C_ref = C * wgt ! linear reference material stiffness +C_ref = C * wgt !-------------------------------------------------------------------------------------------------- ! calculate the gamma operator diff --git a/code/IO.f90 b/code/IO.f90 index 8700936eb..2f8a597a5 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -300,6 +300,7 @@ subroutine IO_write_jobBinaryFile(myUnit,newExt,recMultiplier) open(myUnit,status='replace',form='unformatted',access='direct', & recl=pReal,iostat=myStat,file=path) endif + if (myStat /= 0_pInt) call IO_error(100_pInt,ext_msg=path) end subroutine IO_write_jobBinaryFile