more reasonable name
This commit is contained in:
parent
4f18b21111
commit
95a953d25b
|
@ -18,8 +18,9 @@ module config
|
|||
|
||||
public :: &
|
||||
config_init, &
|
||||
config_material_deallocate,&
|
||||
config_numerics_deallocate
|
||||
config_material_deallocate, &
|
||||
config_numerics_deallocate, &
|
||||
config_fetchReferences
|
||||
|
||||
contains
|
||||
|
||||
|
@ -36,6 +37,54 @@ subroutine config_init()
|
|||
end subroutine config_init
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Deallocate config_material.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine config_material_deallocate()
|
||||
|
||||
print'(/,1x,a)', 'deallocating material configuration'; flush(IO_STDOUT)
|
||||
deallocate(config_material)
|
||||
|
||||
end subroutine config_material_deallocate
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Deallocate config_numerics if present.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine config_numerics_deallocate()
|
||||
|
||||
if (.not. associated(config_numerics, emptyDict)) then
|
||||
print'(/,1x,a)', 'deallocating numerics configuration'; flush(IO_STDOUT)
|
||||
deallocate(config_numerics)
|
||||
end if
|
||||
|
||||
end subroutine config_numerics_deallocate
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Return string with references from dict.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
function config_fetchReferences(config) result(references)
|
||||
|
||||
type(tDict) :: config
|
||||
character(len=:), allocatable :: references
|
||||
|
||||
type(tList), pointer :: ref
|
||||
integer :: r
|
||||
|
||||
|
||||
ref => config%get_list('references',emptyList)
|
||||
if (ref%length > 0) then
|
||||
references = 'references:'
|
||||
do r = 1, ref%length
|
||||
references = references//IO_EOL//' '//IO_insertEOL(ref%get_asString(r))
|
||||
end do
|
||||
else
|
||||
references = ''
|
||||
end if
|
||||
|
||||
end function config_fetchReferences
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Read material.yaml.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
@ -93,27 +142,4 @@ subroutine parse_numerics()
|
|||
|
||||
end subroutine parse_numerics
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Deallocate config_material.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine config_material_deallocate()
|
||||
|
||||
print'(/,1x,a)', 'deallocating material configuration'; flush(IO_STDOUT)
|
||||
deallocate(config_material)
|
||||
|
||||
end subroutine config_material_deallocate
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Deallocate config_numerics if present.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine config_numerics_deallocate()
|
||||
|
||||
if (.not. associated(config_numerics, emptyDict)) then
|
||||
print'(/,1x,a)', 'deallocating numerics configuration'; flush(IO_STDOUT)
|
||||
deallocate(config_numerics)
|
||||
end if
|
||||
|
||||
end subroutine config_numerics_deallocate
|
||||
|
||||
end module config
|
||||
|
|
|
@ -49,8 +49,7 @@ module material
|
|||
material_v ! fraction
|
||||
|
||||
public :: &
|
||||
material_init, &
|
||||
material_references
|
||||
material_init
|
||||
|
||||
contains
|
||||
|
||||
|
@ -79,31 +78,6 @@ subroutine material_init(restart)
|
|||
end subroutine material_init
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Return string with references from dict.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
function material_references(config) result(references)
|
||||
|
||||
type(tDict) :: config
|
||||
character(len=:), allocatable :: references
|
||||
|
||||
type(tList), pointer :: ref
|
||||
integer :: r
|
||||
|
||||
|
||||
ref => config%get_list('references',emptyList)
|
||||
if (ref%length > 0) then
|
||||
references = 'references:'
|
||||
do r = 1, ref%length
|
||||
references = references//IO_EOL//' '//IO_insertEOL(ref%get_asString(r))
|
||||
end do
|
||||
else
|
||||
references = ''
|
||||
end if
|
||||
|
||||
end function material_references
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Parse material.yaml to get the global structure.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -394,7 +394,7 @@ subroutine phase_init
|
|||
|
||||
do ph = 1,phases%length
|
||||
phase => phases%get_dict(ph)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(phase)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(phase)
|
||||
phase_lattice(ph) = phase%get_asString('lattice')
|
||||
if (all(phase_lattice(ph) /= ['cF','cI','hP','tI'])) &
|
||||
call IO_error(130,ext_msg='phase_init: '//phase%get_asString('lattice'))
|
||||
|
|
|
@ -103,7 +103,7 @@ module subroutine damage_init()
|
|||
phase => phases%get_dict(ph)
|
||||
source => phase%get_dict('damage',defaultVal=emptyDict)
|
||||
if (source%length > 0) then
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(source)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(source)
|
||||
damage_active = .true.
|
||||
param(ph)%mu = source%get_asFloat('mu')
|
||||
param(ph)%l_c = source%get_asFloat('l_c')
|
||||
|
|
|
@ -62,7 +62,7 @@ module function anisobrittle_init() result(mySources)
|
|||
|
||||
associate(prm => param(ph))
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(src)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(src)
|
||||
|
||||
N_cl = src%get_as1dInt('N_cl',defaultVal=emptyIntArray)
|
||||
prm%sum_N_cl = sum(abs(N_cl))
|
||||
|
|
|
@ -64,7 +64,7 @@ module function isobrittle_init() result(mySources)
|
|||
|
||||
prm%W_crit = src%get_asFloat('G_crit')/src%get_asFloat('l_c')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(src)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(src)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(src)
|
||||
|
|
|
@ -42,7 +42,7 @@ module subroutine elastic_init(phases)
|
|||
phase => phases%get_dict(ph)
|
||||
mech => phase%get_dict('mechanical')
|
||||
elastic => mech%get_dict('elastic')
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(elastic)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(elastic)
|
||||
if (elastic%get_asString('type') /= 'Hooke') call IO_error(200,ext_msg=elastic%get_asString('type'))
|
||||
|
||||
associate(prm => param(ph))
|
||||
|
|
|
@ -128,7 +128,7 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
|||
mech => phase%get_dict('mechanical')
|
||||
pl => mech%get_dict('plastic')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(pl)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(pl)
|
||||
|
|
|
@ -181,7 +181,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
|||
mech => phase%get_dict('mechanical')
|
||||
pl => mech%get_dict('plastic')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(pl)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(pl)
|
||||
|
|
|
@ -86,7 +86,7 @@ module function plastic_isotropic_init() result(myPlasticity)
|
|||
mech => phase%get_dict('mechanical')
|
||||
pl => mech%get_dict('plastic')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(pl)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(pl)
|
||||
|
|
|
@ -112,7 +112,7 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
|||
mech => phase%get_dict('mechanical')
|
||||
pl => mech%get_dict('plastic')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(pl)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(pl)
|
||||
|
|
|
@ -234,7 +234,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
|||
mech => phase%get_dict('mechanical')
|
||||
pl => mech%get_dict('plastic')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(pl)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(pl)
|
||||
|
|
|
@ -122,7 +122,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
|||
mech => phase%get_dict('mechanical')
|
||||
pl => mech%get_dict('plastic')
|
||||
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(pl)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(pl)
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
prm%output = output_as1dString(pl)
|
||||
|
|
|
@ -107,7 +107,7 @@ module subroutine thermal_init(phases)
|
|||
|
||||
! ToDo: temperature dependency of K and C_p
|
||||
if (thermal%length > 0) then
|
||||
print'(a,i0,a)', ' phase ',ph,' '//material_references(thermal)
|
||||
print'(a,i0,a)', ' phase ',ph,' '//config_fetchReferences(thermal)
|
||||
param(ph)%C_p = thermal%get_asFloat('C_p')
|
||||
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')
|
||||
|
|
|
@ -56,7 +56,7 @@ module function dissipation_init(source_length) result(mySources)
|
|||
if (mySources(so,ph)) then
|
||||
associate(prm => param(ph))
|
||||
src => sources%get_dict(so)
|
||||
print'(a,i0,a,i0,a)', ' phase ',ph,' source ',so,' '//material_references(src)
|
||||
print'(a,i0,a,i0,a)', ' phase ',ph,' source ',so,' '//config_fetchReferences(src)
|
||||
|
||||
prm%kappa = src%get_asFloat('kappa')
|
||||
Nmembers = count(material_ID_phase == ph)
|
||||
|
|
|
@ -60,7 +60,7 @@ module function externalheat_init(source_length) result(mySources)
|
|||
source_thermal_externalheat_offset(ph) = so
|
||||
associate(prm => param(ph))
|
||||
src => sources%get_dict(so)
|
||||
print'(a,i0,a,i0,a)', ' phase ',ph,' source ',so,' '//material_references(src)
|
||||
print'(a,i0,a,i0,a)', ' phase ',ph,' source ',so,' '//config_fetchReferences(src)
|
||||
|
||||
prm%f = table(src,'t','f')
|
||||
|
||||
|
|
Loading…
Reference in New Issue