bugfix: array access out of bounds
this now uses always the first (source) entry of a particular type. Needs clearer structure in the future
This commit is contained in:
parent
07ab7a4d57
commit
a9572f81a1
|
@ -75,8 +75,10 @@ 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 sourceOffset = 1, phase_Nsources(p)
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ANISOBRITTLE_ID) &
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ANISOBRITTLE_ID) then
|
||||
source_damage_anisoBrittle_offset(p) = sourceOffset
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ANISOBRITTLE_ID)) cycle
|
||||
|
|
|
@ -70,8 +70,10 @@ 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 sourceOffset = 1, phase_Nsources(p)
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ANISODUCTILE_ID) &
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ANISODUCTILE_ID) then
|
||||
source_damage_anisoDuctile_offset(p) = sourceOffset
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ANISODUCTILE_ID)) cycle
|
||||
|
|
|
@ -65,8 +65,10 @@ 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 sourceOffset = 1, phase_Nsources(p)
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ISOBRITTLE_ID) &
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ISOBRITTLE_ID) then
|
||||
source_damage_isoBrittle_offset(p) = sourceOffset
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ISOBRITTLE_ID)) cycle
|
||||
|
|
|
@ -64,8 +64,10 @@ 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 sourceOffset = 1, phase_Nsources(p)
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ISODUCTILE_ID) &
|
||||
if (phase_source(sourceOffset,p) == SOURCE_DAMAGE_ISODUCTILE_ID) then
|
||||
source_damage_isoDuctile_offset(p) = sourceOffset
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (all(phase_source(:,p) /= SOURCE_DAMAGE_ISODUCTILE_ID)) cycle
|
||||
|
|
|
@ -54,8 +54,10 @@ 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 sourceOffset = 1, phase_Nsources(p)
|
||||
if (phase_source(sourceOffset,p) == SOURCE_THERMAL_DISSIPATION_ID) &
|
||||
if (phase_source(sourceOffset,p) == SOURCE_THERMAL_DISSIPATION_ID) then
|
||||
source_thermal_dissipation_offset(p) = sourceOffset
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (all(phase_source(:,p) /= SOURCE_THERMAL_DISSIPATION_ID)) cycle
|
||||
|
|
|
@ -58,8 +58,10 @@ 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 sourceOffset = 1, phase_Nsources(p)
|
||||
if (phase_source(sourceOffset,p) == SOURCE_thermal_externalheat_ID) &
|
||||
if (phase_source(sourceOffset,p) == SOURCE_thermal_externalheat_ID) then
|
||||
source_thermal_externalheat_offset(p) = sourceOffset
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (all(phase_source(:,p) /= SOURCE_thermal_externalheat_ID)) cycle
|
||||
|
|
Loading…
Reference in New Issue