using state pointers increases readability in postResults

This commit is contained in:
Sharan Roongta 2018-05-02 17:33:42 +02:00
parent f44d20fdc6
commit ccde78799e
1 changed files with 6 additions and 5 deletions

11
src/plastic_phenopowerlaw.f90 Executable file → Normal file
View File

@ -982,7 +982,8 @@ function plastic_phenopowerlaw_postResults(Tstar_v,ipc,ip,el)
ph = phaseAt(ipc,ip,el) ph = phaseAt(ipc,ip,el)
instance = phase_plasticityInstance(ph) instance = phase_plasticityInstance(ph)
nSlip= totalNslip(instance)
nTwin= totalNtwin(instance)
plastic_phenopowerlaw_postResults = 0.0_pReal plastic_phenopowerlaw_postResults = 0.0_pReal
c = 0_pInt c = 0_pInt
@ -990,11 +991,11 @@ function plastic_phenopowerlaw_postResults(Tstar_v,ipc,ip,el)
outputsLoop: do o = 1_pInt,plastic_phenopowerlaw_Noutput(instance) outputsLoop: do o = 1_pInt,plastic_phenopowerlaw_Noutput(instance)
select case(plastic_phenopowerlaw_outputID(o,instance)) select case(plastic_phenopowerlaw_outputID(o,instance))
case (resistance_slip_ID) case (resistance_slip_ID)
plastic_phenopowerlaw_postResults(c+1_pInt:c+nSlip) = state(instance)%s_slip(of) plastic_phenopowerlaw_postResults(c+1_pInt:c+nSlip) = state(instance)%s_slip(1:nSlip,of)
c = c + nSlip c = c + nSlip
case (accumulatedshear_slip_ID) case (accumulatedshear_slip_ID)
plastic_phenopowerlaw_postResults(c+1_pInt:c+nSlip) = state(instance)%accshear_slip(of) plastic_phenopowerlaw_postResults(c+1_pInt:c+nSlip) = state(instance)%accshear_slip(1:nSlip,of)
c = c + nSlip c = c + nSlip
case (shearrate_slip_ID) case (shearrate_slip_ID)
@ -1039,12 +1040,12 @@ function plastic_phenopowerlaw_postResults(Tstar_v,ipc,ip,el)
case (resistance_twin_ID) case (resistance_twin_ID)
plastic_phenopowerlaw_postResults(c+1_pInt:c+nTwin) = & plastic_phenopowerlaw_postResults(c+1_pInt:c+nTwin) = &
state(instance)%s_twin(of) state(instance)%s_twin(1:nTwin,of)
c = c + nTwin c = c + nTwin
case (accumulatedshear_twin_ID) case (accumulatedshear_twin_ID)
plastic_phenopowerlaw_postResults(c+1_pInt:c+nTwin) = & plastic_phenopowerlaw_postResults(c+1_pInt:c+nTwin) = &
state(instance)%accshear_twin(of) state(instance)%accshear_twin(1:nTwin,of)
c = c + nTwin c = c + nTwin
case (shearrate_twin_ID) case (shearrate_twin_ID)
j = 0_pInt j = 0_pInt