no need for 2 variables

This commit is contained in:
Martin Diehl 2020-02-29 08:03:06 +01:00
parent 0679fa1713
commit 2429eee079
6 changed files with 24 additions and 36 deletions

View File

@ -58,7 +58,7 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine source_damage_anisoBrittle_init
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
integer :: Ninstance,sourceOffset,NofMyPhase,p
character(len=pStringLen) :: &
extmsg = ''
@ -74,9 +74,9 @@ subroutine source_damage_anisoBrittle_init
do p = 1, size(config_phase)
source_damage_anisoBrittle_instance(p) = count(phase_source(:,1:p) == SOURCE_DAMAGE_ANISOBRITTLE_ID)
do source = 1, phase_Nsources(p)
if (phase_source(source,p) == SOURCE_DAMAGE_ANISOBRITTLE_ID) &
source_damage_anisoBrittle_offset(p) = source
do sourceOffset = 1, phase_Nsources(p)
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ANISOBRITTLE_ID) &
source_damage_anisoBrittle_offset(p) = sourceOffset
enddo
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ANISOBRITTLE_ID)) cycle
@ -116,8 +116,6 @@ subroutine source_damage_anisoBrittle_init
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
NofMyPhase = count(material_phaseAt==p) * discretization_nIP
sourceOffset = source_damage_anisoBrittle_offset(p)
call material_allocateSourceState(p,sourceOffset,NofMyPhase,1,1,0)
sourceState(p)%p(sourceOffset)%aTolState=prm%aTol

View File

@ -53,7 +53,7 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine source_damage_anisoDuctile_init
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
integer :: Ninstance,sourceOffset,NofMyPhase,p
character(len=pStringLen) :: &
extmsg = ''
@ -69,9 +69,9 @@ subroutine source_damage_anisoDuctile_init
do p = 1, size(config_phase)
source_damage_anisoDuctile_instance(p) = count(phase_source(:,1:p) == SOURCE_DAMAGE_ANISODUCTILE_ID)
do source = 1, phase_Nsources(p)
if (phase_source(source,p) == SOURCE_DAMAGE_ANISODUCTILE_ID) &
source_damage_anisoDuctile_offset(p) = source
do sourceOffset = 1, phase_Nsources(p)
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ANISODUCTILE_ID) &
source_damage_anisoDuctile_offset(p) = sourceOffset
enddo
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ANISODUCTILE_ID)) cycle
@ -103,8 +103,6 @@ subroutine source_damage_anisoDuctile_init
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
NofMyPhase=count(material_phaseAt==p) * discretization_nIP
sourceOffset = source_damage_anisoDuctile_offset(p)
call material_allocateSourceState(p,sourceOffset,NofMyPhase,1,1,0)
sourceState(p)%p(sourceOffset)%aTolState=prm%aTol

View File

@ -48,7 +48,7 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine source_damage_isoBrittle_init
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
integer :: Ninstance,sourceOffset,NofMyPhase,p
character(len=pStringLen) :: &
extmsg = ''
@ -64,9 +64,9 @@ subroutine source_damage_isoBrittle_init
do p = 1, size(config_phase)
source_damage_isoBrittle_instance(p) = count(phase_source(:,1:p) == SOURCE_DAMAGE_ISOBRITTLE_ID)
do source = 1, phase_Nsources(p)
if (phase_source(source,p) == SOURCE_DAMAGE_ISOBRITTLE_ID) &
source_damage_isoBrittle_offset(p) = source
do sourceOffset = 1, phase_Nsources(p)
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ISOBRITTLE_ID) &
source_damage_isoBrittle_offset(p) = sourceOffset
enddo
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ISOBRITTLE_ID)) cycle
@ -92,8 +92,6 @@ subroutine source_damage_isoBrittle_init
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
NofMyPhase = count(material_phaseAt==p) * discretization_nIP
sourceOffset = source_damage_isoBrittle_offset(p)
call material_allocateSourceState(p,sourceOffset,NofMyPhase,1,1,1)
sourceState(p)%p(sourceOffset)%aTolState=prm%aTol

View File

@ -47,7 +47,7 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine source_damage_isoDuctile_init
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
integer :: Ninstance,sourceOffset,NofMyPhase,p
character(len=pStringLen) :: &
extmsg = ''
@ -63,9 +63,9 @@ subroutine source_damage_isoDuctile_init
do p = 1, size(config_phase)
source_damage_isoDuctile_instance(p) = count(phase_source(:,1:p) == SOURCE_DAMAGE_ISODUCTILE_ID)
do source = 1, phase_Nsources(p)
if (phase_source(source,p) == SOURCE_DAMAGE_ISODUCTILE_ID) &
source_damage_isoDuctile_offset(p) = source
do sourceOffset = 1, phase_Nsources(p)
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ISODUCTILE_ID) &
source_damage_isoDuctile_offset(p) = sourceOffset
enddo
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ISODUCTILE_ID)) cycle
@ -91,8 +91,6 @@ subroutine source_damage_isoDuctile_init
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
NofMyPhase=count(material_phaseAt==p) * discretization_nIP
sourceOffset = source_damage_isoDuctile_offset(p)
call material_allocateSourceState(p,sourceOffset,NofMyPhase,1,1,0)
sourceState(p)%p(sourceOffset)%aTolState=prm%aTol

View File

@ -39,7 +39,7 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine source_thermal_dissipation_init
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
integer :: Ninstance,sourceOffset,NofMyPhase,p
write(6,'(/,a)') ' <<<+- source_'//SOURCE_thermal_dissipation_label//' init -+>>>'; flush(6)
@ -53,9 +53,9 @@ subroutine source_thermal_dissipation_init
do p = 1, size(config_phase)
source_thermal_dissipation_instance(p) = count(phase_source(:,1:p) == SOURCE_THERMAL_DISSIPATION_ID)
do source = 1, phase_Nsources(p)
if (phase_source(source,p) == SOURCE_THERMAL_DISSIPATION_ID) &
source_thermal_dissipation_offset(p) = source
do sourceOffset = 1, phase_Nsources(p)
if (phase_source(sourceOffset,p) == SOURCE_THERMAL_DISSIPATION_ID) &
source_thermal_dissipation_offset(p) = sourceOffset
enddo
if (all(phase_source(:,p) /= SOURCE_THERMAL_DISSIPATION_ID)) cycle
@ -65,8 +65,6 @@ subroutine source_thermal_dissipation_init
prm%kappa = config%getFloat('dissipation_coldworkcoeff')
NofMyPhase = count(material_phaseAt==p) * discretization_nIP
sourceOffset = source_thermal_dissipation_offset(p)
call material_allocateSourceState(p,sourceOffset,NofMyPhase,0,0,0)
end associate

View File

@ -43,7 +43,7 @@ contains
!--------------------------------------------------------------------------------------------------
subroutine source_thermal_externalheat_init
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
integer :: Ninstance,sourceOffset,NofMyPhase,p
write(6,'(/,a)') ' <<<+- source_'//SOURCE_thermal_externalheat_label//' init -+>>>'; flush(6)
@ -57,9 +57,9 @@ subroutine source_thermal_externalheat_init
do p = 1, size(config_phase)
source_thermal_externalheat_instance(p) = count(phase_source(:,1:p) == SOURCE_thermal_externalheat_ID)
do source = 1, phase_Nsources(p)
if (phase_source(source,p) == SOURCE_thermal_externalheat_ID) &
source_thermal_externalheat_offset(p) = source
do sourceOffset = 1, phase_Nsources(p)
if (phase_source(sourceOffset,p) == SOURCE_thermal_externalheat_ID) &
source_thermal_externalheat_offset(p) = sourceOffset
enddo
if (all(phase_source(:,p) /= SOURCE_thermal_externalheat_ID)) cycle
@ -72,8 +72,6 @@ subroutine source_thermal_externalheat_init
prm%heat_rate = config%getFloats('externalheat_rate',requiredSize = size(prm%time))
NofMyPhase = count(material_phaseAt==p) * discretization_nIP
sourceOffset = source_thermal_externalheat_offset(p)
call material_allocateSourceState(p,sourceOffset,NofMyPhase,1,1,0)
end associate