From ab475b7c6bb4cb36101eb8932e82851e42dd3dfd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 12 Feb 2020 06:02:37 +0100 Subject: [PATCH] need 'error return' revert from change in 5b72110d --- src/crystallite.f90 | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 5c30454c2..4a5b92f9e 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -870,27 +870,30 @@ logical function integrateStress(ipc,ip,el,timeFraction) A = matmul(F,invFp_current) ! intermediate tensor needed later to calculate dFe_dLp + jacoCounterLi = 0 + steplengthLi = 1.0_pReal + residuumLi_old = 0.0_pReal + Liguess_old = Liguess - !* start Li loop with normal step length - jacoCounterLi = 0 - steplengthLi = 1.0_pReal - residuumLi_old = 0.0_pReal - Liguess_old = Liguess - - LiLoop: do NiterationStressLi=1,num%nStress + NiterationStressLi = 0 + LiLoop: do + NiterationStressLi = NiterationStressLi + 1 + if (NiterationStressLi>num%nStress) return invFi_new = matmul(invFi_current,math_I3 - dt*Liguess) Fi_new = math_inv33(invFi_new) detInvFi = math_det33(invFi_new) - !* start Lp loop with normal step length - jacoCounterLp = 0 - steplengthLp = 1.0_pReal - residuumLp_old = 0.0_pReal - Lpguess_old = Lpguess - - LpLoop: do NiterationStressLp=1,num%nStress + jacoCounterLp = 0 + steplengthLp = 1.0_pReal + residuumLp_old = 0.0_pReal + Lpguess_old = Lpguess + NiterationStressLp = 0 + LpLoop: do + NiterationStressLp = NiterationStressLp + 1 + if (NiterationStressLp>num%nStress) return + B = math_I3 - dt*Lpguess Fe = matmul(matmul(A,B), invFi_new) call constitutive_SandItsTangents(S, dS_dFe, dS_dFi, &