avoid invalid access in case of no damage
This commit is contained in:
parent
bbb292d093
commit
c4b4ea8c21
|
@ -152,13 +152,18 @@ module function phase_damage_phi_dot(phi,co,ce) result(phi_dot)
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, &
|
ph, &
|
||||||
me
|
en
|
||||||
|
|
||||||
ph = material_phaseID(co,ce)
|
ph = material_phaseID(co,ce)
|
||||||
me = material_phaseEntry(co,ce)
|
en = material_phaseEntry(co,ce)
|
||||||
|
|
||||||
phi_dot = 1.0_pReal &
|
select case(phase_source(ph))
|
||||||
- phi*damageState(ph)%state(1,me)
|
case(DAMAGE_ISOBRITTLE_ID,DAMAGE_ISODUCTILE_ID,DAMAGE_ANISOBRITTLE_ID,DAMAGE_ANISODUCTILE_ID)
|
||||||
|
phi_dot = 1.0_pReal &
|
||||||
|
- phi*damageState(ph)%state(1,en)
|
||||||
|
case default
|
||||||
|
phi_dot = 0.0_pReal
|
||||||
|
end select
|
||||||
|
|
||||||
end function phase_damage_phi_dot
|
end function phase_damage_phi_dot
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue