better variable names
This commit is contained in:
parent
4086f40a16
commit
2d0b64e00d
|
@ -28,14 +28,14 @@ submodule(phase) thermal
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
module function source_dissipation_init(source_length) result(mySources)
|
module function source_dissipation_init(maxNsources) result(isMySource)
|
||||||
integer, intent(in) :: source_length
|
integer, intent(in) :: maxNsources
|
||||||
logical, dimension(:,:), allocatable :: mySources
|
logical, dimension(:,:), allocatable :: isMySource
|
||||||
end function source_dissipation_init
|
end function source_dissipation_init
|
||||||
|
|
||||||
module function source_externalheat_init(source_length) result(mySources)
|
module function source_externalheat_init(maxNsources) result(isMySource)
|
||||||
integer, intent(in) :: source_length
|
integer, intent(in) :: maxNsources
|
||||||
logical, dimension(:,:), allocatable :: mySources
|
logical, dimension(:,:), allocatable :: isMySource
|
||||||
end function source_externalheat_init
|
end function source_externalheat_init
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ contains
|
||||||
!> @brief module initialization
|
!> @brief module initialization
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function source_dissipation_init(source_length) result(mySources)
|
module function source_dissipation_init(maxNsources) result(isMySource)
|
||||||
|
|
||||||
integer, intent(in) :: source_length
|
integer, intent(in) :: maxNsources
|
||||||
logical, dimension(:,:), allocatable :: mySources
|
logical, dimension(:,:), allocatable :: isMySource
|
||||||
|
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
|
@ -35,27 +35,27 @@ module function source_dissipation_init(source_length) result(mySources)
|
||||||
class(tList), pointer :: &
|
class(tList), pointer :: &
|
||||||
sources
|
sources
|
||||||
character(len=:), allocatable :: refs
|
character(len=:), allocatable :: refs
|
||||||
integer :: so,Nmembers,ph
|
integer :: ph,Nmembers,so
|
||||||
|
|
||||||
|
|
||||||
mySources = thermal_active('dissipation',source_length)
|
isMySource = thermal_active('dissipation',maxNsources)
|
||||||
if (count(mySources) == 0) return
|
if (count(isMySource) == 0) return
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- phase:thermal:source_dissipation init -+>>>'
|
print'(/,1x,a)', '<<<+- phase:thermal:source_dissipation init -+>>>'
|
||||||
print'(/,a,i2)', ' # phases: ',count(mySources); flush(IO_STDOUT)
|
print'(/,a,i2)', ' # phases: ',count(isMySource); flush(IO_STDOUT)
|
||||||
|
|
||||||
|
|
||||||
phases => config_material%get_dict('phase')
|
phases => config_material%get_dict('phase')
|
||||||
allocate(param(phases%length))
|
allocate(param(phases%length))
|
||||||
|
|
||||||
do ph = 1, phases%length
|
do ph = 1, phases%length
|
||||||
if (count(mySources(:,ph)) == 0) cycle !ToDo: error if > 1
|
if (count(isMySource(:,ph)) == 0) cycle !ToDo: error if > 1
|
||||||
Nmembers = count(material_ID_phase == ph)
|
Nmembers = count(material_ID_phase == ph)
|
||||||
phase => phases%get_dict(ph)
|
phase => phases%get_dict(ph)
|
||||||
thermal => phase%get_dict('thermal')
|
thermal => phase%get_dict('thermal')
|
||||||
sources => thermal%get_list('source')
|
sources => thermal%get_list('source')
|
||||||
do so = 1, sources%length
|
do so = 1, sources%length
|
||||||
if (mySources(so,ph)) then
|
if (isMySource(so,ph)) then
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
src => sources%get_dict(so)
|
src => sources%get_dict(so)
|
||||||
print'(1x,a,i0,a,i0)', 'phase ',ph,' source ',so
|
print'(1x,a,i0,a,i0)', 'phase ',ph,' source ',so
|
||||||
|
|
|
@ -8,10 +8,10 @@ submodule(phase:thermal) source_externalheat
|
||||||
|
|
||||||
|
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
source_ID !< which source is my current thermal dissipation mechanism?
|
source_ID !< index in phase source list corresponding to this source
|
||||||
|
|
||||||
type :: tParameters !< container type for internal constitutive parameters
|
type :: tParameters !< container type for internal constitutive parameters
|
||||||
type(tTable) :: f
|
type(tTable) :: f !< external heat power as (tabulated) function of time
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
|
||||||
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances)
|
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances)
|
||||||
|
@ -24,10 +24,10 @@ contains
|
||||||
!> @brief module initialization
|
!> @brief module initialization
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function source_externalheat_init(source_length) result(mySources)
|
module function source_externalheat_init(maxNsources) result(isMySource)
|
||||||
|
|
||||||
integer, intent(in) :: source_length
|
integer, intent(in) :: maxNsources
|
||||||
logical, dimension(:,:), allocatable :: mySources
|
logical, dimension(:,:), allocatable :: isMySource
|
||||||
|
|
||||||
type(tDict), pointer :: &
|
type(tDict), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
|
@ -37,14 +37,14 @@ module function source_externalheat_init(source_length) result(mySources)
|
||||||
type(tList), pointer :: &
|
type(tList), pointer :: &
|
||||||
sources
|
sources
|
||||||
character(len=:), allocatable :: refs
|
character(len=:), allocatable :: refs
|
||||||
integer :: so,Nmembers,ph
|
integer :: ph,Nmembers,so
|
||||||
|
|
||||||
|
|
||||||
mySources = thermal_active('externalheat',source_length)
|
isMySource = thermal_active('externalheat',maxNsources)
|
||||||
if (count(mySources) == 0) return
|
if (count(isMySource) == 0) return
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- phase:thermal:source_externalheat init -+>>>'
|
print'(/,1x,a)', '<<<+- phase:thermal:source_externalheat init -+>>>'
|
||||||
print'(/,a,i2)', ' # phases: ',count(mySources); flush(IO_STDOUT)
|
print'(/,a,i2)', ' # phases: ',count(isMySource); flush(IO_STDOUT)
|
||||||
|
|
||||||
|
|
||||||
phases => config_material%get_dict('phase')
|
phases => config_material%get_dict('phase')
|
||||||
|
@ -52,13 +52,13 @@ module function source_externalheat_init(source_length) result(mySources)
|
||||||
allocate(source_ID(phases%length), source=0)
|
allocate(source_ID(phases%length), source=0)
|
||||||
|
|
||||||
do ph = 1, phases%length
|
do ph = 1, phases%length
|
||||||
if (count(mySources(:,ph)) == 0) cycle
|
if (count(isMySource(:,ph)) == 0) cycle
|
||||||
Nmembers = count(material_ID_phase == ph)
|
Nmembers = count(material_ID_phase == ph)
|
||||||
phase => phases%get_dict(ph)
|
phase => phases%get_dict(ph)
|
||||||
thermal => phase%get_dict('thermal')
|
thermal => phase%get_dict('thermal')
|
||||||
sources => thermal%get_list('source')
|
sources => thermal%get_list('source')
|
||||||
do so = 1, sources%length
|
do so = 1, sources%length
|
||||||
if (mySources(so,ph)) then
|
if (isMySource(so,ph)) then
|
||||||
source_ID(ph) = so
|
source_ID(ph) = so
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
src => sources%get_dict(so)
|
src => sources%get_dict(so)
|
||||||
|
|
Loading…
Reference in New Issue