pull "constants" out of inner loops
This commit is contained in:
parent
1fdc5443b2
commit
4086f40a16
|
@ -49,8 +49,9 @@ module function source_dissipation_init(source_length) result(mySources)
|
||||||
allocate(param(phases%length))
|
allocate(param(phases%length))
|
||||||
|
|
||||||
do ph = 1, phases%length
|
do ph = 1, phases%length
|
||||||
phase => phases%get_dict(ph)
|
|
||||||
if (count(mySources(:,ph)) == 0) cycle !ToDo: error if > 1
|
if (count(mySources(:,ph)) == 0) cycle !ToDo: error if > 1
|
||||||
|
Nmembers = count(material_ID_phase == 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
|
||||||
|
@ -62,7 +63,6 @@ module function source_dissipation_init(source_length) result(mySources)
|
||||||
if (len(refs) > 0) print'(/,1x,a)', refs
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
prm%kappa = src%get_asReal('kappa')
|
prm%kappa = src%get_asReal('kappa')
|
||||||
Nmembers = count(material_ID_phase == ph)
|
|
||||||
call phase_allocateState(thermalState(ph)%p(so),Nmembers,0,0,0)
|
call phase_allocateState(thermalState(ph)%p(so),Nmembers,0,0,0)
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
|
@ -52,8 +52,9 @@ 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
|
||||||
phase => phases%get_dict(ph)
|
|
||||||
if (count(mySources(:,ph)) == 0) cycle
|
if (count(mySources(:,ph)) == 0) cycle
|
||||||
|
Nmembers = count(material_ID_phase == 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
|
||||||
|
@ -66,8 +67,6 @@ module function source_externalheat_init(source_length) result(mySources)
|
||||||
if (len(refs) > 0) print'(/,1x,a)', refs
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
||||||
|
|
||||||
prm%f = table(src,'t','f')
|
prm%f = table(src,'t','f')
|
||||||
|
|
||||||
Nmembers = count(material_ID_phase == ph)
|
|
||||||
call phase_allocateState(thermalState(ph)%p(so),Nmembers,1,1,0)
|
call phase_allocateState(thermalState(ph)%p(so),Nmembers,1,1,0)
|
||||||
end associate
|
end associate
|
||||||
end if
|
end if
|
||||||
|
|
Loading…
Reference in New Issue