run in one loop

This commit is contained in:
Martin Diehl 2020-03-23 00:32:41 +01:00
parent 0b321bd9d4
commit 027818c942
1 changed files with 34 additions and 26 deletions

View File

@ -1019,7 +1019,8 @@ subroutine integrateStateFPI
real(pReal), dimension(constitutive_source_maxSizeDotState) :: &
residuum_source ! residuum for source state
logical :: &
doneWithIntegration
doneWithIntegration, &
nonlocal_broken
! --+>> PREGUESS FOR STATE <<+--
call update_dotState(1.0_pReal)
@ -1027,6 +1028,7 @@ subroutine integrateStateFPI
NiterationState = 0
doneWithIntegration = .false.
nonlocal_broken = .false.
crystalliteLooping: do while (.not. doneWithIntegration .and. NiterationState < num%nState)
NiterationState = NiterationState + 1
@ -1041,7 +1043,8 @@ subroutine integrateStateFPI
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) .and. .not. crystallite_converged(g,i,e)) then
if(crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e) .and. &
(.not. nonlocal_broken .or. crystallite_localPlasticity(g,i,e)) ) then
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
plasticState(p)%previousDotState2(:,c) = merge(plasticState(p)%previousDotState(:,c),&
@ -1057,13 +1060,18 @@ subroutine integrateStateFPI
call constitutive_dependentState(crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e)
crystallite_todo(g,i,e) = integrateStress(g,i,e,1.0_pReal)
if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
nonlocal_broken = .true.
endif
enddo
enddo
enddo
!$OMP END PARALLEL DO
call update_stress(1.0_pReal)
if(nonlocal_broken) &
where(.not. crystallite_localPlasticity) crystallite_todo = .false.
call update_dotState(1.0_pReal)
!$OMP PARALLEL