report information on staggered iterations

This commit is contained in:
Martin Diehl 2023-07-19 02:30:07 +02:00
parent 5e9162b073
commit 5b56b13c64
3 changed files with 6 additions and 10 deletions

View File

@ -341,7 +341,7 @@ program DAMASK_grid
if (worldrank == 0) then
writeHeader: if (CLI_restartInc < 1) then
open(newunit=statUnit,file=trim(getSolverJobName())//'.sta',form='FORMATTED',status='REPLACE')
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded StagIterationsNeeded' ! statistics file
else writeHeader
open(newunit=statUnit,file=trim(getSolverJobName())//&
'.sta',form='FORMATTED', position='APPEND', status='OLD')
@ -415,9 +415,11 @@ program DAMASK_grid
!--------------------------------------------------------------------------------------------------
! solve fields
stagIter = 0
stagIter = 1
stagIterate = .true.
do while (stagIterate)
if (nActiveFields > 1) print'(/,1x,a,i0)', 'Staggered Iteration ',stagIter
do field = 1, nActiveFields
select case(ID(field))
case(FIELD_MECH_ID)
@ -432,7 +434,7 @@ program DAMASK_grid
end do
stagIter = stagIter + 1
stagIterate = stagIter < stagItMax &
stagIterate = stagIter <= stagItMax &
.and. all(solres(:)%converged) &
.and. .not. all(solres(:)%stagConverged) ! stationary with respect to staggered iteration
end do
@ -448,7 +450,7 @@ program DAMASK_grid
guess = .true. ! start guessing after first converged (sub)inc
if (worldrank == 0) then
write(statUnit,*) totalIncsCounter, t, cutBackLevel, &
solres(1)%converged, solres(1)%iterationsNeeded
solres(1)%converged, solres(1)%iterationsNeeded, StagIter
flush(statUnit)
end if
elseif (cutBackLevel < maxCutBack) then ! further cutbacking tolerated?

View File

@ -92,7 +92,6 @@ subroutine grid_damage_spectral_init(num_grid)
petsc_options
print'(/,1x,a)', '<<<+- grid_spectral_damage init -+>>>'
print'(/,1x,a)', 'P. Shanthraj et al., Handbook of Mechanics of Materials, 2019'
@ -227,8 +226,6 @@ function grid_damage_spectral_solution(Delta_t) result(solution)
SNESConvergedReason :: reason
solution%converged = .false.
!--------------------------------------------------------------------------------------------------
! set module wide availabe data
params%Delta_t = Delta_t

View File

@ -88,7 +88,6 @@ subroutine grid_thermal_spectral_init(num_grid)
petsc_options
print'(/,1x,a)', '<<<+- grid_thermal_spectral init -+>>>'
print'(/,1x,a)', 'P. Shanthraj et al., Handbook of Mechanics of Materials, 2019'
@ -204,8 +203,6 @@ function grid_thermal_spectral_solution(Delta_t) result(solution)
SNESConvergedReason :: reason
solution%converged = .false.
!--------------------------------------------------------------------------------------------------
! set module wide availabe data
params%Delta_t = Delta_t