avoid flush

This commit is contained in:
Martin Diehl 2020-03-23 00:15:00 +01:00
parent e7d61e49fe
commit 86db8f8ca4
1 changed files with 24 additions and 22 deletions

View File

@ -1586,24 +1586,26 @@ subroutine update_stress(timeFraction)
e, & !< element index in element loop e, & !< element index in element loop
i, & !< integration point index in ip loop i, & !< integration point index in ip loop
g g
logical :: &
nonlocal_broken
nonlocal_broken = .false.
!$OMP PARALLEL DO !$OMP PARALLEL DO
do e = FEsolving_execElem(1),FEsolving_execElem(2) do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1),FEsolving_execIP(2) do i = FEsolving_execIP(1),FEsolving_execIP(2)
do g = 1,homogenization_Ngrains(material_homogenizationAt(e)) do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
!$OMP FLUSH(crystallite_todo) if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e) .and. &
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) then (.not. nonlocal_broken .or. crystallite_localPlasticity(g,i,e)) ) then
crystallite_todo(g,i,e) = integrateStress(g,i,e,timeFraction) crystallite_todo(g,i,e) = integrateStress(g,i,e,timeFraction)
!$OMP FLUSH(crystallite_todo) if (.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
if (.not. crystallite_todo(g,i,e) .and. .not. crystallite_localPlasticity(g,i,e)) then ! if broken non-local... nonlocal_broken = .true.
!$OMP CRITICAL (checkTodo)
crystallite_todo = crystallite_todo .and. crystallite_localPlasticity ! ...all non-locals skipped
!$OMP END CRITICAL (checkTodo)
endif
endif endif
enddo; enddo; enddo enddo; enddo; enddo
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
if(nonlocal_broken) &
where(.not. crystallite_localPlasticity) crystallite_todo = .true.
end subroutine update_stress end subroutine update_stress
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------