crystallite_integrateStateFPI: convergence check always ran about all e,i,g; now checking only those specified in FEsolving_execElem, FEsolving_execIP

This commit is contained in:
Christoph Kords 2014-01-21 18:45:41 +00:00
parent ff648492c1
commit c10d0d15cb
1 changed files with 16 additions and 3 deletions

View File

@ -2634,7 +2634,8 @@ subroutine crystallite_integrateStateFPI()
stateResiduum, & stateResiduum, &
tempState tempState
logical :: & logical :: &
singleRun ! flag indicating computation for single (g,i,e) triple singleRun, & ! flag indicating computation for single (g,i,e) triple
doneWithIntegration
eIter = FEsolving_execElem(1:2) eIter = FEsolving_execElem(1:2)
do e = eIter(1),eIter(2) do e = eIter(1),eIter(2)
@ -2699,8 +2700,8 @@ subroutine crystallite_integrateStateFPI()
! --+>> STATE LOOP <<+-- ! --+>> STATE LOOP <<+--
NiterationState = 0_pInt NiterationState = 0_pInt
crystalliteLooping: do while (any(crystallite_todo .and. .not. crystallite_converged) & doneWithIntegration = .false.
.and. NiterationState < nState) crystalliteLooping: do while (.not. doneWithIntegration .and. NiterationState < nState)
NiterationState = NiterationState + 1_pInt NiterationState = NiterationState + 1_pInt
!$OMP PARALLEL !$OMP PARALLEL
@ -2888,6 +2889,18 @@ subroutine crystallite_integrateStateFPI()
!$OMP END CRITICAL(write2out) !$OMP END CRITICAL(write2out)
endif endif
! --- CHECK IF DONE WITH INTEGRATION ---
doneWithIntegration = .true.
elemLoop: do e = eIter(1),eIter(2)
do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) then
doneWithIntegration = .false.
exit elemLoop
endif
enddo; enddo
enddo elemLoop
enddo crystalliteLooping enddo crystalliteLooping
end subroutine crystallite_integrateStateFPI end subroutine crystallite_integrateStateFPI