diff --git a/src/damage_nonlocal.f90 b/src/damage_nonlocal.f90 index 1ae327833..fe11b0db7 100644 --- a/src/damage_nonlocal.f90 +++ b/src/damage_nonlocal.f90 @@ -31,7 +31,6 @@ module damage_nonlocal public :: & damage_nonlocal_init, & - damage_nonlocal_getSourceAndItsTangent, & damage_nonlocal_getDiffusion, & damage_nonlocal_putNonLocalDamage, & damage_nonlocal_results @@ -88,29 +87,6 @@ subroutine damage_nonlocal_init end subroutine damage_nonlocal_init -!-------------------------------------------------------------------------------------------------- -!> @brief calculates homogenized damage driving forces -!-------------------------------------------------------------------------------------------------- -subroutine damage_nonlocal_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, el) - - integer, intent(in) :: & - ip, & !< integration point number - el !< element number - real(pReal), intent(in) :: & - phi - real(pReal) :: & - phiDot, dPhiDot_dPhi - - phiDot = 0.0_pReal - dPhiDot_dPhi = 0.0_pReal - - call constitutive_damage_getRateAndItsTangents(phiDot, dPhiDot_dPhi, phi, ip, el) - phiDot = phiDot/real(homogenization_Nconstituents(material_homogenizationAt(el)),pReal) - dPhiDot_dPhi = dPhiDot_dPhi/real(homogenization_Nconstituents(material_homogenizationAt(el)),pReal) - -end subroutine damage_nonlocal_getSourceAndItsTangent - - !-------------------------------------------------------------------------------------------------- !> @brief returns homogenized non local damage diffusion tensor in reference configuration !-------------------------------------------------------------------------------------------------- diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 816da4fa6..64169382a 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -154,6 +154,16 @@ module homogenization real(pReal) :: M end function damage_nonlocal_getMobility +module subroutine damage_nonlocal_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, el) + + integer, intent(in) :: & + ip, & !< integration point number + el !< element number + real(pReal), intent(in) :: & + phi + real(pReal) :: & + phiDot, dPhiDot_dPhi +end subroutine damage_nonlocal_getSourceAndItsTangent end interface public :: & @@ -164,6 +174,7 @@ module homogenization thermal_conduction_getMassDensity, & thermal_conduction_getSource, & damage_nonlocal_getMobility, & + damage_nonlocal_getSourceAndItsTangent, & homogenization_thermal_setfield, & homogenization_thermal_T, & homogenization_forward, & diff --git a/src/homogenization_damage.f90 b/src/homogenization_damage.f90 index 3a6758914..630327e8d 100644 --- a/src/homogenization_damage.f90 +++ b/src/homogenization_damage.f90 @@ -104,4 +104,26 @@ module function damage_nonlocal_getMobility(ip,el) result(M) end function damage_nonlocal_getMobility +!-------------------------------------------------------------------------------------------------- +!> @brief calculates homogenized damage driving forces +!-------------------------------------------------------------------------------------------------- +module subroutine damage_nonlocal_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, el) + + integer, intent(in) :: & + ip, & !< integration point number + el !< element number + real(pReal), intent(in) :: & + phi + real(pReal) :: & + phiDot, dPhiDot_dPhi + + phiDot = 0.0_pReal + dPhiDot_dPhi = 0.0_pReal + + call constitutive_damage_getRateAndItsTangents(phiDot, dPhiDot_dPhi, phi, ip, el) + phiDot = phiDot/real(homogenization_Nconstituents(material_homogenizationAt(el)),pReal) + dPhiDot_dPhi = dPhiDot_dPhi/real(homogenization_Nconstituents(material_homogenizationAt(el)),pReal) + +end subroutine damage_nonlocal_getSourceAndItsTangent + end submodule homogenization_damage