avoid conversions

This commit is contained in:
Martin Diehl 2021-12-06 08:55:00 +01:00
parent 2fb368cf8c
commit 8ade749f05
1 changed files with 2 additions and 6 deletions

View File

@ -96,7 +96,6 @@ end function isobrittle_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calculates derived quantities from state !> @brief calculates derived quantities from state
! ToDo: Use Voigt directly
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module subroutine isobrittle_deltaState(C, Fe, ph,en) module subroutine isobrittle_deltaState(C, Fe, ph,en)
@ -110,16 +109,13 @@ module subroutine isobrittle_deltaState(C, Fe, ph,en)
epsilon epsilon
real(pReal) :: & real(pReal) :: &
r_W r_W
real(pReal), dimension(6,6) :: &
C_sym
C_sym = math_sym3333to66(math_Voigt66to3333(C)) epsilon = math_33toVoigt6_strain(matmul(transpose(Fe),Fe)-math_I3)
epsilon = 0.5_pReal*math_sym33to6(matmul(transpose(Fe),Fe)-math_I3)
associate(prm => param(ph), stt => state(ph), dlt => deltaState(ph)) associate(prm => param(ph), stt => state(ph), dlt => deltaState(ph))
r_W = 2.0_pReal*dot_product(epsilon,matmul(C_sym,epsilon))/prm%W_crit r_W = (0.5_pReal*dot_product(epsilon,matmul(C,epsilon)))/prm%W_crit
dlt%r_W(en) = merge(r_W - stt%r_W(en), 0.0_pReal, r_W > stt%r_W(en)) dlt%r_W(en) = merge(r_W - stt%r_W(en), 0.0_pReal, r_W > stt%r_W(en))
end associate end associate