From 652846cdc9c48b2341b40928bd393d7431eb20cd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 25 Mar 2020 11:16:26 +0100 Subject: [PATCH] no need for extra loop --- src/crystallite.f90 | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index f32bd3c36..6d7d6e80b 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -1548,21 +1548,6 @@ subroutine integrateStateRKCK45 * crystallite_subdt(g,i,e) enddo - endif - enddo; enddo; enddo - !$OMP END PARALLEL DO - - if(nonlocalBroken) where(.not. crystallite_localPlasticity) crystallite_todo = .false. - - ! --- relative residui and state convergence --- - - !$OMP PARALLEL DO PRIVATE(sizeDotState,p,c) - do e = FEsolving_execElem(1),FEsolving_execElem(2) - do i = FEsolving_execIP(1),FEsolving_execIP(2) - do g = 1,homogenization_Ngrains(material_homogenizationAt(e)) - if (crystallite_todo(g,i,e)) then - p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e) - sizeDotState = plasticState(p)%sizeDotState crystallite_todo(g,i,e) = converged(residuum_plastic(1:sizeDotState,g,i,e), & @@ -1577,10 +1562,16 @@ subroutine integrateStateRKCK45 sourceState(p)%p(s)%state(1:sizeDotState,c), & sourceState(p)%p(s)%atol(1:sizeDotState)) enddo - endif - enddo; enddo; enddo + if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) & + nonlocalBroken = .true. + if(.not. crystallite_todo(g,i,e)) cycle + + endif + enddo; enddo; enddo !$OMP END PARALLEL DO + if(nonlocalBroken) where(.not. crystallite_localPlasticity) crystallite_todo = .false. + call update_deltaState call update_dependentState call update_stress(1.0_pReal)