simpler access pattern

This commit is contained in:
Martin Diehl 2021-01-24 11:19:10 +01:00
parent fede1dcd09
commit 983b59fe1e
3 changed files with 14 additions and 26 deletions

View File

@ -245,9 +245,6 @@ module constitutive
end function constitutive_homogenizedC
module subroutine constitutive_damage_getRateAndItsTangents(phiDot, dPhiDot_dPhi, phi, ip, el)
integer, intent(in) :: &
ip, & !< integration point number
@ -317,11 +314,9 @@ module constitutive
dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor)
end subroutine kinematics_slipplane_opening_LiAndItsTangent
module subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, co, ip, el)
integer, intent(in) :: &
co, & !< grain number
ip, & !< integration point number
el !< element number
module subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ph,me)
integer, intent(in) :: ph, me
!< element number
real(pReal), intent(out), dimension(3,3) :: &
Li !< thermal velocity gradient
real(pReal), intent(out), dimension(3,3,3,3) :: &
@ -764,9 +759,6 @@ function crystallite_push33ToRef(co,ip,el, tensor33)
end function crystallite_push33ToRef
!--------------------------------------------------------------------------------------------------
!> @brief determines whether a point is converged
!--------------------------------------------------------------------------------------------------

View File

@ -1959,7 +1959,7 @@ subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, &
detFi
integer :: &
k, i, j, &
instance, of
instance, of, me, ph
Li = 0.0_pReal
dLi_dS = 0.0_pReal
@ -1985,7 +1985,9 @@ subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, &
case (KINEMATICS_slipplane_opening_ID) kinematicsType
call kinematics_slipplane_opening_LiAndItsTangent(my_Li, my_dLi_dS, S, co, ip, el)
case (KINEMATICS_thermal_expansion_ID) kinematicsType
call kinematics_thermal_expansion_LiAndItsTangent(my_Li, my_dLi_dS, co, ip, el)
me = material_phaseMemberAt(co,ip,el)
ph = material_phaseAt(co,el)
call kinematics_thermal_expansion_LiAndItsTangent(my_Li, my_dLi_dS, ph,me)
case default kinematicsType
my_Li = 0.0_pReal
my_dLi_dS = 0.0_pReal

View File

@ -84,12 +84,9 @@ end function kinematics_thermal_expansion_init
!--------------------------------------------------------------------------------------------------
!> @brief constitutive equation for calculating the velocity gradient
!--------------------------------------------------------------------------------------------------
module subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, co, ip, el)
module subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ph,me)
integer, intent(in) :: &
co, & !< grain number
ip, & !< integration point number
el !< element number
integer, intent(in) :: ph, me
real(pReal), intent(out), dimension(3,3) :: &
Li !< thermal velocity gradient
real(pReal), intent(out), dimension(3,3,3,3) :: &
@ -98,16 +95,13 @@ module subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, c
integer :: &
phase, &
homog
real(pReal) :: &
T, TDot
real(pReal) :: T, dot_T
phase = material_phaseAt(co,el)
homog = material_homogenizationAt(el)
T = temperature(homog)%p(material_homogenizationMemberAt(ip,el))
TDot = temperatureRate(homog)%p(material_homogenizationMemberAt(ip,el))
T = current(ph)%T(me)
dot_T = current(ph)%dot_T(me)
associate(prm => param(kinematics_thermal_expansion_instance(phase)))
Li = TDot * ( &
associate(prm => param(kinematics_thermal_expansion_instance(ph)))
Li = dot_T * ( &
prm%A(1:3,1:3,1)*(T - prm%T_ref)**0 & ! constant coefficient
+ prm%A(1:3,1:3,2)*(T - prm%T_ref)**1 & ! linear coefficient
+ prm%A(1:3,1:3,3)*(T - prm%T_ref)**2 & ! quadratic coefficient