From 0873231e78b9b05296446800aa1506ff51c976d2 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Tue, 23 Jun 2009 06:52:51 +0000 Subject: [PATCH] corrected NaN check in crystallite_updateState return false in case NaN occurs in crystallite_updateState --- trunk/crystallite.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/crystallite.f90 b/trunk/crystallite.f90 index 47c3770c3..681c313a7 100644 --- a/trunk/crystallite.f90 +++ b/trunk/crystallite.f90 @@ -672,7 +672,6 @@ endsubroutine logical crystallite_updateState ! flag indicating if integration suceeded !*** local variables ***! - real(pReal), dimension(6) :: Tstar_v ! 2nd Piola-Kirchhoff Stress in Mandel-Notation real(pReal), dimension(constitutive_sizeDotState(g,i,e)) :: residuum ! residuum from evolution of microstructure integer(pInt) mySize integer(pLongInt) tick, & @@ -697,7 +696,8 @@ endsubroutine if (tock < tick) debug_cumDotStateTicks = debug_cumDotStateTicks + maxticks ! if NaN occured then return without changing the state - if (any(constitutive_state(g,i,e)%p(1:mySize)/=constitutive_state(g,i,e)%p(1:mySize))) then + if (any(residuum/=residuum)) then + crystallite_updateState = .false. ! indicate state update failed if (debugger) write(6,*) '::: updateState encountered NaN' return endif