From 7ecb0245ec030bcca7e48e1f3075330ae0a614f4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 7 Dec 2019 11:10:48 +0100 Subject: [PATCH] simplified (use novel i0 format specifier) --- src/IO.f90 | 1 + src/grid/DAMASK_grid.f90 | 11 ++--------- src/mesh/DAMASK_FEM.f90 | 11 ++--------- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index a585fc7c4..8973860c2 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -544,6 +544,7 @@ end function IO_lc !-------------------------------------------------------------------------------------------------- !> @brief returns format string for integer values without leading zeros +!> @details deprecated, use '(i0)' format specifier !-------------------------------------------------------------------------------------------------- pure function IO_intOut(intToPrint) diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index e83cf3283..b6b415b5e 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -443,19 +443,12 @@ program DAMASK_spectral !-------------------------------------------------------------------------------------------------- ! report begin of new step write(6,'(/,a)') ' ###########################################################################' - write(6,'(1x,a,es12.5'//& - ',a,'//IO_intOut(inc) //',a,'//IO_intOut(loadCases(currentLoadCase)%incs)//& - ',a,'//IO_intOut(stepFraction) //',a,'//IO_intOut(subStepFactor**cutBackLevel)//& - ',a,'//IO_intOut(currentLoadCase)//',a,'//IO_intOut(size(loadCases))//')') & + write(6,'(1x,a,es12.5,6(a,i0))') & 'Time', time, & 's: Increment ', inc,'/',loadCases(currentLoadCase)%incs,& '-', stepFraction,'/',subStepFactor**cutBackLevel,& ' of load case ', currentLoadCase,'/',size(loadCases) - write(incInfo,& - '(a,'//IO_intOut(totalIncsCounter)//& - ',a,'//IO_intOut(sum(loadCases%incs))//& - ',a,'//IO_intOut(stepFraction)//& - ',a,'//IO_intOut(subStepFactor**cutBackLevel)//')') & + write(incInfo,'(4(a,i0))') & 'Increment ',totalIncsCounter,'/',sum(loadCases%incs),& '-', stepFraction,'/',subStepFactor**cutBackLevel flush(6) diff --git a/src/mesh/DAMASK_FEM.f90 b/src/mesh/DAMASK_FEM.f90 index 3d4c332a0..5ebcbe217 100644 --- a/src/mesh/DAMASK_FEM.f90 +++ b/src/mesh/DAMASK_FEM.f90 @@ -296,19 +296,12 @@ program DAMASK_FEM !-------------------------------------------------------------------------------------------------- ! report begin of new step write(6,'(/,a)') ' ###########################################################################' - write(6,'(1x,a,es12.5'//& - ',a,'//IO_intOut(inc)//',a,'//IO_intOut(loadCases(currentLoadCase)%incs)//& - ',a,'//IO_intOut(stepFraction)//',a,'//IO_intOut(subStepFactor**cutBackLevel)//& - ',a,'//IO_intOut(currentLoadCase)//',a,'//IO_intOut(size(loadCases))//')') & + write(6,'(1x,a,es12.5,6(a,i0))')& 'Time', time, & 's: Increment ', inc, '/', loadCases(currentLoadCase)%incs,& '-', stepFraction, '/', subStepFactor**cutBackLevel,& ' of load case ', currentLoadCase,'/',size(loadCases) - write(incInfo,& - '(a,'//IO_intOut(totalIncsCounter)//& - ',a,'//IO_intOut(sum(loadCases%incs))//& - ',a,'//IO_intOut(stepFraction)//& - ',a,'//IO_intOut(subStepFactor**cutBackLevel)//')') & + write(incInfo,'(4(a,i0))') & 'Increment ',totalIncsCounter,'/',sum(loadCases%incs),& '-',stepFraction, '/', subStepFactor**cutBackLevel flush(6)