diff --git a/src/phase.f90 b/src/phase.f90 index f7088b892..7a3e9f508 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -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' diff --git a/src/phase_damage_anisobrittle.f90 b/src/phase_damage_anisobrittle.f90 index 072dbcb7f..feb38322f 100644 --- a/src/phase_damage_anisobrittle.f90 +++ b/src/phase_damage_anisobrittle.f90 @@ -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 @@ -83,7 +83,7 @@ module function anisobrittle_init() result(mySources) prm%output = src%get_as1dString('output',defaultVal=emptyStringArray) #endif - ! sanity checks + ! sanity checks if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q' if (prm%dot_o <= 0.0_pReal) extmsg = trim(extmsg)//' dot_o' if (any(prm%g_crit < 0.0_pReal)) extmsg = trim(extmsg)//' g_crit' diff --git a/src/phase_damage_isobrittle.f90 b/src/phase_damage_isobrittle.f90 index 0e00974e3..cfce3a31c 100644 --- a/src/phase_damage_isobrittle.f90 +++ b/src/phase_damage_isobrittle.f90 @@ -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 diff --git a/src/phase_mechanical_plastic_dislotungsten.f90 b/src/phase_mechanical_plastic_dislotungsten.f90 index c363b32d5..fa05d17a8 100644 --- a/src/phase_mechanical_plastic_dislotungsten.f90 +++ b/src/phase_mechanical_plastic_dislotungsten.f90 @@ -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 diff --git a/src/phase_mechanical_plastic_dislotwin.f90 b/src/phase_mechanical_plastic_dislotwin.f90 index ab3aa65e0..c03dab288 100644 --- a/src/phase_mechanical_plastic_dislotwin.f90 +++ b/src/phase_mechanical_plastic_dislotwin.f90 @@ -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 diff --git a/src/phase_mechanical_plastic_isotropic.f90 b/src/phase_mechanical_plastic_isotropic.f90 index c897c6c6d..ccd557f13 100644 --- a/src/phase_mechanical_plastic_isotropic.f90 +++ b/src/phase_mechanical_plastic_isotropic.f90 @@ -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 diff --git a/src/phase_mechanical_plastic_kinehardening.f90 b/src/phase_mechanical_plastic_kinehardening.f90 index 692501f42..61f3594f2 100644 --- a/src/phase_mechanical_plastic_kinehardening.f90 +++ b/src/phase_mechanical_plastic_kinehardening.f90 @@ -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 diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index 2570014fb..1ad775542 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -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 diff --git a/src/phase_mechanical_plastic_phenopowerlaw.f90 b/src/phase_mechanical_plastic_phenopowerlaw.f90 index 04ddbe13c..aefa01859 100644 --- a/src/phase_mechanical_plastic_phenopowerlaw.f90 +++ b/src/phase_mechanical_plastic_phenopowerlaw.f90 @@ -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