rename to wrapLines; additional formatting options; whitespace trimming
This commit is contained in:
parent
95a953d25b
commit
a40524da02
45
src/IO.f90
45
src/IO.f90
|
@ -31,7 +31,7 @@ module IO
|
||||||
IO_read, &
|
IO_read, &
|
||||||
IO_readlines, &
|
IO_readlines, &
|
||||||
IO_isBlank, &
|
IO_isBlank, &
|
||||||
IO_insertEOL, &
|
IO_wrapLines, &
|
||||||
IO_stringPos, &
|
IO_stringPos, &
|
||||||
IO_stringValue, &
|
IO_stringValue, &
|
||||||
IO_intValue, &
|
IO_intValue, &
|
||||||
|
@ -163,23 +163,26 @@ end function IO_isBlank
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Insert EOL at separator trying to keep line length below limit.
|
!> @brief Insert EOL at separator trying to keep line length below limit.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function IO_insertEOL(string,separator,length)
|
function IO_wrapLines(string,separator,filler,length)
|
||||||
|
|
||||||
character(len=*), intent(in) :: string !< string to split
|
character(len=*), intent(in) :: string !< string to split
|
||||||
character, optional, intent(in) :: separator !< line breaks are possible after this character, defaults to ','
|
character, optional, intent(in) :: separator !< line breaks are possible after this character, defaults to ','
|
||||||
|
character(len=*), optional, intent(in) :: filler !< character(s) to insert after line break, defaults to none
|
||||||
integer, optional, intent(in) :: length !< (soft) line limit, defaults to 80
|
integer, optional, intent(in) :: length !< (soft) line limit, defaults to 80
|
||||||
character(len=:), allocatable :: IO_insertEOL
|
character(len=:), allocatable :: IO_wrapLines
|
||||||
|
|
||||||
integer, dimension(:), allocatable :: pos_sep, pos_split
|
integer, dimension(:), allocatable :: pos_sep, pos_split
|
||||||
integer :: i,s,e
|
integer :: i,s,e
|
||||||
character :: sep
|
character :: sep
|
||||||
|
character(len=:), allocatable :: fill
|
||||||
|
|
||||||
|
|
||||||
sep = misc_optional(separator,',')
|
sep = misc_optional(separator,',')
|
||||||
|
fill = misc_optional(filler,'')
|
||||||
|
|
||||||
i = index(string,sep)
|
i = index(string,sep)
|
||||||
if (i == 0) then
|
if (i == 0) then
|
||||||
IO_insertEOL = string
|
IO_wrapLines = string
|
||||||
else
|
else
|
||||||
pos_sep = [0]
|
pos_sep = [0]
|
||||||
s = i
|
s = i
|
||||||
|
@ -193,18 +196,18 @@ function IO_insertEOL(string,separator,length)
|
||||||
pos_split = emptyIntArray
|
pos_split = emptyIntArray
|
||||||
s = 1
|
s = 1
|
||||||
e = 2
|
e = 2
|
||||||
IO_insertEOL = ''
|
IO_wrapLines = ''
|
||||||
do while (e < size(pos_sep))
|
do while (e < size(pos_sep))
|
||||||
if (pos_sep(e+1) - pos_sep(s) >= misc_optional(length,80)) then
|
if (pos_sep(e+1) - pos_sep(s) >= misc_optional(length,80)) then
|
||||||
IO_insertEOL = IO_insertEOL//string(pos_sep(s)+1:pos_sep(e))//IO_EOL
|
IO_wrapLines = IO_wrapLines//adjustl(string(pos_sep(s)+1:pos_sep(e)))//IO_EOL//fill
|
||||||
s = e
|
s = e
|
||||||
end if
|
end if
|
||||||
e = e + 1
|
e = e + 1
|
||||||
end do
|
end do
|
||||||
IO_insertEOL = IO_insertEOL//string(pos_sep(s)+1:)
|
IO_wrapLines = IO_wrapLines//adjustl(string(pos_sep(s)+1:))
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end function IO_insertEOL
|
end function IO_wrapLines
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -797,18 +800,20 @@ subroutine selfTest()
|
||||||
str=' ab #';out=IO_rmComment(str)
|
str=' ab #';out=IO_rmComment(str)
|
||||||
if (out /= ' ab'.or. len(out) /= 3) error stop 'IO_rmComment/6'
|
if (out /= ' ab'.or. len(out) /= 3) error stop 'IO_rmComment/6'
|
||||||
|
|
||||||
if ('abc, def' /= IO_insertEOL('abc, def')) &
|
if ('abc, def' /= IO_wrapLines('abc, def')) &
|
||||||
error stop 'IO_insertEOL/1'
|
error stop 'IO_wrapLines/1'
|
||||||
if ('abc,'//IO_EOL//'def' /= IO_insertEOL('abc,def',length=3)) &
|
if ('abc,'//IO_EOL//'def' /= IO_wrapLines('abc,def',length=3)) &
|
||||||
error stop 'IO_insertEOL/2'
|
error stop 'IO_wrapLines/2'
|
||||||
if ('abc,'//IO_EOL//'def' /= IO_insertEOL('abc,def',length=5)) &
|
if ('abc,'//IO_EOL//'def' /= IO_wrapLines('abc,def',length=5)) &
|
||||||
error stop 'IO_insertEOL/3'
|
error stop 'IO_wrapLines/3'
|
||||||
if ('abc, def' /= IO_insertEOL('abc, def',length=3,separator='.')) &
|
if ('abc, def' /= IO_wrapLines('abc, def',length=3,separator='.')) &
|
||||||
error stop 'IO_insertEOL/4'
|
error stop 'IO_wrapLines/4'
|
||||||
if ('abc.'//IO_EOL//' def' /= IO_insertEOL('abc. def',length=3,separator='.')) &
|
if ('abc.'//IO_EOL//'def' /= IO_wrapLines('abc. def',length=3,separator='.')) &
|
||||||
error stop 'IO_insertEOL/5'
|
error stop 'IO_wrapLines/5'
|
||||||
if ('abc,'//IO_EOL//'defg,'//IO_EOL//'hij' /= IO_insertEOL('abc,defg,hij',length=4)) &
|
if ('abc,'//IO_EOL//'defg,'//IO_EOL//'hij' /= IO_wrapLines('abc,defg,hij',length=4)) &
|
||||||
error stop 'IO_insertEOL/6'
|
error stop 'IO_wrapLines/6'
|
||||||
|
if ('abc,'//IO_EOL//'xxdefg,'//IO_EOL//'xxhij' /= IO_wrapLines('abc,defg, hij',filler='xx',length=4)) &
|
||||||
|
error stop 'IO_wrapLines/7'
|
||||||
|
|
||||||
end subroutine selfTest
|
end subroutine selfTest
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module config
|
module config
|
||||||
use IO
|
use IO
|
||||||
|
use misc
|
||||||
use YAML_parse
|
use YAML_parse
|
||||||
use YAML_types
|
use YAML_types
|
||||||
use result
|
use result
|
||||||
|
@ -20,7 +21,7 @@ module config
|
||||||
config_init, &
|
config_init, &
|
||||||
config_material_deallocate, &
|
config_material_deallocate, &
|
||||||
config_numerics_deallocate, &
|
config_numerics_deallocate, &
|
||||||
config_fetchReferences
|
config_listReferences
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -63,26 +64,30 @@ end subroutine config_numerics_deallocate
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Return string with references from dict.
|
!> @brief Return string with references from dict.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function config_fetchReferences(config) result(references)
|
function config_listReferences(config,indent) result(references)
|
||||||
|
|
||||||
type(tDict) :: config
|
type(tDict) :: config
|
||||||
|
integer, optional :: indent
|
||||||
character(len=:), allocatable :: references
|
character(len=:), allocatable :: references
|
||||||
|
|
||||||
|
|
||||||
type(tList), pointer :: ref
|
type(tList), pointer :: ref
|
||||||
|
character(len=:), allocatable :: filler
|
||||||
integer :: r
|
integer :: r
|
||||||
|
|
||||||
|
|
||||||
|
filler = repeat(' ',misc_optional(indent,0))
|
||||||
ref => config%get_list('references',emptyList)
|
ref => config%get_list('references',emptyList)
|
||||||
if (ref%length > 0) then
|
if (ref%length == 0) then
|
||||||
|
references = ''
|
||||||
|
else
|
||||||
references = 'references:'
|
references = 'references:'
|
||||||
do r = 1, ref%length
|
do r = 1, ref%length
|
||||||
references = references//IO_EOL//' '//IO_insertEOL(ref%get_asString(r))
|
references = references//IO_EOL//filler//'- '//IO_wrapLines(ref%get_asString(r),filler=filler//' ')
|
||||||
end do
|
end do
|
||||||
else
|
|
||||||
references = ''
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end function config_fetchReferences
|
end function config_listReferences
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -382,6 +382,7 @@ subroutine phase_init
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase
|
phase
|
||||||
|
character(len=:), allocatable :: refs
|
||||||
|
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- phase init -+>>>'; flush(IO_STDOUT)
|
print'(/,1x,a)', '<<<+- phase init -+>>>'; flush(IO_STDOUT)
|
||||||
|
@ -393,8 +394,10 @@ subroutine phase_init
|
||||||
allocate(phase_O_0(phases%length))
|
allocate(phase_O_0(phases%length))
|
||||||
|
|
||||||
do ph = 1,phases%length
|
do ph = 1,phases%length
|
||||||
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
phase => phases%get_dict(ph)
|
phase => phases%get_dict(ph)
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(phase)
|
refs = config_listReferences(phase,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
phase_lattice(ph) = phase%get_asString('lattice')
|
phase_lattice(ph) = phase%get_asString('lattice')
|
||||||
if (all(phase_lattice(ph) /= ['cF','cI','hP','tI'])) &
|
if (all(phase_lattice(ph) /= ['cF','cI','hP','tI'])) &
|
||||||
call IO_error(130,ext_msg='phase_init: '//phase%get_asString('lattice'))
|
call IO_error(130,ext_msg='phase_init: '//phase%get_asString('lattice'))
|
||||||
|
|
|
@ -79,9 +79,10 @@ module subroutine damage_init()
|
||||||
ph, &
|
ph, &
|
||||||
Nmembers
|
Nmembers
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
source
|
source
|
||||||
|
character(len=:), allocatable :: refs
|
||||||
logical:: damage_active
|
logical:: damage_active
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +104,9 @@ module subroutine damage_init()
|
||||||
phase => phases%get_dict(ph)
|
phase => phases%get_dict(ph)
|
||||||
source => phase%get_dict('damage',defaultVal=emptyDict)
|
source => phase%get_dict('damage',defaultVal=emptyDict)
|
||||||
if (source%length > 0) then
|
if (source%length > 0) then
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(source)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(source,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
damage_active = .true.
|
damage_active = .true.
|
||||||
param(ph)%mu = source%get_asFloat('mu')
|
param(ph)%mu = source%get_asFloat('mu')
|
||||||
param(ph)%l_c = source%get_asFloat('l_c')
|
param(ph)%l_c = source%get_asFloat('l_c')
|
||||||
|
|
|
@ -41,7 +41,9 @@ module function anisobrittle_init() result(mySources)
|
||||||
src
|
src
|
||||||
integer :: Nmembers,ph
|
integer :: Nmembers,ph
|
||||||
integer, dimension(:), allocatable :: N_cl
|
integer, dimension(:), allocatable :: N_cl
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
|
|
||||||
|
|
||||||
mySources = source_active('anisobrittle')
|
mySources = source_active('anisobrittle')
|
||||||
|
@ -62,7 +64,9 @@ module function anisobrittle_init() result(mySources)
|
||||||
|
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(src)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(src,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
N_cl = src%get_as1dInt('N_cl',defaultVal=emptyIntArray)
|
N_cl = src%get_as1dInt('N_cl',defaultVal=emptyIntArray)
|
||||||
prm%sum_N_cl = sum(abs(N_cl))
|
prm%sum_N_cl = sum(abs(N_cl))
|
||||||
|
|
|
@ -39,7 +39,9 @@ module function isobrittle_init() result(mySources)
|
||||||
phase, &
|
phase, &
|
||||||
src
|
src
|
||||||
integer :: Nmembers,ph
|
integer :: Nmembers,ph
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
|
|
||||||
|
|
||||||
mySources = source_active('isobrittle')
|
mySources = source_active('isobrittle')
|
||||||
|
@ -64,7 +66,9 @@ module function isobrittle_init() result(mySources)
|
||||||
|
|
||||||
prm%W_crit = src%get_asFloat('G_crit')/src%get_asFloat('l_c')
|
prm%W_crit = src%get_asFloat('G_crit')/src%get_asFloat('l_c')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(src)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(src,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(src)
|
prm%output = output_as1dString(src)
|
||||||
|
|
|
@ -28,6 +28,7 @@ module subroutine elastic_init(phases)
|
||||||
phase, &
|
phase, &
|
||||||
mech, &
|
mech, &
|
||||||
elastic
|
elastic
|
||||||
|
character(len=:), allocatable :: refs
|
||||||
|
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- phase:mechanical:elastic init -+>>>'
|
print'(/,1x,a)', '<<<+- phase:mechanical:elastic init -+>>>'
|
||||||
|
@ -42,7 +43,9 @@ module subroutine elastic_init(phases)
|
||||||
phase => phases%get_dict(ph)
|
phase => phases%get_dict(ph)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
elastic => mech%get_dict('elastic')
|
elastic => mech%get_dict('elastic')
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(elastic)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(elastic,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
if (elastic%get_asString('type') /= 'Hooke') call IO_error(200,ext_msg=elastic%get_asString('type'))
|
if (elastic%get_asString('type') /= 'Hooke') call IO_error(200,ext_msg=elastic%get_asString('type'))
|
||||||
|
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
|
|
|
@ -93,7 +93,9 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
rho_mob_0, & !< initial dislocation density
|
rho_mob_0, & !< initial dislocation density
|
||||||
rho_dip_0, & !< initial dipole density
|
rho_dip_0, & !< initial dipole density
|
||||||
a !< non-Schmid coefficients
|
a !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
|
@ -128,7 +130,9 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
pl => mech%get_dict('plastic')
|
pl => mech%get_dict('plastic')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(pl,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(pl)
|
prm%output = output_as1dString(pl)
|
||||||
|
|
|
@ -140,7 +140,9 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
real(pReal), allocatable, dimension(:) :: &
|
real(pReal), allocatable, dimension(:) :: &
|
||||||
rho_mob_0, & !< initial unipolar dislocation density per slip system
|
rho_mob_0, & !< initial unipolar dislocation density per slip system
|
||||||
rho_dip_0 !< initial dipole dislocation density per slip system
|
rho_dip_0 !< initial dipole dislocation density per slip system
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
|
@ -181,7 +183,9 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
pl => mech%get_dict('plastic')
|
pl => mech%get_dict('plastic')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(pl,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(pl)
|
prm%output = output_as1dString(pl)
|
||||||
|
|
|
@ -54,7 +54,9 @@ module function plastic_isotropic_init() result(myPlasticity)
|
||||||
sizeState, sizeDotState
|
sizeState, sizeDotState
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
xi_0 !< initial critical stress
|
xi_0 !< initial critical stress
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
|
@ -86,7 +88,9 @@ module function plastic_isotropic_init() result(myPlasticity)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
pl => mech%get_dict('plastic')
|
pl => mech%get_dict('plastic')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(pl,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(pl)
|
prm%output = output_as1dString(pl)
|
||||||
|
|
|
@ -77,7 +77,9 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
real(pReal), dimension(:), allocatable :: &
|
real(pReal), dimension(:), allocatable :: &
|
||||||
xi_0, & !< initial resistance against plastic flow
|
xi_0, & !< initial resistance against plastic flow
|
||||||
a !< non-Schmid coefficients
|
a !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
|
@ -112,7 +114,9 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
pl => mech%get_dict('plastic')
|
pl => mech%get_dict('plastic')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(pl,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(pl)
|
prm%output = output_as1dString(pl)
|
||||||
|
|
|
@ -188,7 +188,9 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
s, t, l
|
s, t, l
|
||||||
real(pReal), dimension(:), allocatable :: &
|
real(pReal), dimension(:), allocatable :: &
|
||||||
a
|
a
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
type(tInitialParameters) :: &
|
type(tInitialParameters) :: &
|
||||||
ini
|
ini
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
|
@ -234,7 +236,9 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
pl => mech%get_dict('plastic')
|
pl => mech%get_dict('plastic')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(pl,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(pl)
|
prm%output = output_as1dString(pl)
|
||||||
|
|
|
@ -91,7 +91,9 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
xi_0_sl, & !< initial critical shear stress for slip
|
xi_0_sl, & !< initial critical shear stress for slip
|
||||||
xi_0_tw, & !< initial critical shear stress for twin
|
xi_0_tw, & !< initial critical shear stress for twin
|
||||||
a !< non-Schmid coefficients
|
a !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: extmsg
|
character(len=:), allocatable :: &
|
||||||
|
refs, &
|
||||||
|
extmsg
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
|
@ -122,7 +124,9 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
mech => phase%get_dict('mechanical')
|
mech => phase%get_dict('mechanical')
|
||||||
pl => mech%get_dict('plastic')
|
pl => mech%get_dict('plastic')
|
||||||
|
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(pl,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
prm%output = output_as1dString(pl)
|
prm%output = output_as1dString(pl)
|
||||||
|
|
|
@ -84,7 +84,7 @@ module subroutine thermal_init(phases)
|
||||||
thermal
|
thermal
|
||||||
type(tList), pointer :: &
|
type(tList), pointer :: &
|
||||||
sources
|
sources
|
||||||
|
character(len=:), allocatable :: refs
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, so, &
|
ph, so, &
|
||||||
Nmembers
|
Nmembers
|
||||||
|
@ -92,7 +92,6 @@ module subroutine thermal_init(phases)
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- phase:thermal init -+>>>'
|
print'(/,1x,a)', '<<<+- phase:thermal init -+>>>'
|
||||||
|
|
||||||
|
|
||||||
allocate(current(phases%length))
|
allocate(current(phases%length))
|
||||||
allocate(thermalState(phases%length))
|
allocate(thermalState(phases%length))
|
||||||
allocate(thermal_Nsources(phases%length),source = 0)
|
allocate(thermal_Nsources(phases%length),source = 0)
|
||||||
|
@ -107,7 +106,9 @@ module subroutine thermal_init(phases)
|
||||||
|
|
||||||
! ToDo: temperature dependency of K and C_p
|
! ToDo: temperature dependency of K and C_p
|
||||||
if (thermal%length > 0) then
|
if (thermal%length > 0) then
|
||||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(thermal)
|
print'(/,1x,a,i0,a)', 'phase ',ph,': '//phases%key(ph)
|
||||||
|
refs = config_listReferences(thermal,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
param(ph)%C_p = thermal%get_asFloat('C_p')
|
param(ph)%C_p = thermal%get_asFloat('C_p')
|
||||||
param(ph)%K(1,1) = thermal%get_asFloat('K_11')
|
param(ph)%K(1,1) = thermal%get_asFloat('K_11')
|
||||||
if (any(phase_lattice(ph) == ['hP','tI'])) param(ph)%K(3,3) = thermal%get_asFloat('K_33')
|
if (any(phase_lattice(ph) == ['hP','tI'])) param(ph)%K(3,3) = thermal%get_asFloat('K_33')
|
||||||
|
|
|
@ -34,6 +34,7 @@ module function dissipation_init(source_length) result(mySources)
|
||||||
src
|
src
|
||||||
class(tList), pointer :: &
|
class(tList), pointer :: &
|
||||||
sources
|
sources
|
||||||
|
character(len=:), allocatable :: refs
|
||||||
integer :: so,Nmembers,ph
|
integer :: so,Nmembers,ph
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +57,9 @@ module function dissipation_init(source_length) result(mySources)
|
||||||
if (mySources(so,ph)) then
|
if (mySources(so,ph)) then
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
src => sources%get_dict(so)
|
src => sources%get_dict(so)
|
||||||
print'(a,i0,a,i0,a)', ' phase ',ph,' source ',so,' '//config_fetchReferences(src)
|
print'(1x,a,i0,a,i0)', 'phase ',ph,' source ',so
|
||||||
|
refs = config_listReferences(src,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
prm%kappa = src%get_asFloat('kappa')
|
prm%kappa = src%get_asFloat('kappa')
|
||||||
Nmembers = count(material_ID_phase == ph)
|
Nmembers = count(material_ID_phase == ph)
|
||||||
|
|
|
@ -36,6 +36,7 @@ module function externalheat_init(source_length) result(mySources)
|
||||||
src
|
src
|
||||||
type(tList), pointer :: &
|
type(tList), pointer :: &
|
||||||
sources
|
sources
|
||||||
|
character(len=:), allocatable :: refs
|
||||||
integer :: so,Nmembers,ph
|
integer :: so,Nmembers,ph
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +61,9 @@ module function externalheat_init(source_length) result(mySources)
|
||||||
source_thermal_externalheat_offset(ph) = so
|
source_thermal_externalheat_offset(ph) = so
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
src => sources%get_dict(so)
|
src => sources%get_dict(so)
|
||||||
print'(a,i0,a,i0,a)', ' phase ',ph,' source ',so,' '//config_fetchReferences(src)
|
print'(1x,a,i0,a,i0)', 'phase ',ph,' source ',so
|
||||||
|
refs = config_listReferences(src,indent=3)
|
||||||
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
prm%f = table(src,'t','f')
|
prm%f = table(src,'t','f')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue