string length is not know, avoid overflow

This commit is contained in:
Martin Diehl 2023-01-10 11:54:13 +01:00
parent 1174e94486
commit fa9feda3a4
9 changed files with 27 additions and 19 deletions

View File

@ -549,8 +549,9 @@ subroutine crystallite_init()
type(tDict), pointer :: &
num_crystallite, &
phases
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
num_crystallite => config_numerics%get_dict('crystallite',defaultVal=emptyDict)
@ -566,6 +567,7 @@ subroutine crystallite_init()
num%nState = num_crystallite%get_asInt ('nState', defaultVal=20)
num%nStress = num_crystallite%get_asInt ('nStress', defaultVal=40)
extmsg = ''
if (num%subStepMinCryst <= 0.0_pReal) extmsg = trim(extmsg)//' subStepMinCryst'
if (num%subStepSizeCryst <= 0.0_pReal) extmsg = trim(extmsg)//' subStepSizeCryst'
if (num%stepIncreaseCryst <= 0.0_pReal) extmsg = trim(extmsg)//' stepIncreaseCryst'

View File

@ -41,7 +41,7 @@ module function anisobrittle_init() result(mySources)
src
integer :: Nmembers,ph
integer, dimension(:), allocatable :: N_cl
character(len=pStringLen) :: extmsg = ''
character(len=:), allocatable :: extmsg
mySources = source_active('anisobrittle')
@ -53,7 +53,7 @@ module function anisobrittle_init() result(mySources)
phases => config_material%get_dict('phase')
allocate(param(phases%length))
extmsg = ''
do ph = 1, phases%length
if (mySources(ph)) then

View File

@ -39,7 +39,7 @@ module function isobrittle_init() result(mySources)
phase, &
src
integer :: Nmembers,ph
character(len=pStringLen) :: extmsg = ''
character(len=:), allocatable :: extmsg
mySources = source_active('isobrittle')
@ -53,6 +53,7 @@ module function isobrittle_init() result(mySources)
allocate(param(phases%length))
allocate(state(phases%length))
allocate(deltaState(phases%length))
extmsg = ''
do ph = 1, phases%length
if (mySources(ph)) then

View File

@ -93,8 +93,8 @@ module function plastic_dislotungsten_init() result(myPlasticity)
rho_mob_0, & !< initial dislocation density
rho_dip_0, & !< initial dipole density
a !< non-Schmid coefficients
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
type(tDict), pointer :: &
phases, &
phase, &
@ -116,6 +116,7 @@ module function plastic_dislotungsten_init() result(myPlasticity)
allocate(indexDotState(phases%length))
allocate(state(phases%length))
allocate(dependentState(phases%length))
extmsg = ''
do ph = 1, phases%length
if (.not. myPlasticity(ph)) cycle

View File

@ -140,8 +140,8 @@ module function plastic_dislotwin_init() result(myPlasticity)
real(pReal), allocatable, dimension(:) :: &
rho_mob_0, & !< initial unipolar dislocation density per slip system
rho_dip_0 !< initial dipole dislocation density per slip system
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
type(tDict), pointer :: &
phases, &
phase, &
@ -170,6 +170,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
allocate(indexDotState(phases%length))
allocate(state(phases%length))
allocate(dependentState(phases%length))
extmsg = ''
do ph = 1, phases%length
if (.not. myPlasticity(ph)) cycle

View File

@ -54,8 +54,8 @@ module function plastic_isotropic_init() result(myPlasticity)
sizeState, sizeDotState
real(pReal) :: &
xi_0 !< initial critical stress
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
type(tDict), pointer :: &
phases, &
phase, &
@ -75,6 +75,7 @@ module function plastic_isotropic_init() result(myPlasticity)
phases => config_material%get_dict('phase')
allocate(param(phases%length))
allocate(state(phases%length))
extmsg = ''
do ph = 1, phases%length
if (.not. myPlasticity(ph)) cycle

View File

@ -77,8 +77,8 @@ module function plastic_kinehardening_init() result(myPlasticity)
real(pReal), dimension(:), allocatable :: &
xi_0, & !< initial resistance against plastic flow
a !< non-Schmid coefficients
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
type(tDict), pointer :: &
phases, &
phase, &
@ -99,7 +99,7 @@ module function plastic_kinehardening_init() result(myPlasticity)
allocate(indexDotState(phases%length))
allocate(state(phases%length))
allocate(deltaState(phases%length))
extmsg = ''
do ph = 1, phases%length
if (.not. myPlasticity(ph)) cycle

View File

@ -188,8 +188,8 @@ module function plastic_nonlocal_init() result(myPlasticity)
s, t, l
real(pReal), dimension(:), allocatable :: &
a
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
type(tInitialParameters) :: &
ini
type(tDict), pointer :: &
@ -225,6 +225,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
allocate(dotState(phases%length))
allocate(deltaState(phases%length))
allocate(dependentState(phases%length))
extmsg = ''
do ph = 1, phases%length
if (.not. myPlasticity(ph)) cycle

View File

@ -90,8 +90,8 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
xi_0_sl, & !< initial critical shear stress for slip
xi_0_tw, & !< initial critical shear stress for twin
a !< non-Schmid coefficients
character(len=pStringLen) :: &
extmsg = ''
character(len=:), allocatable :: &
extmsg
type(tDict), pointer :: &
phases, &
phase, &
@ -110,6 +110,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
allocate(param(phases%length))
allocate(indexDotState(phases%length))
allocate(state(phases%length))
extmsg = ''
do ph = 1, phases%length
if (.not. myPlasticity(ph)) cycle