From c46b4d90a613a2ad881d9eec578326fc21e918ed Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 29 Sep 2020 12:48:29 +0200 Subject: [PATCH] modularizing --- src/crystallite.f90 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 0bd816142..c0c140571 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -1241,7 +1241,7 @@ subroutine integrateStateFPI(todo) enddo; enddo; enddo !$OMP END PARALLEL DO - if (nonlocalBroken) call nonlocalConvergenceCheck + call nonlocalConvergenceCheck contains @@ -1328,7 +1328,7 @@ subroutine integrateStateEuler(todo) enddo; enddo; enddo !$OMP END PARALLEL DO - if (nonlocalBroken) call nonlocalConvergenceCheck + call nonlocalConvergenceCheck end subroutine integrateStateEuler @@ -1422,7 +1422,7 @@ subroutine integrateStateAdaptiveEuler(todo) enddo; enddo; enddo !$OMP END PARALLEL DO - if (nonlocalBroken) call nonlocalConvergenceCheck + call nonlocalConvergenceCheck end subroutine integrateStateAdaptiveEuler @@ -1612,7 +1612,7 @@ subroutine integrateStateRK(todo,A,B,CC,DB) enddo; enddo; enddo !$OMP END PARALLEL DO - if(nonlocalBroken) call nonlocalConvergenceCheck + call nonlocalConvergenceCheck end subroutine integrateStateRK @@ -1624,7 +1624,19 @@ end subroutine integrateStateRK subroutine nonlocalConvergenceCheck integer :: e,i,p - + logical :: nonlocal_broken + + nonlocal_broken = .false. + !$OMP PARALLEL DO PRIVATE(p) + do e = FEsolving_execElem(1),FEsolving_execElem(2) + p = material_phaseAt(1,e) + do i = FEsolving_execIP(1),FEsolving_execIP(2) + if(plasticState(p)%nonlocal .and. .not. crystallite_converged(1,i,e)) nonlocal_broken = .true. + enddo + enddo + !$OMP END PARALLEL DO + + if(.not. nonlocal_broken) return !$OMP PARALLEL DO PRIVATE(p) do e = FEsolving_execElem(1),FEsolving_execElem(2) p = material_phaseAt(1,e)