From e7c585a02eefd1f2fb9f6ea6af8d963ef5515765 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 24 Mar 2020 20:47:41 +0100 Subject: [PATCH] loop order that allows more memory efficient code --- src/crystallite.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 882eb3d01..77fd00fe7 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -1451,7 +1451,6 @@ subroutine integrateStateRKCK45 ! --- SECOND TO SIXTH RUNGE KUTTA STEP --- nonlocalBroken = .false. - do stage = 1,5 ! --- state update --- @@ -1461,6 +1460,7 @@ subroutine integrateStateRKCK45 do g = 1,homogenization_Ngrains(material_homogenizationAt(e)) if(crystallite_todo(g,i,e) .and. (.not. nonlocalBroken .or. crystallite_localPlasticity(g,i,e)) ) then + do stage = 1,5 p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e) plasticState(p)%RKCK45dotState(stage,:,c) = plasticState(p)%dotState(:,c) @@ -1518,11 +1518,11 @@ subroutine integrateStateRKCK45 nonlocalBroken = .true. if(.not. crystallite_todo(g,i,e)) cycle + enddo endif enddo; enddo; enddo !$OMP END PARALLEL DO - enddo if(nonlocalBroken) where(.not. crystallite_localPlasticity) crystallite_todo = .false.