From 34af10fac1eacf1a8075f5fdcedc2c77b2348266 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 21 Dec 2019 12:37:02 +0100 Subject: [PATCH] using default string length --- src/IO.f90 | 24 ++++++++++++------------ src/crystallite.f90 | 2 +- src/damage_local.f90 | 2 +- src/damage_nonlocal.f90 | 2 +- src/grid/DAMASK_grid.f90 | 2 +- src/homogenization_mech_RGC.f90 | 2 +- src/homogenization_mech_isostrain.f90 | 2 +- src/lattice.f90 | 2 +- src/mesh/DAMASK_FEM.f90 | 2 +- src/prec.f90 | 6 +++--- src/source_damage_anisoBrittle.f90 | 2 +- src/source_damage_anisoDuctile.f90 | 2 +- src/source_damage_isoBrittle.f90 | 2 +- src/source_damage_isoDuctile.f90 | 2 +- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index cffcb6471..c07809d51 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -243,12 +243,12 @@ subroutine IO_open_inputFile(fileUnit) integer, allocatable, dimension(:) :: chunkPos - character(len=65536) :: line,fname + character(len=pStringLen :: line,fname logical :: createSuccess,fexist do - read(unit2,'(A65536)',END=220) line + read(unit2,'(A256)',END=220) line chunkPos = IO_stringPos(line) if (IO_lc(IO_StringValue(line,chunkPos,1))=='*include') then @@ -884,7 +884,7 @@ end subroutine IO_warning !-------------------------------------------------------------------------------------------------- function IO_read(fileUnit) result(line) - integer, intent(in) :: fileUnit !< file unit + integer, intent(in) :: fileUnit !< file unit character(len=pStringLen) :: line @@ -924,7 +924,7 @@ integer function IO_countDataLines(fileUnit) integer, allocatable, dimension(:) :: chunkPos - character(len=65536) :: line, & + character(len=pStringLen) :: line, & tmp IO_countDataLines = 0 @@ -956,7 +956,7 @@ integer function IO_countNumericalDataLines(fileUnit) integer, allocatable, dimension(:) :: chunkPos - character(len=65536) :: line, & + character(len=pStringLen) :: line, & tmp IO_countNumericalDataLines = 0 @@ -991,7 +991,7 @@ integer function IO_countContinuousIntValues(fileUnit) integer :: l,c #endif integer, allocatable, dimension(:) :: chunkPos - character(len=65536) :: line + character(len=pString) :: line IO_countContinuousIntValues = 0 line = '' @@ -1048,21 +1048,21 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN) integer, intent(in) :: fileUnit, & lookupMaxN integer, dimension(:,:), intent(in) :: lookupMap - character(len=64), dimension(:), intent(in) :: lookupName + character(len=*), dimension(:), intent(in) :: lookupName integer :: i,first,last #ifdef Abaqus integer :: j,l,c #endif integer, allocatable, dimension(:) :: chunkPos - character(len=65536) line - logical rangeGeneration + character(len=pStringLen) :: line + logical :: rangeGeneration IO_continuousIntValues = 0 rangeGeneration = .false. #if defined(Marc4DAMASK) do - read(fileUnit,'(A65536)',end=100) line + read(fileUnit,'(A256)',end=100) line chunkPos = IO_stringPos(line) if (chunkPos(1) < 1) then ! empty line exit @@ -1103,14 +1103,14 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN) !-------------------------------------------------------------------------------------------------- ! check if the element values in the elset are auto generated backspace(fileUnit) - read(fileUnit,'(A65536)',end=100) line + read(fileUnit,'(A256)',end=100) line chunkPos = IO_stringPos(line) do i = 1,chunkPos(1) if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'generate') rangeGeneration = .true. enddo do l = 1,c - read(fileUnit,'(A65536)',end=100) line + read(fileUnit,'(A256)',end=100) line chunkPos = IO_stringPos(line) if (verify(IO_stringValue(line,chunkPos,1),'0123456789') > 0) then ! a non-int, i.e. set names follow on this line do i = 1,chunkPos(1) ! loop over set names in line diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 84d5dd17d..d33e774e9 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -77,7 +77,7 @@ module crystallite crystallite_localPlasticity !< indicates this grain to have purely local constitutive law type :: tOutput !< new requested output (per phase) - character(len=65536), allocatable, dimension(:) :: & + character(len=pStringLen), allocatable, dimension(:) :: & label end type tOutput type(tOutput), allocatable, dimension(:) :: output_constituent diff --git a/src/damage_local.f90 b/src/damage_local.f90 index 0874b5aee..6cb45a391 100644 --- a/src/damage_local.f90 +++ b/src/damage_local.f90 @@ -44,7 +44,7 @@ contains subroutine damage_local_init integer :: maxNinstance,o,NofMyHomog,h - character(len=65536), dimension(:), allocatable :: outputs + character(len=pStringLen), dimension(:), allocatable :: outputs write(6,'(/,a)') ' <<<+- damage_'//DAMAGE_local_label//' init -+>>>'; flush(6) diff --git a/src/damage_nonlocal.f90 b/src/damage_nonlocal.f90 index 47355a479..17bdecaca 100644 --- a/src/damage_nonlocal.f90 +++ b/src/damage_nonlocal.f90 @@ -49,7 +49,7 @@ contains subroutine damage_nonlocal_init integer :: maxNinstance,o,NofMyHomog,h - character(len=65536), dimension(:), allocatable :: outputs + character(len=pStringLen), dimension(:), allocatable :: outputs write(6,'(/,a)') ' <<<+- damage_'//DAMAGE_nonlocal_label//' init -+>>>'; flush(6) diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index b17e490ea..b324a5afc 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -36,7 +36,7 @@ program DAMASK_spectral N_t = 0, & !< # of time indicators found in load case file N_n = 0, & !< # of increment specifiers found in load case file N_def = 0 !< # of rate of deformation specifiers found in load case file - character(len=65536) :: & + character(len=pStringLen) :: & line !-------------------------------------------------------------------------------------------------- diff --git a/src/homogenization_mech_RGC.f90 b/src/homogenization_mech_RGC.f90 index d2e12c072..c493c4190 100644 --- a/src/homogenization_mech_RGC.f90 +++ b/src/homogenization_mech_RGC.f90 @@ -77,7 +77,7 @@ module subroutine mech_RGC_init integer(kind(undefined_ID)) :: & outputID - character(len=65536), dimension(:), allocatable :: & + character(len=pStringLen), dimension(:), allocatable :: & outputs write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_RGC_label//' init -+>>>' diff --git a/src/homogenization_mech_isostrain.f90 b/src/homogenization_mech_isostrain.f90 index cdc078925..9345d1eda 100644 --- a/src/homogenization_mech_isostrain.f90 +++ b/src/homogenization_mech_isostrain.f90 @@ -33,7 +33,7 @@ module subroutine mech_isostrain_init Ninstance, & h, & NofMyHomog - character(len=65536) :: & + character(len=pStringLen) :: & tag = '' write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_ISOSTRAIN_label//' init -+>>>' diff --git a/src/lattice.f90 b/src/lattice.f90 index fada61392..025a1f8a5 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -492,7 +492,7 @@ contains subroutine lattice_init integer :: Nphases - character(len=65536) :: & + character(len=pStringLen) :: & tag = '' integer :: i,p real(pReal), dimension(:), allocatable :: & diff --git a/src/mesh/DAMASK_FEM.f90 b/src/mesh/DAMASK_FEM.f90 index cd0bcacb1..9b9b95b91 100644 --- a/src/mesh/DAMASK_FEM.f90 +++ b/src/mesh/DAMASK_FEM.f90 @@ -27,7 +27,7 @@ program DAMASK_FEM integer, allocatable, dimension(:) :: chunkPos ! this is longer than needed for geometry parsing integer :: & N_def = 0 !< # of rate of deformation specifiers found in load case file - character(len=65536) :: & + character(len=pStringLen) :: & line !-------------------------------------------------------------------------------------------------- diff --git a/src/prec.f90 b/src/prec.f90 index 710400a82..2f0f20a00 100644 --- a/src/prec.f90 +++ b/src/prec.f90 @@ -79,9 +79,9 @@ module prec real(pReal), private, parameter :: PREAL_EPSILON = epsilon(0.0_pReal) !< minimum positive number such that 1.0 + EPSILON /= 1.0. real(pReal), private, parameter :: PREAL_MIN = tiny(0.0_pReal) !< smallest normalized floating point number - integer, dimension(0), parameter, public :: emptyIntArray = [integer::] - real(pReal), dimension(0), parameter, public :: emptyRealArray = [real(pReal)::] - character(len=65536), dimension(0), parameter, public :: emptyStringArray = [character(len=65536)::] + integer, dimension(0), parameter, public :: emptyIntArray = [integer::] + real(pReal), dimension(0), parameter, public :: emptyRealArray = [real(pReal)::] + character(len=pStringLen), dimension(0), parameter, public :: emptyStringArray = [character(len=pStringLen)::] private :: & unitTest diff --git a/src/source_damage_anisoBrittle.f90 b/src/source_damage_anisoBrittle.f90 index 240e3ae48..e5ed05799 100644 --- a/src/source_damage_anisoBrittle.f90 +++ b/src/source_damage_anisoBrittle.f90 @@ -74,7 +74,7 @@ subroutine source_damage_anisoBrittle_init character(len=pStringLen) :: & extmsg = '' - character(len=65536), dimension(:), allocatable :: & + character(len=pStringLen), dimension(:), allocatable :: & outputs write(6,'(/,a)') ' <<<+- source_'//SOURCE_DAMAGE_ANISOBRITTLE_LABEL//' init -+>>>'; flush(6) diff --git a/src/source_damage_anisoDuctile.f90 b/src/source_damage_anisoDuctile.f90 index 6101eb214..fef897914 100644 --- a/src/source_damage_anisoDuctile.f90 +++ b/src/source_damage_anisoDuctile.f90 @@ -67,7 +67,7 @@ subroutine source_damage_anisoDuctile_init character(len=pStringLen) :: & extmsg = '' - character(len=65536), dimension(:), allocatable :: & + character(len=pStringLen), dimension(:), allocatable :: & outputs write(6,'(/,a)') ' <<<+- source_'//SOURCE_DAMAGE_ANISODUCTILE_LABEL//' init -+>>>'; flush(6) diff --git a/src/source_damage_isoBrittle.f90 b/src/source_damage_isoBrittle.f90 index 609b7a7e0..53c0b77a7 100644 --- a/src/source_damage_isoBrittle.f90 +++ b/src/source_damage_isoBrittle.f90 @@ -61,7 +61,7 @@ subroutine source_damage_isoBrittle_init character(len=pStringLen) :: & extmsg = '' - character(len=65536), dimension(:), allocatable :: & + character(len=pStringLen), dimension(:), allocatable :: & outputs write(6,'(/,a)') ' <<<+- source_'//SOURCE_DAMAGE_ISOBRITTLE_LABEL//' init -+>>>'; flush(6) diff --git a/src/source_damage_isoDuctile.f90 b/src/source_damage_isoDuctile.f90 index 9212e771f..6ee588d0c 100644 --- a/src/source_damage_isoDuctile.f90 +++ b/src/source_damage_isoDuctile.f90 @@ -58,7 +58,7 @@ subroutine source_damage_isoDuctile_init character(len=pStringLen) :: & extmsg = '' - character(len=65536), dimension(:), allocatable :: & + character(len=pStringLen), dimension(:), allocatable :: & outputs write(6,'(/,a)') ' <<<+- source_'//SOURCE_DAMAGE_ISODUCTILE_LABEL//' init -+>>>'