switch on restartRead logical when requested by "--restart" cmdline switch
This commit is contained in:
parent
380f40561b
commit
d9c6f9e134
|
@ -404,13 +404,13 @@ program DAMASK_spectral
|
||||||
else
|
else
|
||||||
write(6,'(a)')'deformation gradient rate:'
|
write(6,'(a)')'deformation gradient rate:'
|
||||||
endif
|
endif
|
||||||
write (*,'(3(3(f12.7,1x)/))',advance='no') merge(math_transpose33(bc(loadcase)%deformation),&
|
write (6,'(3(3(f12.7,1x)/))',advance='no') merge(math_transpose33(bc(loadcase)%deformation),&
|
||||||
reshape(spread(DAMASK_NaN,1,9),[ 3,3]),transpose(bc(loadcase)%maskDeformation))
|
reshape(spread(DAMASK_NaN,1,9),[ 3,3]),transpose(bc(loadcase)%maskDeformation))
|
||||||
write (*,'(a,/,3(3(f12.7,1x)/))',advance='no') ' stress / GPa:',&
|
write (6,'(a,/,3(3(f12.7,1x)/))',advance='no') ' stress / GPa:',&
|
||||||
1e-9_pReal*merge(math_transpose33(bc(loadcase)%stress),&
|
1e-9_pReal*merge(math_transpose33(bc(loadcase)%stress),&
|
||||||
reshape(spread(DAMASK_NaN,1,9),[ 3,3]),transpose(bc(loadcase)%maskStress))
|
reshape(spread(DAMASK_NaN,1,9),[ 3,3]),transpose(bc(loadcase)%maskStress))
|
||||||
if (any(bc(loadcase)%rotation /= math_I3)) &
|
if (any(bc(loadcase)%rotation /= math_I3)) &
|
||||||
write (*,'(a,/,3(3(f12.7,1x)/))',advance='no') ' rotation of loadframe:',&
|
write (6,'(a,/,3(3(f12.7,1x)/))',advance='no') ' rotation of loadframe:',&
|
||||||
math_transpose33(bc(loadcase)%rotation)
|
math_transpose33(bc(loadcase)%rotation)
|
||||||
write(6,'(a,f12.6)') 'temperature:', bc(loadcase)%temperature
|
write(6,'(a,f12.6)') 'temperature:', bc(loadcase)%temperature
|
||||||
write(6,'(a,f12.6)') 'time: ', bc(loadcase)%time
|
write(6,'(a,f12.6)') 'time: ', bc(loadcase)%time
|
||||||
|
@ -527,7 +527,7 @@ program DAMASK_spectral
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! get reference material stifness and init fields to no deformation
|
! get reference material stiffness and init fields to no deformation
|
||||||
ielem = 0_pInt
|
ielem = 0_pInt
|
||||||
do k = 1_pInt, res(3); do j = 1_pInt, res(2); do i = 1_pInt, res(1)
|
do k = 1_pInt, res(3); do j = 1_pInt, res(2); do i = 1_pInt, res(1)
|
||||||
ielem = ielem + 1_pInt
|
ielem = ielem + 1_pInt
|
||||||
|
|
|
@ -32,7 +32,7 @@ module DAMASK_interface
|
||||||
logical, public :: &
|
logical, public :: &
|
||||||
appendToOutFile = .false. !< Append to existing spectralOut file (in case of restart, not in case of regridding)
|
appendToOutFile = .false. !< Append to existing spectralOut file (in case of restart, not in case of regridding)
|
||||||
integer(pInt), public :: &
|
integer(pInt), public :: &
|
||||||
spectralRestart = 1_pInt !< Increment at which calculation starts
|
spectralRestartInc = 1_pInt !< Increment at which calculation starts
|
||||||
character(len=1024), public :: &
|
character(len=1024), public :: &
|
||||||
geometryFile = '', & !< parameter given for geometry file
|
geometryFile = '', & !< parameter given for geometry file
|
||||||
loadCaseFile = '' !< parameter given for load case file
|
loadCaseFile = '' !< parameter given for load case file
|
||||||
|
@ -80,8 +80,7 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
dateAndTime ! type default integer
|
dateAndTime ! type default integer
|
||||||
logical :: &
|
logical :: &
|
||||||
gotLoadCase = .false., &
|
gotLoadCase = .false., &
|
||||||
gotGeometry = .false., &
|
gotGeometry = .false.
|
||||||
gotRestart = .false.
|
|
||||||
|
|
||||||
write(6,'(a)') ''
|
write(6,'(a)') ''
|
||||||
write(6,'(a)') '<<<+- DAMASK_spectral_interface init -+>>>'
|
write(6,'(a)') '<<<+- DAMASK_spectral_interface init -+>>>'
|
||||||
|
@ -91,7 +90,7 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
if ( present(loadcaseParameterIn) .and. present(geometryParameterIn)) then ! both mandatory parameters given in function call
|
if ( present(loadcaseParameterIn) .and. present(geometryParameterIn)) then ! both mandatory parameters given in function call
|
||||||
geometryParameter = geometryParameterIn
|
geometryParameter = geometryParameterIn
|
||||||
loadcaseParameter = loadcaseParameterIn
|
loadcaseParameter = loadcaseParameterIn
|
||||||
commandLine='n/a'
|
commandLine = 'n/a'
|
||||||
gotLoadCase = .true.
|
gotLoadCase = .true.
|
||||||
gotGeometry = .true.
|
gotGeometry = .true.
|
||||||
else if ( .not.( present(loadcaseParameterIn) .and. present(geometryParameterIn))) then ! none parameters given in function call, trying to get them from command line
|
else if ( .not.( present(loadcaseParameterIn) .and. present(geometryParameterIn))) then ! none parameters given in function call, trying to get them from command line
|
||||||
|
@ -145,32 +144,17 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
write(6,'(a)') ' '
|
write(6,'(a)') ' '
|
||||||
call quit(0_pInt) ! normal Termination
|
call quit(0_pInt) ! normal Termination
|
||||||
case ('-l', '--load', '--loadcase')
|
case ('-l', '--load', '--loadcase')
|
||||||
if (gotLoadCase) then
|
|
||||||
write(6,'(a)') 'Got 2nd time loadcase keyword'
|
|
||||||
call quit(1_pInt)
|
|
||||||
endif
|
|
||||||
loadcaseParameter = IO_stringValue(commandLine,positions,i+1_pInt)
|
loadcaseParameter = IO_stringValue(commandLine,positions,i+1_pInt)
|
||||||
gotLoadCase = .true.
|
gotLoadCase = .true.
|
||||||
case ('-g', '--geom', '--geometry')
|
case ('-g', '--geom', '--geometry')
|
||||||
if (gotGeometry) then
|
|
||||||
write(6,'(a)') 'Got 2nd time geometry keyword'
|
|
||||||
call quit(1_pInt)
|
|
||||||
endif
|
|
||||||
geometryParameter = IO_stringValue(commandLine,positions,i+1_pInt)
|
geometryParameter = IO_stringValue(commandLine,positions,i+1_pInt)
|
||||||
gotGeometry = .true.
|
gotGeometry = .true.
|
||||||
case ('-r', '--rs', '--restart')
|
case ('-r', '--rs', '--restart')
|
||||||
spectralRestart = IO_IntValue(commandLine,positions,i+1_pInt)
|
spectralRestartInc = IO_IntValue(commandLine,positions,i+1_pInt)
|
||||||
appendToOutFile = .true.
|
appendToOutFile = .true.
|
||||||
if (gotRestart) then
|
|
||||||
write(6,'(a)') 'Got 2nd time restart/regrid keyword'
|
|
||||||
call quit(1_pInt)
|
|
||||||
endif
|
|
||||||
case ('--rg', '--regrid')
|
case ('--rg', '--regrid')
|
||||||
spectralRestart = IO_IntValue(commandLine,positions,i+1_pInt)
|
spectralRestartInc = IO_IntValue(commandLine,positions,i+1_pInt)
|
||||||
if (gotRestart) then
|
appendToOutFile = .false.
|
||||||
write(6,'(a)') 'Got 2nd time restart/regrid keyword'
|
|
||||||
call quit(1_pInt)
|
|
||||||
endif
|
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
|
@ -199,8 +183,8 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
write(6,'(a,a)') 'Command line call: ', trim(commandLine)
|
write(6,'(a,a)') 'Command line call: ', trim(commandLine)
|
||||||
write(6,'(a,a)') 'Geometry parameter: ', trim(geometryParameter)
|
write(6,'(a,a)') 'Geometry parameter: ', trim(geometryParameter)
|
||||||
write(6,'(a,a)') 'Loadcase parameter: ', trim(loadcaseParameter)
|
write(6,'(a,a)') 'Loadcase parameter: ', trim(loadcaseParameter)
|
||||||
if (SpectralRestart > 1) write(6,'(a,i6.6)') &
|
if (SpectralRestartInc > 1_pInt) write(6,'(a,i6.6)') &
|
||||||
'Restart at increment: ', spectralRestart
|
'Restart at increment: ', spectralRestartInc
|
||||||
write(6,'(a,l1)') 'Append to result file: ', appendToOutFile
|
write(6,'(a,l1)') 'Append to result file: ', appendToOutFile
|
||||||
|
|
||||||
end subroutine DAMASK_interface_init
|
end subroutine DAMASK_interface_init
|
||||||
|
|
|
@ -103,11 +103,12 @@ subroutine FE_init
|
||||||
|
|
||||||
#ifdef Spectral
|
#ifdef Spectral
|
||||||
modelName = getSolverJobName()
|
modelName = getSolverJobName()
|
||||||
restartInc = spectralRestart
|
restartInc = spectralRestartInc
|
||||||
if(restartInc <= 0_pInt) then
|
if(restartInc <= 0_pInt) then
|
||||||
call IO_warning(warning_ID=34_pInt)
|
call IO_warning(warning_ID=34_pInt)
|
||||||
restartInc = 1_pInt
|
restartInc = 1_pInt
|
||||||
endif
|
endif
|
||||||
|
restartRead = restartInc > 1_pInt ! only read in if "true" restart requested
|
||||||
#else
|
#else
|
||||||
call IO_open_inputFile(fileunit,getSolverJobName())
|
call IO_open_inputFile(fileunit,getSolverJobName())
|
||||||
rewind(fileunit)
|
rewind(fileunit)
|
||||||
|
|
Loading…
Reference in New Issue