WIP: update_deltaState
This commit is contained in:
parent
a8a5c8eec0
commit
c3b48c3484
|
@ -2933,22 +2933,64 @@ end subroutine update_DotState
|
|||
|
||||
|
||||
subroutine update_deltaState
|
||||
|
||||
use, intrinsic :: &
|
||||
IEEE_arithmetic
|
||||
use prec, only: &
|
||||
dNeq0
|
||||
#ifdef DEBUG
|
||||
use debug, only: &
|
||||
debug_e, &
|
||||
debug_i, &
|
||||
debug_g, &
|
||||
debug_level, &
|
||||
debug_crystallite, &
|
||||
debug_levelExtensive, &
|
||||
debug_levelSelective
|
||||
#endif
|
||||
use material, only: &
|
||||
plasticState, &
|
||||
sourceState, &
|
||||
phase_Nsources, &
|
||||
phaseAt, phasememberAt
|
||||
use constitutive, only: &
|
||||
constitutive_collectDeltaState
|
||||
use math, only: &
|
||||
math_6toSym33
|
||||
implicit none
|
||||
integer(pInt) :: &
|
||||
e, & !< element index in element loop
|
||||
i, & !< integration point index in ip loop
|
||||
g, & !< grain index in grain loop
|
||||
p, &
|
||||
mySize, &
|
||||
myOffset, &
|
||||
c, &
|
||||
s
|
||||
logical :: NaN
|
||||
|
||||
!$OMP PARALLEL DO
|
||||
!$OMP PARALLEL DO PRIVATE(p,c,myOffset,mySize)
|
||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
||||
do g = 1,homogenization_Ngrains(mesh_element(3,e))
|
||||
!$OMP FLUSH(crystallite_todo)
|
||||
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) then ! converged and still alive...
|
||||
call constitutive_collectDeltaState(math_6toSym33(crystallite_Tstar_v(1:6,g,i,e)), &
|
||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||
crystallite_Fi(1:3,1:3,g,i,e), &
|
||||
g,i,e)
|
||||
p = phaseAt(g,i,e); c = phasememberAt(g,i,e)
|
||||
myOffset = plasticState(p)%offsetDeltaState
|
||||
mySize = plasticState(p)%sizeDeltaState
|
||||
NaN = any(IEEE_is_NaN(plasticState(p)%deltaState(1:mySize,c)))
|
||||
|
||||
if (.not. NaN) then
|
||||
|
||||
plasticState(p)%state(myOffset + 1_pInt: myOffset + mySize,c) = &
|
||||
plasticState(p)%state(myOffset + 1_pInt: myOffset + mySize,c) + &
|
||||
plasticState(p)%deltaState(1:mySize,c)
|
||||
|
||||
endif
|
||||
|
||||
crystallite_todo(g,i,e) = stateJump(g,i,e)
|
||||
!$OMP FLUSH(crystallite_todo)
|
||||
if (.not. crystallite_todo(g,i,e)) then ! if state jump fails, then convergence is broken
|
||||
|
|
Loading…
Reference in New Issue