introduced #EOF# as module wide parameter in IO.f90

renamed read/write binary file to read/write real/int
removed suffix job from readFile functions as the name of the model is needed as an argument
This commit is contained in:
Martin Diehl 2013-09-18 14:07:55 +00:00
parent 19a353edb4
commit 3eec0ecdcd
18 changed files with 674 additions and 671 deletions

View File

@ -137,8 +137,8 @@ subroutine CPFEM_init
use prec, only: &
pInt
use IO, only: &
IO_read_jobBinaryFile,&
IO_read_jobBinaryIntFile, &
IO_read_realFile,&
IO_read_intFile, &
IO_timeStamp, &
IO_error
use numerics, only: &
@ -192,31 +192,31 @@ subroutine CPFEM_init
!$OMP END CRITICAL (write2out)
endif
call IO_read_jobBinaryIntFile(777,'recordedPhase',modelName,size(material_phase))
call IO_read_intFile(777,'recordedPhase',modelName,size(material_phase))
read (777,rec=1) material_phase
close (777)
call IO_read_jobBinaryFile(777,'convergedF',modelName,size(crystallite_F0))
call IO_read_realFile(777,'convergedF',modelName,size(crystallite_F0))
read (777,rec=1) crystallite_F0
close (777)
call IO_read_jobBinaryFile(777,'convergedFp',modelName,size(crystallite_Fp0))
call IO_read_realFile(777,'convergedFp',modelName,size(crystallite_Fp0))
read (777,rec=1) crystallite_Fp0
close (777)
call IO_read_jobBinaryFile(777,'convergedLp',modelName,size(crystallite_Lp0))
call IO_read_realFile(777,'convergedLp',modelName,size(crystallite_Lp0))
read (777,rec=1) crystallite_Lp0
close (777)
call IO_read_jobBinaryFile(777,'convergeddPdF',modelName,size(crystallite_dPdF0))
call IO_read_realFile(777,'convergeddPdF',modelName,size(crystallite_dPdF0))
read (777,rec=1) crystallite_dPdF0
close (777)
call IO_read_jobBinaryFile(777,'convergedTstar',modelName,size(crystallite_Tstar0_v))
call IO_read_realFile(777,'convergedTstar',modelName,size(crystallite_Tstar0_v))
read (777,rec=1) crystallite_Tstar0_v
close (777)
call IO_read_jobBinaryFile(777,'convergedStateConst',modelName)
call IO_read_realFile(777,'convergedStateConst',modelName)
m = 0_pInt
do i = 1,homogenization_maxNgrains; do j = 1,mesh_maxNips; do k = 1,mesh_NcpElems
do l = 1,size(constitutive_state0(i,j,k)%p)
@ -226,7 +226,7 @@ subroutine CPFEM_init
enddo; enddo; enddo
close (777)
call IO_read_jobBinaryFile(777,'convergedStateHomog',modelName)
call IO_read_realFile(777,'convergedStateHomog',modelName)
m = 0_pInt
do k = 1,mesh_NcpElems; do j = 1,mesh_maxNips
do l = 1,homogenization_sizeState(j,k)
@ -236,7 +236,7 @@ subroutine CPFEM_init
enddo; enddo
close (777)
call IO_read_jobBinaryFile(777,'convergeddcsdE',modelName,size(CPFEM_dcsdE))
call IO_read_realFile(777,'convergeddcsdE',modelName,size(CPFEM_dcsdE))
read (777,rec=1) CPFEM_dcsdE
close (777)
restartRead = .false.
@ -324,7 +324,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, Temperature, dt, el
materialpoint_Temperature, &
materialpoint_stressAndItsTangent, &
materialpoint_postResults
use IO, only: IO_write_jobBinaryFile, &
use IO, only: IO_write_jobRealFile, &
IO_warning
use DAMASK_interface
@ -422,31 +422,31 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, Temperature, dt, el
!$OMP END CRITICAL (write2out)
endif
call IO_write_jobBinaryFile(777,'recordedPhase',size(material_phase))
call IO_write_jobRealFile(777,'recordedPhase',size(material_phase))
write (777,rec=1) material_phase
close (777)
call IO_write_jobBinaryFile(777,'convergedF',size(crystallite_F0))
call IO_write_jobRealFile(777,'convergedF',size(crystallite_F0))
write (777,rec=1) crystallite_F0
close (777)
call IO_write_jobBinaryFile(777,'convergedFp',size(crystallite_Fp0))
call IO_write_jobRealFile(777,'convergedFp',size(crystallite_Fp0))
write (777,rec=1) crystallite_Fp0
close (777)
call IO_write_jobBinaryFile(777,'convergedLp',size(crystallite_Lp0))
call IO_write_jobRealFile(777,'convergedLp',size(crystallite_Lp0))
write (777,rec=1) crystallite_Lp0
close (777)
call IO_write_jobBinaryFile(777,'convergeddPdF',size(crystallite_dPdF0))
call IO_write_jobRealFile(777,'convergeddPdF',size(crystallite_dPdF0))
write (777,rec=1) crystallite_dPdF0
close (777)
call IO_write_jobBinaryFile(777,'convergedTstar',size(crystallite_Tstar0_v))
call IO_write_jobRealFile(777,'convergedTstar',size(crystallite_Tstar0_v))
write (777,rec=1) crystallite_Tstar0_v
close (777)
call IO_write_jobBinaryFile(777,'convergedStateConst')
call IO_write_jobRealFile(777,'convergedStateConst')
m = 0_pInt
do i = 1,homogenization_maxNgrains; do j = 1,mesh_maxNips; do k = 1,mesh_NcpElems
do l = 1,size(constitutive_state0(i,j,k)%p)
@ -456,7 +456,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, Temperature, dt, el
enddo; enddo; enddo
close (777)
call IO_write_jobBinaryFile(777,'convergedStateHomog')
call IO_write_jobRealFile(777,'convergedStateHomog')
m = 0_pInt
do k = 1,mesh_NcpElems; do j = 1,mesh_maxNips
do l = 1,homogenization_sizeState(j,k)
@ -466,7 +466,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, Temperature, dt, el
enddo; enddo
close (777)
call IO_write_jobBinaryFile(777,'convergeddcsdE',size(CPFEM_dcsdE))
call IO_write_jobRealFile(777,'convergeddcsdE',size(CPFEM_dcsdE))
write (777,rec=1) CPFEM_dcsdE
close (777)

View File

@ -50,8 +50,6 @@ program DAMASK_spectral_Driver
IO_intValue, &
IO_error, &
IO_lc, &
IO_read_jobBinaryFile, &
IO_write_jobBinaryFile, &
IO_intOut, &
IO_warning, &
IO_timeStamp

View File

@ -129,8 +129,7 @@ subroutine AL_init(temperature)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
use IO, only: &
IO_intOut, &
IO_read_JobBinaryFile, &
IO_write_JobBinaryFile, &
IO_read_realFile, &
IO_timeStamp
use debug, only: &
debug_level, &
@ -217,38 +216,38 @@ subroutine AL_init(temperature)
write(6,'(/,a,'//IO_intOut(restartInc-1_pInt)//',a)') &
'reading values of increment', restartInc - 1_pInt, 'from file'
flush(6)
call IO_read_jobBinaryFile(777,'F',&
call IO_read_realFile(777,'F',&
trim(getSolverJobName()),size(F))
read (777,rec=1) F
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc',&
call IO_read_realFile(777,'F_lastInc',&
trim(getSolverJobName()),size(F_lastInc))
read (777,rec=1) F_lastInc
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc2',&
call IO_read_realFile(777,'F_lastInc2',&
trim(getSolverJobName()),size(F_lastInc2))
read (777,rec=1) F_lastInc2
close (777)
F_aim = reshape(sum(sum(sum(F,dim=4),dim=3),dim=2) * wgt, [3,3]) ! average of F
F_aim_lastInc = sum(sum(sum(F_lastInc,dim=5),dim=4),dim=3) * wgt ! average of F_lastInc
call IO_read_jobBinaryFile(777,'F_lambda',&
call IO_read_realFile(777,'F_lambda',&
trim(getSolverJobName()),size(F_lambda))
read (777,rec=1) F_lambda
close (777)
call IO_read_jobBinaryFile(777,'F_lambda_lastInc',&
call IO_read_realFile(777,'F_lambda_lastInc',&
trim(getSolverJobName()),size(F_lambda_lastInc))
read (777,rec=1) F_lambda_lastInc
close (777)
call IO_read_jobBinaryFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
call IO_read_realFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
read (777,rec=1) f_aimDot
close (777)
call IO_read_jobBinaryFile(777,'C_volAvg',trim(getSolverJobName()),size(C_volAvg))
call IO_read_realFile(777,'C_volAvg',trim(getSolverJobName()),size(C_volAvg))
read (777,rec=1) C_volAvg
close (777)
call IO_read_jobBinaryFile(777,'C_volAvgLastInc',trim(getSolverJobName()),size(C_volAvgLastInc))
call IO_read_realFile(777,'C_volAvgLastInc',trim(getSolverJobName()),size(C_volAvgLastInc))
read (777,rec=1) C_volAvgLastInc
close (777)
call IO_read_jobBinaryFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
call IO_read_realFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
read (777,rec=1) C_minMaxAvg
close (777)
endif
@ -289,7 +288,7 @@ use mesh, only: &
mesh_ipCoordinates, &
mesh_deformedCoordsFFT
use IO, only: &
IO_write_JobBinaryFile
IO_write_jobRealFile
use DAMASK_spectral_Utilities, only: &
grid, &
geomSize, &
@ -343,25 +342,25 @@ use mesh, only: &
if (restartWrite) then
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
call IO_write_jobBinaryFile(777,'F',size(F)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F',size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
close (777)
call IO_write_jobBinaryFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc
close (777)
call IO_write_jobBinaryFile(777,'F_lambda',size(F_lambda)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F_lambda',size(F_lambda)) ! writing deformation gradient field to file
write (777,rec=1) F_lambda
close (777)
call IO_write_jobBinaryFile(777,'F_lambda_lastInc',size(F_lambda_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lambda_lastInc',size(F_lambda_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lambda_lastInc
close (777)
call IO_write_jobBinaryFile(777,'F_aimDot',size(F_aimDot))
call IO_write_jobRealFile(777,'F_aimDot',size(F_aimDot))
write (777,rec=1) F_aimDot
close(777)
call IO_write_jobBinaryFile(777,'C_volAvg',size(C_volAvg))
call IO_write_jobRealFile(777,'C_volAvg',size(C_volAvg))
write (777,rec=1) C_volAvg
close(777)
call IO_write_jobBinaryFile(777,'C_volAvgLastInc',size(C_volAvgLastInc))
call IO_write_jobRealFile(777,'C_volAvgLastInc',size(C_volAvgLastInc))
write (777,rec=1) C_volAvgLastInc
close(777)
endif
@ -661,8 +660,8 @@ subroutine AL_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dummy,ierr
!--------------------------------------------------------------------------------------------------
! stress BC handling
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%P_BC))) ! S = 0.0 for no bc
err_BC = maxval(abs((1.0_pReal - mask_stress)*math_mul3333xx33(C_scale,F_aim-F_av) + &
mask_stress *(P_av - params%P_BC))) ! mask = 0.0 for no bc
err_BC = maxval(abs((-mask_stress+1.0_pReal)*math_mul3333xx33(C_scale,F_aim-F_av) + &
mask_stress *(P_av - params%P_BC))) ! mask = 0.0 for no bc
!--------------------------------------------------------------------------------------------------
! error calculation
@ -687,10 +686,10 @@ subroutine AL_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dummy,ierr
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(/,a,f12.2,a,es8.2,a,es9.2,a)') ' error curl = ', &
err_curl/curlTol,' (',err_curl,' -, tol =',curlTol,')'
write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div,' / m, tol =',divTol,')'
write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error stress BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div, ' / m, tol =',divTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)

View File

@ -69,8 +69,7 @@ subroutine basic_init(temperature)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
use IO, only: &
IO_read_JobBinaryFile, &
IO_write_JobBinaryFile, &
IO_read_realFile, &
IO_intOut, &
IO_timeStamp
use debug, only: &
@ -124,11 +123,11 @@ subroutine basic_init(temperature)
write(6,'(/,a,'//IO_intOut(restartInc-1_pInt)//',a)') &
'reading values of increment', restartInc - 1_pInt, 'from file'
flush(6)
call IO_read_jobBinaryFile(777,'F',&
call IO_read_realFile(777,'F',&
trim(getSolverJobName()),size(F))
read (777,rec=1) F
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc',&
call IO_read_realFile(777,'F_lastInc',&
trim(getSolverJobName()),size(F_lastInc))
read (777,rec=1) F_lastInc
close (777)
@ -136,16 +135,16 @@ subroutine basic_init(temperature)
F_aim = sum(sum(sum(F,dim=5),dim=4),dim=3) * wgt ! average of F
F_aim_lastInc = sum(sum(sum(F_lastInc,dim=5),dim=4),dim=3) * wgt ! average of F_lastInc
call IO_read_jobBinaryFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
call IO_read_realFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
read (777,rec=1) f_aimDot
close (777)
call IO_read_jobBinaryFile(777,'C',trim(getSolverJobName()),size(C))
call IO_read_realFile(777,'C',trim(getSolverJobName()),size(C))
read (777,rec=1) C
close (777)
call IO_read_jobBinaryFile(777,'C_lastInc',trim(getSolverJobName()),size(C_lastInc))
call IO_read_realFile(777,'C_lastInc',trim(getSolverJobName()),size(C_lastInc))
read (777,rec=1) C_lastInc
close (777)
call IO_read_jobBinaryFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
call IO_read_realFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
read (777,rec=1) temp3333_Real
close (777)
endif
@ -179,7 +178,7 @@ type(tSolutionState) function basic_solution(&
mesh_ipCoordinates,&
mesh_deformedCoordsFFT
use IO, only: &
IO_write_JobBinaryFile, &
IO_write_jobRealFile, &
IO_intOut
use debug, only: &
debug_level, &
@ -242,19 +241,19 @@ type(tSolutionState) function basic_solution(&
if (restartWrite) then
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
call IO_write_jobBinaryFile(777,'F',size(F)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F',size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
close (777)
call IO_write_jobBinaryFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc
close (777)
call IO_write_jobBinaryFile(777,'F_aimDot',size(f_aimDot))
call IO_write_jobRealFile(777,'F_aimDot',size(f_aimDot))
write (777,rec=1) f_aimDot
close(777)
call IO_write_jobBinaryFile(777,'C',size(C))
call IO_write_jobRealFile(777,'C',size(C))
write (777,rec=1) C
close(777)
call IO_write_jobBinaryFile(777,'C_lastInc',size(C_lastInc))
call IO_write_jobRealFile(777,'C_lastInc',size(C_lastInc))
write (777,rec=1) C_lastInc
close(777)
endif

View File

@ -115,8 +115,7 @@ subroutine basicPETSc_init(temperature)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
use IO, only: &
IO_intOut, &
IO_read_JobBinaryFile, &
IO_write_JobBinaryFile, &
IO_read_realFile, &
IO_timeStamp
use debug, only: &
debug_level, &
@ -196,31 +195,31 @@ subroutine basicPETSc_init(temperature)
write(6,'(/,a,'//IO_intOut(restartInc-1_pInt)//',a)') &
'reading values of increment', restartInc - 1_pInt, 'from file'
flush(6)
call IO_read_jobBinaryFile(777,'F',&
call IO_read_realFile(777,'F',&
trim(getSolverJobName()),size(F))
read (777,rec=1) F
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc',&
call IO_read_realFile(777,'F_lastInc',&
trim(getSolverJobName()),size(F_lastInc))
read (777,rec=1) F_lastInc
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc2',&
call IO_read_realFile(777,'F_lastInc2',&
trim(getSolverJobName()),size(F_lastInc2))
read (777,rec=1) F_lastInc2
close (777)
F_aim = reshape(sum(sum(sum(F,dim=4),dim=3),dim=2) * wgt, [3,3]) ! average of F
F_aim_lastInc = sum(sum(sum(F_lastInc,dim=5),dim=4),dim=3) * wgt ! average of F_lastInc
call IO_read_jobBinaryFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
call IO_read_realFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
read (777,rec=1) f_aimDot
close (777)
call IO_read_jobBinaryFile(777,'C_volAvg',trim(getSolverJobName()),size(C_volAvg))
call IO_read_realFile(777,'C_volAvg',trim(getSolverJobName()),size(C_volAvg))
read (777,rec=1) C_volAvg
close (777)
call IO_read_jobBinaryFile(777,'C_volAvgLastInc',trim(getSolverJobName()),size(C_volAvgLastInc))
call IO_read_realFile(777,'C_volAvgLastInc',trim(getSolverJobName()),size(C_volAvgLastInc))
read (777,rec=1) C_volAvgLastInc
close (777)
call IO_read_jobBinaryFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
call IO_read_realFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
read (777,rec=1) temp3333_Real
close (777)
endif
@ -254,7 +253,7 @@ type(tSolutionState) function basicPETSc_solution( &
mesh_ipCoordinates,&
mesh_deformedCoordsFFT
use IO, only: &
IO_write_JobBinaryFile
IO_write_JobRealFile
use DAMASK_spectral_Utilities, only: &
grid, &
geomSize, &
@ -302,22 +301,22 @@ type(tSolutionState) function basicPETSc_solution( &
if (restartWrite) then
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
call IO_write_jobBinaryFile(777,'F',size(F)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F',size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
close (777)
call IO_write_jobBinaryFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc
close (777)
call IO_write_jobBinaryFile(777,'F_lastInc2',size(F_lastInc2)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc2',size(F_lastInc2)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc2
close (777)
call IO_write_jobBinaryFile(777,'F_aimDot',size(F_aimDot))
call IO_write_jobRealFile(777,'F_aimDot',size(F_aimDot))
write (777,rec=1) F_aimDot
close(777)
call IO_write_jobBinaryFile(777,'C_volAvg',size(C_volAvg))
call IO_write_jobRealFile(777,'C_volAvg',size(C_volAvg))
write (777,rec=1) C_volAvg
close(777)
call IO_write_jobBinaryFile(777,'C_volAvgLastInc',size(C_volAvgLastInc))
call IO_write_jobRealFile(777,'C_volAvgLastInc',size(C_volAvgLastInc))
write (777,rec=1) C_volAvgLastInc
close(777)
endif

View File

@ -129,8 +129,7 @@ subroutine Polarisation_init(temperature)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran >4.6 at the moment)
use IO, only: &
IO_intOut, &
IO_read_JobBinaryFile, &
IO_write_JobBinaryFile, &
IO_read_realFile, &
IO_timeStamp
use debug, only : &
debug_level, &
@ -217,38 +216,38 @@ subroutine Polarisation_init(temperature)
write(6,'(/,a,'//IO_intOut(restartInc-1_pInt)//',a)') &
'reading values of increment', restartInc - 1_pInt, 'from file'
flush(6)
call IO_read_jobBinaryFile(777,'F',&
call IO_read_realFile(777,'F',&
trim(getSolverJobName()),size(F))
read (777,rec=1) F
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc',&
call IO_read_realFile(777,'F_lastInc',&
trim(getSolverJobName()),size(F_lastInc))
read (777,rec=1) F_lastInc
close (777)
call IO_read_jobBinaryFile(777,'F_lastInc2',&
call IO_read_realFile(777,'F_lastInc2',&
trim(getSolverJobName()),size(F_lastInc2))
read (777,rec=1) F_lastInc2
close (777)
F_aim = reshape(sum(sum(sum(F,dim=4),dim=3),dim=2) * wgt, [3,3]) ! average of F
F_aim_lastInc = sum(sum(sum(F_lastInc,dim=5),dim=4),dim=3) * wgt ! average of F_lastInc
call IO_read_jobBinaryFile(777,'F_tau',&
call IO_read_realFile(777,'F_tau',&
trim(getSolverJobName()),size(F_tau))
read (777,rec=1) F_tau
close (777)
call IO_read_jobBinaryFile(777,'F_tau_lastInc',&
call IO_read_realFile(777,'F_tau_lastInc',&
trim(getSolverJobName()),size(F_tau_lastInc))
read (777,rec=1) F_tau_lastInc
close (777)
call IO_read_jobBinaryFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
call IO_read_realFile(777,'F_aimDot',trim(getSolverJobName()),size(f_aimDot))
read (777,rec=1) f_aimDot
close (777)
call IO_read_jobBinaryFile(777,'C_volAvg',trim(getSolverJobName()),size(C_volAvg))
call IO_read_realFile(777,'C_volAvg',trim(getSolverJobName()),size(C_volAvg))
read (777,rec=1) C_volAvg
close (777)
call IO_read_jobBinaryFile(777,'C_volAvgLastInc',trim(getSolverJobName()),size(C_volAvgLastInc))
call IO_read_realFile(777,'C_volAvgLastInc',trim(getSolverJobName()),size(C_volAvgLastInc))
read (777,rec=1) C_volAvgLastInc
close (777)
call IO_read_jobBinaryFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
call IO_read_realFile(777,'C_ref',trim(getSolverJobName()),size(temp3333_Real))
read (777,rec=1) C_minMaxAvg
close (777)
endif
@ -289,7 +288,7 @@ use mesh, only: &
mesh_ipCoordinates, &
mesh_deformedCoordsFFT
use IO, only: &
IO_write_JobBinaryFile
IO_write_jobRealFile
use DAMASK_spectral_Utilities, only: &
grid, &
geomSize, &
@ -343,25 +342,25 @@ use mesh, only: &
if (restartWrite) then
write(6,'(/,a)') ' writing converged results for restart'
flush(6)
call IO_write_jobBinaryFile(777,'F',size(F)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F',size(F)) ! writing deformation gradient field to file
write (777,rec=1) F
close (777)
call IO_write_jobBinaryFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_lastInc',size(F_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_lastInc
close (777)
call IO_write_jobBinaryFile(777,'F_tau',size(F_tau)) ! writing deformation gradient field to file
call IO_write_jobRealFile(777,'F_tau',size(F_tau)) ! writing deformation gradient field to file
write (777,rec=1) F_tau
close (777)
call IO_write_jobBinaryFile(777,'F_tau_lastInc',size(F_tau_lastInc)) ! writing F_lastInc field to file
call IO_write_jobRealFile(777,'F_tau_lastInc',size(F_tau_lastInc)) ! writing F_lastInc field to file
write (777,rec=1) F_tau_lastInc
close (777)
call IO_write_jobBinaryFile(777,'F_aimDot',size(F_aimDot))
call IO_write_jobRealFile(777,'F_aimDot',size(F_aimDot))
write (777,rec=1) F_aimDot
close(777)
call IO_write_jobBinaryFile(777,'C_volAvg',size(C_volAvg))
call IO_write_jobRealFile(777,'C_volAvg',size(C_volAvg))
write (777,rec=1) C_volAvg
close(777)
call IO_write_jobBinaryFile(777,'C_volAvgLastInc',size(C_volAvgLastInc))
call IO_write_jobRealFile(777,'C_volAvgLastInc',size(C_volAvgLastInc))
write (777,rec=1) C_volAvgLastInc
close(777)
endif
@ -659,8 +658,8 @@ subroutine Polarisation_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,
!--------------------------------------------------------------------------------------------------
! stress BC handling
F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%P_BC))) ! S = 0.0 for no bc
err_BC = maxval(abs((1.0_pReal - mask_stress)*math_mul3333xx33(C_scale,F_aim-F_av) + &
mask_stress *(P_av - params%P_BC))) ! mask = 0.0 for no bc
err_BC = maxval(abs((-mask_stress+1.0_pReal)*math_mul3333xx33(C_scale,F_aim-F_av) + &
mask_stress *(P_av - params%P_BC))) ! mask = 0.0 for no bc
!--------------------------------------------------------------------------------------------------
! error calculation
@ -685,10 +684,10 @@ subroutine Polarisation_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,
write(6,'(1/,a)') ' ... reporting .............................................................'
write(6,'(/,a,f12.2,a,es8.2,a,es9.2,a)') ' error curl = ', &
err_curl/curlTol,' (',err_curl,' -, tol =',curlTol,')'
write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div,' / m, tol =',divTol,')'
write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
err_div/divTol, ' (',err_div, ' / m, tol =',divTol,')'
write(6,' (a,f12.2,a,es8.2,a,es9.2,a)') ' error BC = ', &
err_BC/BC_tol, ' (',err_BC, ' Pa, tol =',BC_tol,')'
write(6,'(/,a)') ' ==========================================================================='
flush(6)

View File

@ -318,7 +318,7 @@ end subroutine utilities_init
!--------------------------------------------------------------------------------------------------
subroutine utilities_updateGamma(C,saveReference)
use IO, only: &
IO_write_jobBinaryFile
IO_write_jobRealFile
use numerics, only: &
memory_efficient
use math, only: &
@ -337,7 +337,7 @@ subroutine utilities_updateGamma(C,saveReference)
if (saveReference) then
write(6,'(/,a)') ' writing reference stiffness to file'
flush(6)
call IO_write_jobBinaryFile(777,'C_ref',size(C_ref))
call IO_write_jobRealFile(777,'C_ref',size(C_ref))
write (777,rec=1) C_ref
close(777)
endif

File diff suppressed because it is too large Load Diff

View File

@ -92,7 +92,7 @@ subroutine constitutive_init
IO_open_file, &
IO_open_jobFile_stat, &
IO_write_jobFile, &
IO_write_jobBinaryIntFile, &
IO_write_jobIntFile, &
IO_timeStamp
use mesh, only: &
mesh_maxNips, &
@ -426,7 +426,7 @@ subroutine constitutive_init
!--------------------------------------------------------------------------------------------------
! write out state size file
call IO_write_jobBinaryIntFile(777,'sizeStateConst', size(constitutive_sizeState))
call IO_write_jobIntFile(777,'sizeStateConst', size(constitutive_sizeState))
write (777,rec=1) constitutive_sizeState
close(777)

View File

@ -489,48 +489,48 @@ enddo
myStructure = constitutive_dislotwin_structure(i)
!* Sanity checks
if (myStructure < 1_pInt) call IO_error(205_pInt,e=i)
if (sum(constitutive_dislotwin_Nslip(:,i)) < 0_pInt) call IO_error(211_pInt,e=i,ext_msg='Nslip (' &
//constitutive_dislotwin_label//')')
if (sum(constitutive_dislotwin_Ntwin(:,i)) < 0_pInt) call IO_error(211_pInt,e=i,ext_msg='Ntwin (' &
//constitutive_dislotwin_label//')')
if (myStructure < 1_pInt) call IO_error(205_pInt,el=i)
if (sum(constitutive_dislotwin_Nslip(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='Nslip (' &
//constitutive_dislotwin_label//')')
if (sum(constitutive_dislotwin_Ntwin(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='Ntwin (' &
//constitutive_dislotwin_label//')')
do f = 1_pInt,lattice_maxNslipFamily
if (constitutive_dislotwin_Nslip(f,i) > 0_pInt) then
if (constitutive_dislotwin_rhoEdge0(f,i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='rhoEdge0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_rhoEdgeDip0(f,i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='rhoEdgeDip0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_burgersPerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='slipBurgers (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_v0PerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='v0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_rhoEdge0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rhoEdge0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_rhoEdgeDip0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rhoEdgeDip0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_burgersPerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='slipBurgers (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_v0PerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='v0 (' &
//constitutive_dislotwin_label//')')
endif
enddo
do f = 1_pInt,lattice_maxNtwinFamily
if (constitutive_dislotwin_Ntwin(f,i) > 0_pInt) then
if (constitutive_dislotwin_burgersPerTwinFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='twinburgers (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_Ndot0PerTwinFamily(f,i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='ndot0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_burgersPerTwinFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='twinburgers (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_Ndot0PerTwinFamily(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='ndot0 (' &
//constitutive_dislotwin_label//')')
endif
enddo
if (constitutive_dislotwin_CAtomicVolume(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='cAtomicVolume (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_D0(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='D0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_Qsd(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='Qsd (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_CAtomicVolume(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='cAtomicVolume (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_D0(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='D0 (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_Qsd(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='Qsd (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_SFE_0K(i) == 0.0_pReal .and. &
constitutive_dislotwin_dSFE_dT(i) == 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='SFE (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_aTolRho(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='aTolRho (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_aTolTwinFrac(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='aTolTwinFrac (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_sbResistance(i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='sbResistance (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_sbVelocity(i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='sbVelocity (' &
//constitutive_dislotwin_label//')')
constitutive_dislotwin_dSFE_dT(i) == 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='SFE (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_aTolRho(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolRho (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_aTolTwinFrac(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolTwinFrac (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_sbResistance(i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='sbResistance (' &
//constitutive_dislotwin_label//')')
if (constitutive_dislotwin_sbVelocity(i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='sbVelocity (' &
//constitutive_dislotwin_label//')')
!* Determine total number of active slip or twin systems
constitutive_dislotwin_Nslip(:,i) = min(lattice_NslipSystem(:,myStructure),constitutive_dislotwin_Nslip(:,i))

View File

@ -261,7 +261,7 @@ subroutine constitutive_j2_init(myFile)
enddo
sanityChecks: do i = 1_pInt,maxNinstance
if (constitutive_j2_structureName(i) == '') call IO_error(205_pInt,e=i)
if (constitutive_j2_structureName(i) == '') call IO_error(205_pInt,el=i)
if (constitutive_j2_tau0(i) < 0.0_pReal) call IO_error(211_pInt,ext_msg='tau0 (' &
//CONSTITUTIVE_J2_label//')')
if (constitutive_j2_gdot0(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='gdot0 (' &

View File

@ -172,7 +172,7 @@ subroutine constitutive_none_init(myFile)
enddo
do i = 1_pInt,maxNinstance
if (constitutive_none_structureName(i) == '') call IO_error(205_pInt,e=i)
if (constitutive_none_structureName(i) == '') call IO_error(205_pInt,el=i)
enddo
instancesLoop: do i = 1_pInt,maxNinstance

View File

@ -611,7 +611,7 @@ do i = 1_pInt,maxNinstance
!*** sanity checks
if (myStructure < 1_pInt) &
call IO_error(205_pInt,e=i)
call IO_error(205_pInt,el=i)
if (sum(Nslip(:,i)) <= 0_pInt) &
call IO_error(211_pInt,ext_msg='Nslip ('//CONSTITUTIVE_NONLOCAL_LABEL//')')
do o = 1_pInt,maxval(phase_Noutput)

View File

@ -27,8 +27,7 @@
module constitutive_phenopowerlaw
use prec, only: &
pReal,&
pInt,&
tol_math_check
pInt
implicit none
private
@ -119,6 +118,8 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine constitutive_phenopowerlaw_init(myFile)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use prec, only: &
tol_math_check
use math, only: &
math_Mandel3333to66, &
math_Voigt66to3333
@ -429,28 +430,28 @@ subroutine constitutive_phenopowerlaw_init(myFile)
constitutive_phenopowerlaw_totalNslip(i) = sum(constitutive_phenopowerlaw_Nslip(:,i)) ! how many slip systems altogether
constitutive_phenopowerlaw_totalNtwin(i) = sum(constitutive_phenopowerlaw_Ntwin(:,i)) ! how many twin systems altogether
if (constitutive_phenopowerlaw_structure(i) < 1 ) call IO_error(205_pInt,i=i)
if (constitutive_phenopowerlaw_structure(i) < 1 ) call IO_error(205_pInt,el=i)
if (any(constitutive_phenopowerlaw_tau0_slip(:,i) < 0.0_pReal .and. &
constitutive_phenopowerlaw_Nslip(:,i) > 0)) call IO_error(211_pInt,i=i,ext_msg='tau0_slip (' &
constitutive_phenopowerlaw_Nslip(:,i) > 0)) call IO_error(211_pInt,el=i,ext_msg='tau0_slip (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if (constitutive_phenopowerlaw_gdot0_slip(i) <= 0.0_pReal) call IO_error(211_pInt,i=i,ext_msg='gdot0_slip (' &
if (constitutive_phenopowerlaw_gdot0_slip(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='gdot0_slip (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if (constitutive_phenopowerlaw_n_slip(i) <= 0.0_pReal) call IO_error(211_pInt,i=i,ext_msg='n_slip (' &
if (constitutive_phenopowerlaw_n_slip(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='n_slip (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if (any(constitutive_phenopowerlaw_tausat_slip(:,i) <= 0.0_pReal .and. &
constitutive_phenopowerlaw_Nslip(:,i) > 0)) call IO_error(211_pInt,i=i,ext_msg='tausat_slip (' &
constitutive_phenopowerlaw_Nslip(:,i) > 0)) call IO_error(211_pInt,el=i,ext_msg='tausat_slip (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if (any(constitutive_phenopowerlaw_a_slip(i) == 0.0_pReal .and. &
constitutive_phenopowerlaw_Nslip(:,i) > 0)) call IO_error(211_pInt,i=i,ext_msg='a_slip (' &
constitutive_phenopowerlaw_Nslip(:,i) > 0)) call IO_error(211_pInt,el=i,ext_msg='a_slip (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if (any(constitutive_phenopowerlaw_tau0_twin(:,i) < 0.0_pReal .and. &
constitutive_phenopowerlaw_Ntwin(:,i) > 0)) call IO_error(211_pInt,i=i,ext_msg='tau0_twin (' &
constitutive_phenopowerlaw_Ntwin(:,i) > 0)) call IO_error(211_pInt,el=i,ext_msg='tau0_twin (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if ( constitutive_phenopowerlaw_gdot0_twin(i) <= 0.0_pReal .and. &
any(constitutive_phenopowerlaw_Ntwin(:,i) > 0)) call IO_error(211_pInt,i=i,ext_msg='gdot0_twin (' &
any(constitutive_phenopowerlaw_Ntwin(:,i) > 0)) call IO_error(211_pInt,el=i,ext_msg='gdot0_twin (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if ( constitutive_phenopowerlaw_n_twin(i) <= 0.0_pReal .and. &
any(constitutive_phenopowerlaw_Ntwin(:,i) > 0)) call IO_error(211_pInt,i=i,ext_msg='n_twin (' &
any(constitutive_phenopowerlaw_Ntwin(:,i) > 0)) call IO_error(211_pInt,el=i,ext_msg='n_twin (' &
//CONSTITUTIVE_PHENOPOWERLAW_label//')')
if (constitutive_phenopowerlaw_aTolResistance(i) <= 0.0_pReal) &
constitutive_phenopowerlaw_aTolResistance(i) = 1.0_pReal ! default absolute tolerance 1 Pa

View File

@ -615,58 +615,59 @@ subroutine constitutive_titanmod_init(myFile)
lattice_initializeStructure(constitutive_titanmod_structureName(i),constitutive_titanmod_CoverA(i))
myStructure = constitutive_titanmod_structure(i)
if (myStructure < 1_pInt) call IO_error(205_pInt,e=i)
if (sum(constitutive_titanmod_Nslip(:,i)) <= 0_pInt) call IO_error(211_pInt,e=i,ext_msg='nslip (' &
if (myStructure < 1_pInt) call IO_error(205_pInt,el=i)
if (sum(constitutive_titanmod_Nslip(:,i)) <= 0_pInt) call IO_error(211_pInt,el=i,ext_msg='nslip (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (sum(constitutive_titanmod_Ntwin(:,i)) < 0_pInt) call IO_error(211_pInt,e=i,ext_msg='ntwin (' &
if (sum(constitutive_titanmod_Ntwin(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='ntwin (' &
//CONSTITUTIVE_TITANMOD_label//')')
do f = 1_pInt,lattice_maxNslipFamily
if (constitutive_titanmod_Nslip(f,i) > 0_pInt) then
if (constitutive_titanmod_rho_edge0(f,i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='rho_edge0 (' &
if (constitutive_titanmod_rho_edge0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rho_edge0 (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_rho_screw0(f,i) < 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='rho_screw0 (' &
if (constitutive_titanmod_rho_screw0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rho_screw0 (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_burgersPerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='slipburgers (' &
if (constitutive_titanmod_burgersPerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='slipburgers (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_f0_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='f0 (' &
if (constitutive_titanmod_f0_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='f0 (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_tau0e_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='tau0e (' &
if (constitutive_titanmod_tau0e_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='tau0e (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_tau0s_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='tau0s (' &
if (constitutive_titanmod_tau0s_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='tau0s (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_capre_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='capre (' &
if (constitutive_titanmod_capre_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='capre (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_caprs_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='caprs (' &
if (constitutive_titanmod_caprs_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='caprs (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_v0e_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='v0e (' &
if (constitutive_titanmod_v0e_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='v0e (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_v0s_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='v0s (' &
if (constitutive_titanmod_v0s_PerSlipFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='v0s (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_kinkcriticallength_PerSlipFam(f,i) <= 0.0_pReal) &
call IO_error(211_pInt,e=i,ext_msg='kinkCriticalLength (' &
call IO_error(211_pInt,el=i,ext_msg='kinkCriticalLength (' &
//CONSTITUTIVE_TITANMOD_label//')')
endif
enddo
do f = 1_pInt,lattice_maxNtwinFamily
if (constitutive_titanmod_Ntwin(f,i) > 0_pInt) then
if (constitutive_titanmod_burgersPerTwinFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='twinburgers (' &
if (constitutive_titanmod_burgersPerTwinFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='twinburgers (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_twinf0_PerTwinFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='twinf0 (' &
if (constitutive_titanmod_twinf0_PerTwinFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='twinf0 (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_twinshearconstant_PerTwinFam(f,i) <= 0.0_pReal) &
call IO_error(211_pInt,e=i,ext_msg='twinshearconstant (' &
call IO_error(211_pInt,el=i,ext_msg='twinshearconstant (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_twintau0_PerTwinFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='twintau0 (' &
if (constitutive_titanmod_twintau0_PerTwinFam(f,i) <= 0.0_pReal)call IO_error(211_pInt,el=i,ext_msg='twintau0 (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_twingamma0_PerTwinFam(f,i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='twingamma0 (' &
if (constitutive_titanmod_twingamma0_PerTwinFam(f,i) <= 0.0_pReal) &
call IO_error(211_pInt,el=i,ext_msg='twingamma0 (' &
//CONSTITUTIVE_TITANMOD_label//')')
endif
enddo
if (constitutive_titanmod_dc(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='dc (' &
if (constitutive_titanmod_dc(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='dc (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_twinhpconstant(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='twinhpconstant (' &
if (constitutive_titanmod_twinhpconstant(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='twinhpconstant (' &
//CONSTITUTIVE_TITANMOD_label//')')
if (constitutive_titanmod_aTolRho(i) <= 0.0_pReal) call IO_error(211_pInt,e=i,ext_msg='aTolRho (' &
if (constitutive_titanmod_aTolRho(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolRho (' &
//CONSTITUTIVE_TITANMOD_label//')')
!* Determine total number of active slip or twin systems

View File

@ -104,7 +104,7 @@ subroutine homogenization_init(Temperature)
IO_open_file, &
IO_open_jobFile_stat, &
IO_write_jobFile, &
IO_write_jobBinaryIntFile, &
IO_write_jobIntFile, &
IO_timeStamp
use mesh, only: &
mesh_maxNips, &
@ -235,7 +235,7 @@ subroutine homogenization_init(Temperature)
!--------------------------------------------------------------------------------------------------
! write state size file out
call IO_write_jobBinaryIntFile(777,'sizeStateHomog',size(homogenization_sizeState))
call IO_write_jobIntFile(777,'sizeStateHomog',size(homogenization_sizeState))
write (777,rec=1) homogenization_sizeState
close(777)

View File

@ -878,7 +878,7 @@ subroutine material_populateGrains
enddo
if (grain /= myNgrains) &
call IO_error(0,e = homog,i = micro,ext_msg = 'inconsistent grain count after volume calc')
call IO_error(0,el = homog,ip = micro,ext_msg = 'inconsistent grain count after volume calc')
!--------------------------------------------------------------------------------------------------
! divide myNgrains as best over constituents

View File

@ -1413,10 +1413,10 @@ function mesh_regrid(adaptive,resNewInput,minRes)
GeometryFile
use IO, only: &
IO_open_file, &
IO_read_jobBinaryFile ,&
IO_read_jobBinaryIntFile ,&
IO_write_jobBinaryFile, &
IO_write_jobBinaryIntFile, &
IO_read_realFile ,&
IO_read_intFile ,&
IO_write_jobRealFile, &
IO_write_jobIntFile, &
IO_write_jobFile, &
IO_error
use numerics, only: &
@ -1495,14 +1495,14 @@ function mesh_regrid(adaptive,resNewInput,minRes)
select case(myspectralsolver)
case('basic')
allocate(spectralF33(3,3,grid(1),grid(2),grid(3)))
call IO_read_jobBinaryFile(777,'F',trim(getSolverJobName()),size(spectralF33))
call IO_read_realFile(777,'F',trim(getSolverJobName()),size(spectralF33))
read (777,rec=1) spectralF33
close (777)
Favg = sum(sum(sum(spectralF33,dim=5),dim=4),dim=3) * wgt
coordinates = reshape(mesh_deformedCoordsFFT(geomSize,spectralF33),[3,mesh_NcpElems])
case('basicpetsc','al')
allocate(spectralF9(9,grid(1),grid(2),grid(3)))
call IO_read_jobBinaryFile(777,'F',trim(getSolverJobName()),size(spectralF9))
call IO_read_realFile(777,'F',trim(getSolverJobName()),size(spectralF9))
read (777,rec=1) spectralF9
close (777)
Favg = reshape(sum(sum(sum(spectralF9,dim=4),dim=3),dim=2) * wgt, [3,3])
@ -1648,14 +1648,14 @@ function mesh_regrid(adaptive,resNewInput,minRes)
case('basic')
allocate(spectralF33New(3,3,resNew(1),resNew(2),resNew(3)))
spectralF33New = spread(spread(spread(Favg,3,resNew(1)),4,resNew(2)),5,resNew(3))
call IO_write_jobBinaryFile(777,'F',size(spectralF33New))
call IO_write_jobRealFile(777,'F',size(spectralF33New))
write (777,rec=1) spectralF33New
close (777)
case('basicpetsc','al')
allocate(spectralF9New(9,resNew(1),resNew(2),resNew(3)))
spectralF9New = spread(spread(spread(reshape(Favg,[9]),2,resNew(1)),3,resNew(2)),4,resNew(3))
call IO_write_jobBinaryFile(777,'F',size(spectralF9New))
call IO_write_jobRealFile(777,'F',size(spectralF9New))
write (777,rec=1) spectralF9New
close (777)
end select
@ -1663,14 +1663,14 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!---------------------------------------------------------------------------------
allocate(F_lastIncNew(3,3,resNew(1),resNew(2),resNew(3)))
call IO_read_jobBinaryFile(777,'F_aim_lastInc', &
call IO_read_realFile(777,'F_aim_lastInc', &
trim(getSolverJobName()),size(Favg_LastInc))
read (777,rec=1) Favg_LastInc
close (777)
F_lastIncNew = spread(spread(spread(Favg_LastInc,3,resNew(1)),4,resNew(2)),5,resNew(3))
call IO_write_jobBinaryFile(777,'convergedSpectralDefgrad_lastInc',size(F_LastIncNew))
call IO_write_jobRealFile(777,'convergedSpectralDefgrad_lastInc',size(F_LastIncNew))
write (777,rec=1) F_LastIncNew
close (777)
@ -1679,7 +1679,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
! relocating data of material subroutine ---------------------------------------------------------
allocate(material_phase (1,1, mesh_NcpElems))
allocate(material_phaseNew (1,1, NpointsNew))
call IO_read_jobBinaryIntFile(777,'recordedPhase',trim(getSolverJobName()),size(material_phase))
call IO_read_intFile(777,'recordedPhase',trim(getSolverJobName()),size(material_phase))
read (777,rec=1) material_phase
close (777)
do i = 1, NpointsNew
@ -1691,7 +1691,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
write(6,*) material_phase(1,1,i), 'not found in material_phaseNew'
endif
enddo
call IO_write_jobBinaryIntFile(777,'recordedPhase',size(material_phaseNew))
call IO_write_jobIntFile(777,'recordedPhase',size(material_phaseNew))
write (777,rec=1) material_phaseNew
close (777)
deallocate(material_phase)
@ -1699,14 +1699,14 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!---------------------------------------------------------------------------
allocate(F (3,3,1,1, mesh_NcpElems))
allocate(FNew (3,3,1,1, NpointsNew))
call IO_read_jobBinaryFile(777,'convergedF',trim(getSolverJobName()),size(F))
call IO_read_realFile(777,'convergedF',trim(getSolverJobName()),size(F))
read (777,rec=1) F
close (777)
do i = 1, NpointsNew
FNew(1:3,1:3,1,1,i) = F(1:3,1:3,1,1,indices(i))
enddo
call IO_write_jobBinaryFile(777,'convergedF',size(FNew))
call IO_write_jobRealFile(777,'convergedF',size(FNew))
write (777,rec=1) FNew
close (777)
deallocate(F)
@ -1714,14 +1714,14 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!---------------------------------------------------------------------
allocate(Fp (3,3,1,1,mesh_NcpElems))
allocate(FpNew (3,3,1,1,NpointsNew))
call IO_read_jobBinaryFile(777,'convergedFp',trim(getSolverJobName()),size(Fp))
call IO_read_realFile(777,'convergedFp',trim(getSolverJobName()),size(Fp))
read (777,rec=1) Fp
close (777)
do i = 1, NpointsNew
FpNew(1:3,1:3,1,1,i) = Fp(1:3,1:3,1,1,indices(i))
enddo
call IO_write_jobBinaryFile(777,'convergedFp',size(FpNew))
call IO_write_jobRealFile(777,'convergedFp',size(FpNew))
write (777,rec=1) FpNew
close (777)
deallocate(Fp)
@ -1729,13 +1729,13 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!------------------------------------------------------------------------
allocate(Lp (3,3,1,1,mesh_NcpElems))
allocate(LpNew (3,3,1,1,NpointsNew))
call IO_read_jobBinaryFile(777,'convergedLp',trim(getSolverJobName()),size(Lp))
call IO_read_realFile(777,'convergedLp',trim(getSolverJobName()),size(Lp))
read (777,rec=1) Lp
close (777)
do i = 1, NpointsNew
LpNew(1:3,1:3,1,1,i) = Lp(1:3,1:3,1,1,indices(i))
enddo
call IO_write_jobBinaryFile(777,'convergedLp',size(LpNew))
call IO_write_jobRealFile(777,'convergedLp',size(LpNew))
write (777,rec=1) LpNew
close (777)
deallocate(Lp)
@ -1743,13 +1743,13 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!----------------------------------------------------------------------------
allocate(dcsdE (6,6,1,1,mesh_NcpElems))
allocate(dcsdENew (6,6,1,1,NpointsNew))
call IO_read_jobBinaryFile(777,'convergeddcsdE',trim(getSolverJobName()),size(dcsdE))
call IO_read_realFile(777,'convergeddcsdE',trim(getSolverJobName()),size(dcsdE))
read (777,rec=1) dcsdE
close (777)
do i = 1, NpointsNew
dcsdENew(1:6,1:6,1,1,i) = dcsdE(1:6,1:6,1,1,indices(i))
enddo
call IO_write_jobBinaryFile(777,'convergeddcsdE',size(dcsdENew))
call IO_write_jobRealFile(777,'convergeddcsdE',size(dcsdENew))
write (777,rec=1) dcsdENew
close (777)
deallocate(dcsdE)
@ -1757,13 +1757,13 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!---------------------------------------------------------------------------
allocate(dPdF (3,3,3,3,1,1,mesh_NcpElems))
allocate(dPdFNew (3,3,3,3,1,1,NpointsNew))
call IO_read_jobBinaryFile(777,'convergeddPdF',trim(getSolverJobName()),size(dPdF))
call IO_read_realFile(777,'convergeddPdF',trim(getSolverJobName()),size(dPdF))
read (777,rec=1) dPdF
close (777)
do i = 1, NpointsNew
dPdFNew(1:3,1:3,1:3,1:3,1,1,i) = dPdF(1:3,1:3,1:3,1:3,1,1,indices(i))
enddo
call IO_write_jobBinaryFile(777,'convergeddPdF',size(dPdFNew))
call IO_write_jobRealFile(777,'convergeddPdF',size(dPdFNew))
write (777,rec=1) dPdFNew
close (777)
deallocate(dPdF)
@ -1771,13 +1771,13 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!---------------------------------------------------------------------------
allocate(Tstar (6,1,1,mesh_NcpElems))
allocate(TstarNew (6,1,1,NpointsNew))
call IO_read_jobBinaryFile(777,'convergedTstar',trim(getSolverJobName()),size(Tstar))
call IO_read_realFile(777,'convergedTstar',trim(getSolverJobName()),size(Tstar))
read (777,rec=1) Tstar
close (777)
do i = 1, NpointsNew
TstarNew(1:6,1,1,i) = Tstar(1:6,1,1,indices(i))
enddo
call IO_write_jobBinaryFile(777,'convergedTstar',size(TstarNew))
call IO_write_jobRealFile(777,'convergedTstar',size(TstarNew))
write (777,rec=1) TstarNew
close (777)
deallocate(Tstar)
@ -1785,13 +1785,13 @@ function mesh_regrid(adaptive,resNewInput,minRes)
! for the state, we first have to know the size------------------------------------------------------------------
allocate(sizeStateConst(1,1,mesh_NcpElems))
call IO_read_jobBinaryIntFile(777,'sizeStateConst',trim(getSolverJobName()),size(sizeStateConst))
call IO_read_intFile(777,'sizeStateConst',trim(getSolverJobName()),size(sizeStateConst))
read (777,rec=1) sizeStateConst
close (777)
maxsize = maxval(sizeStateConst(1,1,1:mesh_NcpElems))
allocate(StateConst (1,1,mesh_NcpElems,maxsize))
call IO_read_jobBinaryFile(777,'convergedStateConst',trim(getSolverJobName()))
call IO_read_realFile(777,'convergedStateConst',trim(getSolverJobName()))
k = 0_pInt
do i =1, mesh_NcpElems
do j = 1,sizeStateConst(1,1,i)
@ -1800,7 +1800,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
enddo
enddo
close(777)
call IO_write_jobBinaryFile(777,'convergedStateConst')
call IO_write_jobRealFile(777,'convergedStateConst')
k = 0_pInt
do i = 1,NpointsNew
do j = 1,sizeStateConst(1,1,indices(i))
@ -1813,13 +1813,13 @@ function mesh_regrid(adaptive,resNewInput,minRes)
deallocate(StateConst)
!----------------------------------------------------------------------------
allocate(sizeStateHomog(1,mesh_NcpElems))
call IO_read_jobBinaryIntFile(777,'sizeStateHomog',trim(getSolverJobName()),size(sizeStateHomog))
call IO_read_intFile(777,'sizeStateHomog',trim(getSolverJobName()),size(sizeStateHomog))
read (777,rec=1) sizeStateHomog
close (777)
maxsize = maxval(sizeStateHomog(1,1:mesh_NcpElems))
allocate(stateHomog (1,mesh_NcpElems,maxsize))
call IO_read_jobBinaryFile(777,'convergedStateHomog',trim(getSolverJobName()))
call IO_read_realFile(777,'convergedStateHomog',trim(getSolverJobName()))
k = 0_pInt
do i =1, mesh_NcpElems
do j = 1,sizeStateHomog(1,i)
@ -1828,7 +1828,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
enddo
enddo
close(777)
call IO_write_jobBinaryFile(777,'convergedStateHomog')
call IO_write_jobRealFile(777,'convergedStateHomog')
k = 0_pInt
do i = 1,NpointsNew
do j = 1,sizeStateHomog(1,indices(i))
@ -4092,8 +4092,8 @@ subroutine mesh_tell_statistics
allocate (mesh_HomogMicro(mesh_maxValStateVar(1),mesh_maxValStateVar(2))); mesh_HomogMicro = 0_pInt
do e = 1_pInt,mesh_NcpElems
if (mesh_element(3,e) < 1_pInt) call IO_error(error_ID=170_pInt,e=e) ! no homogenization specified
if (mesh_element(4,e) < 1_pInt) call IO_error(error_ID=180_pInt,e=e) ! no microstructure specified
if (mesh_element(3,e) < 1_pInt) call IO_error(error_ID=170_pInt,el=e) ! no homogenization specified
if (mesh_element(4,e) < 1_pInt) call IO_error(error_ID=180_pInt,el=e) ! no microstructure specified
mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) = &
mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) + 1_pInt ! count combinations of homogenization and microstructure
enddo