diff --git a/src/phase.f90 b/src/phase.f90 index 311e32a1e..9324225a2 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -108,6 +108,10 @@ module phase logical, intent(in) :: includeL end subroutine mechanical_restore + module subroutine damage_restore(ce) + integer, intent(in) :: ce + end subroutine damage_restore + module function phase_mechanical_dPdF(dt,co,ce) result(dPdF) real(pReal), intent(in) :: dt @@ -435,17 +439,9 @@ subroutine phase_restore(ce,includeL) logical, intent(in) :: includeL integer, intent(in) :: ce - integer :: & - co - - - do co = 1,homogenization_Nconstituents(material_homogenizationID(ce)) - if (damageState(material_phaseID(co,ce))%sizeState > 0) & - damageState(material_phaseID(co,ce))%state( :,material_phaseEntry(co,ce)) = & - damageState(material_phaseID(co,ce))%state0(:,material_phaseEntry(co,ce)) - enddo call mechanical_restore(ce,includeL) + call damage_restore(ce) end subroutine phase_restore diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index 4cc361637..700bb2142 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -144,6 +144,26 @@ module function phase_damage_C(C_homogenized,ph,en) result(C) end function phase_damage_C +!-------------------------------------------------------------------------------------------------- +!> @brief Restore data after homog cutback. +!-------------------------------------------------------------------------------------------------- +module subroutine damage_restore(ce) + + integer, intent(in) :: ce + + integer :: & + co + + + do co = 1,homogenization_Nconstituents(material_homogenizationID(ce)) + if (damageState(material_phaseID(co,ce))%sizeState > 0) & + damageState(material_phaseID(co,ce))%state( :,material_phaseEntry(co,ce)) = & + damageState(material_phaseID(co,ce))%state0(:,material_phaseEntry(co,ce)) + enddo + +end subroutine damage_restore + + !---------------------------------------------------------------------------------------------- !< @brief returns local part of nonlocal damage driving force !---------------------------------------------------------------------------------------------- @@ -173,7 +193,6 @@ module function phase_f_phi(phi,co,ce) result(f) end function phase_f_phi - !-------------------------------------------------------------------------------------------------- !> @brief integrate stress, state with adaptive 1st order explicit Euler method !> using Fixed Point Iteration to adapt the stepsize diff --git a/src/phase_damage_isobrittle.f90 b/src/phase_damage_isobrittle.f90 index 6480c3c99..a73fe4fb3 100644 --- a/src/phase_damage_isobrittle.f90 +++ b/src/phase_damage_isobrittle.f90 @@ -121,12 +121,11 @@ module subroutine isobrittle_results(phase,group) integer :: o - associate(prm => param(phase), & - stt => damageState(phase)%state) + associate(prm => param(phase), stt => damageState(phase)%state) outputsLoop: do o = 1,size(prm%output) select case(trim(prm%output(o))) case ('f_phi') - call results_writeDataset(stt,group,trim(prm%output(o)),'driving force','J/m³') + call results_writeDataset(stt,group,trim(prm%output(o)),'driving force','J/m³') ! Wrong, this is dimensionless end select enddo outputsLoop end associate