better variable names

This commit is contained in:
Philip Eisenlohr 2023-07-22 15:04:11 -04:00
parent 4086f40a16
commit 2d0b64e00d
3 changed files with 26 additions and 26 deletions

View File

@ -28,14 +28,14 @@ submodule(phase) thermal
interface
module function source_dissipation_init(source_length) result(mySources)
integer, intent(in) :: source_length
logical, dimension(:,:), allocatable :: mySources
module function source_dissipation_init(maxNsources) result(isMySource)
integer, intent(in) :: maxNsources
logical, dimension(:,:), allocatable :: isMySource
end function source_dissipation_init
module function source_externalheat_init(source_length) result(mySources)
integer, intent(in) :: source_length
logical, dimension(:,:), allocatable :: mySources
module function source_externalheat_init(maxNsources) result(isMySource)
integer, intent(in) :: maxNsources
logical, dimension(:,:), allocatable :: isMySource
end function source_externalheat_init

View File

@ -22,10 +22,10 @@ contains
!> @brief module initialization
!> @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
logical, dimension(:,:), allocatable :: mySources
integer, intent(in) :: maxNsources
logical, dimension(:,:), allocatable :: isMySource
type(tDict), pointer :: &
phases, &
@ -35,27 +35,27 @@ module function source_dissipation_init(source_length) result(mySources)
class(tList), pointer :: &
sources
character(len=:), allocatable :: refs
integer :: so,Nmembers,ph
integer :: ph,Nmembers,so
mySources = thermal_active('dissipation',source_length)
if (count(mySources) == 0) return
isMySource = thermal_active('dissipation',maxNsources)
if (count(isMySource) == 0) return
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')
allocate(param(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)
phase => phases%get_dict(ph)
thermal => phase%get_dict('thermal')
sources => thermal%get_list('source')
do so = 1, sources%length
if (mySources(so,ph)) then
if (isMySource(so,ph)) then
associate(prm => param(ph))
src => sources%get_dict(so)
print'(1x,a,i0,a,i0)', 'phase ',ph,' source ',so

View File

@ -8,10 +8,10 @@ submodule(phase:thermal) source_externalheat
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(tTable) :: f
type(tTable) :: f !< external heat power as (tabulated) function of time
end type tParameters
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances)
@ -24,10 +24,10 @@ contains
!> @brief module initialization
!> @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
logical, dimension(:,:), allocatable :: mySources
integer, intent(in) :: maxNsources
logical, dimension(:,:), allocatable :: isMySource
type(tDict), pointer :: &
phases, &
@ -37,14 +37,14 @@ module function source_externalheat_init(source_length) result(mySources)
type(tList), pointer :: &
sources
character(len=:), allocatable :: refs
integer :: so,Nmembers,ph
integer :: ph,Nmembers,so
mySources = thermal_active('externalheat',source_length)
if (count(mySources) == 0) return
isMySource = thermal_active('externalheat',maxNsources)
if (count(isMySource) == 0) return
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')
@ -52,13 +52,13 @@ module function source_externalheat_init(source_length) result(mySources)
allocate(source_ID(phases%length), source=0)
do ph = 1, phases%length
if (count(mySources(:,ph)) == 0) cycle
if (count(isMySource(:,ph)) == 0) cycle
Nmembers = count(material_ID_phase == ph)
phase => phases%get_dict(ph)
thermal => phase%get_dict('thermal')
sources => thermal%get_list('source')
do so = 1, sources%length
if (mySources(so,ph)) then
if (isMySource(so,ph)) then
source_ID(ph) = so
associate(prm => param(ph))
src => sources%get_dict(so)