calculate dFi/dS (9x9 matrix inverse) for the analytic jacobian only when needed. should improve performance

This commit is contained in:
Pratheek Shanthraj 2015-03-20 07:41:11 +00:00
parent 2e44a846af
commit 2d4e7fb8e7
1 changed files with 21 additions and 17 deletions

View File

@ -1175,6 +1175,9 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
call constitutive_LiAndItsTangent(temp_33,dLidS,dLidFi,crystallite_Tstar_v(1:6,g,i,e), & call constitutive_LiAndItsTangent(temp_33,dLidS,dLidFi,crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fi(1:3,1:3,g,i,e),crystallite_Lp(1:3,1:3,g,i,e), & crystallite_Fi(1:3,1:3,g,i,e),crystallite_Lp(1:3,1:3,g,i,e), &
g,i,e) ! call constitutive law to calculate Li tangent in lattice configuration g,i,e) ! call constitutive law to calculate Li tangent in lattice configuration
if (sum(abs(dLidS)) == 0.0_pReal) then
dFidS = 0.0_pReal
else
temp_33 = math_inv33(crystallite_subFi0(1:3,1:3,g,i,e)) temp_33 = math_inv33(crystallite_subFi0(1:3,1:3,g,i,e))
lhs_3333 = 0.0_pReal; rhs_3333 = 0.0_pReal lhs_3333 = 0.0_pReal; rhs_3333 = 0.0_pReal
do o=1_pInt,3_pInt; do p=1_pInt,3_pInt do o=1_pInt,3_pInt; do p=1_pInt,3_pInt
@ -1194,6 +1197,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
dFidS = math_mul3333xx3333(math_Plain99to3333(temp_99),rhs_3333) dFidS = math_mul3333xx3333(math_Plain99to3333(temp_99),rhs_3333)
endif endif
dLidS = math_mul3333xx3333(dLidFi,dFidS) + dLidS dLidS = math_mul3333xx3333(dLidFi,dFidS) + dLidS
endif
call constitutive_LpAndItsTangent(temp_33,dLpdS,dLpdFi,crystallite_Tstar_v(1:6,g,i,e), & call constitutive_LpAndItsTangent(temp_33,dLpdS,dLpdFi,crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fi(1:3,1:3,g,i,e),g,i,e) ! call constitutive law to calculate Lp tangent in lattice configuration crystallite_Fi(1:3,1:3,g,i,e),g,i,e) ! call constitutive law to calculate Lp tangent in lattice configuration