From 6938864c4bb2b8bcd64e3d64f573b5f93dfe213a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 21 Feb 2019 20:37:49 +0100 Subject: [PATCH] pointers allow easier access to state variables --- src/plastic_nonlocal.f90 | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/plastic_nonlocal.f90 b/src/plastic_nonlocal.f90 index 3777f2246..4c294db20 100644 --- a/src/plastic_nonlocal.f90 +++ b/src/plastic_nonlocal.f90 @@ -779,18 +779,27 @@ ns = param(instance)%totalNslip stt%rhoDipScrew => plasticState(p)%state (9_pInt*prm%totalNslip+1_pInt:10_pInt*prm%totalNslip,:) dot%rhoDipScrew => plasticState(p)%dotState (9_pInt*prm%totalNslip+1_pInt:10_pInt*prm%totalNslip,:) del%rhoDipScrew => plasticState(p)%deltaState (9_pInt*prm%totalNslip+1_pInt:10_pInt*prm%totalNslip,:) -plasticState(p)%aTolState(iGamma(1:ns,instance)) = prm%aTolShear + + s1 = 10_pInt*prm%totalNslip + 1_pInt + s2 = s1 + prm%totalNslip - 1_pInt + + stt%accumulatedshear => plasticState(p)%state (s1:s2,:) + dot%accumulatedshear => plasticState(p)%dotState (s1:s2,:) + del%accumulatedshear => plasticState(p)%deltaState (s1:s2,:) + plasticState(p)%aTolState(s1:s2) = prm%aTolShear + plasticState(p)%slipRate => plasticState(p)%dotState(s1:s2,1:NofMyPhase) + plasticState(p)%accumulatedSlip => plasticState(p)%state (s1:s2,1:NofMyPhase) allocate(dst%tau_Threshold(prm%totalNslip,NofMyPhase),source=0.0_pReal) allocate(dst%tau_Back(prm%totalNslip,NofMyPhase),source=0.0_pReal) - allocate(res%rhoDotFlux(prm%totalNslip,8,NofMyPhase)) - allocate(res%rhoDotMultiplication(prm%totalNslip,2,NofMyPhase)) - allocate(res%rhoDotSingle2DipoleGlide(prm%totalNslip,2,NofMyPhase)) - allocate(res%rhoDotAthermalAnnihilation(prm%totalNslip,2,NofMyPhase)) - allocate(res%rhoDotThermalAnnihilation(prm%totalNslip,2,NofMyPhase)) - allocate(res%rhoDotEdgeJogs(prm%totalNslip,NofMyPhase)) + allocate(res%rhoDotFlux(prm%totalNslip,8,NofMyPhase),source=0.0_pReal) + allocate(res%rhoDotMultiplication(prm%totalNslip,2,NofMyPhase),source=0.0_pReal) + allocate(res%rhoDotSingle2DipoleGlide(prm%totalNslip,2,NofMyPhase),source=0.0_pReal) + allocate(res%rhoDotAthermalAnnihilation(prm%totalNslip,2,NofMyPhase),source=0.0_pReal) + allocate(res%rhoDotThermalAnnihilation(prm%totalNslip,2,NofMyPhase),source=0.0_pReal) + allocate(res%rhoDotEdgeJogs(prm%totalNslip,NofMyPhase),source=0.0_pReal) end associate