converged(g,i,e) matters only for FPI
This commit is contained in:
parent
d16af3bfb3
commit
b88ffb8d4f
|
@ -1166,8 +1166,7 @@ subroutine integrateStateEuler
|
||||||
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))
|
||||||
if(crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e) .and. &
|
if(crystallite_todo(g,i,e) .and. (.not. nonlocalBroken .or. crystallite_localPlasticity(g,i,e)) ) then
|
||||||
(.not. nonlocalBroken .or. crystallite_localPlasticity(g,i,e)) ) then
|
|
||||||
|
|
||||||
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
||||||
|
|
||||||
|
@ -1225,88 +1224,92 @@ end subroutine integrateStateEuler
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateAdaptiveEuler
|
subroutine integrateStateAdaptiveEuler
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
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, & ! grain index in grain loop
|
g, & ! grain index in grain loop
|
||||||
p, &
|
p, &
|
||||||
c, &
|
c, &
|
||||||
s, &
|
s, &
|
||||||
sizeDotState
|
sizeDotState
|
||||||
|
logical :: &
|
||||||
|
nonlocalBroken
|
||||||
|
|
||||||
real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
||||||
homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: &
|
homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: &
|
||||||
residuum_plastic
|
residuum_plastic
|
||||||
real(pReal), dimension(constitutive_source_maxSizeDotState,&
|
real(pReal), dimension(constitutive_source_maxSizeDotState,&
|
||||||
maxval(phase_Nsources), &
|
maxval(phase_Nsources), &
|
||||||
homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: &
|
homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: &
|
||||||
residuum_source
|
residuum_source
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! contribution to state and relative residui and from Euler integration
|
! contribution to state and relative residui and from Euler integration
|
||||||
call update_dotState(1.0_pReal)
|
call update_dotState(1.0_pReal)
|
||||||
|
|
||||||
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
nonlocalBroken = .false.
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
||||||
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
||||||
if (crystallite_todo(g,i,e)) then
|
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
||||||
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
if(crystallite_todo(g,i,e) .and. (.not. nonlocalBroken .or. crystallite_localPlasticity(g,i,e)) ) then
|
||||||
sizeDotState = plasticState(p)%sizeDotState
|
|
||||||
|
|
||||||
residuum_plastic(1:sizeDotState,g,i,e) = plasticState(p)%dotstate(1:sizeDotState,c) &
|
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
||||||
* (- 0.5_pReal * crystallite_subdt(g,i,e))
|
sizeDotState = plasticState(p)%sizeDotState
|
||||||
plasticState(p)%state(1:sizeDotState,c) = &
|
|
||||||
plasticState(p)%state(1:sizeDotState,c) + plasticState(p)%dotstate(1:sizeDotState,c) * crystallite_subdt(g,i,e) !ToDo: state, partitioned state?
|
|
||||||
do s = 1, phase_Nsources(p)
|
|
||||||
sizeDotState = sourceState(p)%p(s)%sizeDotState
|
|
||||||
|
|
||||||
residuum_source(1:sizeDotState,s,g,i,e) = sourceState(p)%p(s)%dotstate(1:sizeDotState,c) &
|
residuum_plastic(1:sizeDotState,g,i,e) = plasticState(p)%dotstate(1:sizeDotState,c) &
|
||||||
* (- 0.5_pReal * crystallite_subdt(g,i,e))
|
* (- 0.5_pReal * crystallite_subdt(g,i,e))
|
||||||
sourceState(p)%p(s)%state(1:sizeDotState,c) = &
|
plasticState(p)%state(1:sizeDotState,c) = &
|
||||||
sourceState(p)%p(s)%state(1:sizeDotState,c) + sourceState(p)%p(s)%dotstate(1:sizeDotState,c) * crystallite_subdt(g,i,e) !ToDo: state, partitioned state?
|
plasticState(p)%state(1:sizeDotState,c) + plasticState(p)%dotstate(1:sizeDotState,c) * crystallite_subdt(g,i,e) !ToDo: state, partitioned state?
|
||||||
enddo
|
do s = 1, phase_Nsources(p)
|
||||||
endif
|
sizeDotState = sourceState(p)%p(s)%sizeDotState
|
||||||
enddo; enddo; enddo
|
|
||||||
!$OMP END PARALLEL DO
|
|
||||||
|
|
||||||
call update_deltaState
|
residuum_source(1:sizeDotState,s,g,i,e) = sourceState(p)%p(s)%dotstate(1:sizeDotState,c) &
|
||||||
call update_dependentState
|
* (- 0.5_pReal * crystallite_subdt(g,i,e))
|
||||||
call update_stress(1.0_pReal)
|
sourceState(p)%p(s)%state(1:sizeDotState,c) = &
|
||||||
call update_dotState(1.0_pReal)
|
sourceState(p)%p(s)%state(1:sizeDotState,c) + sourceState(p)%p(s)%dotstate(1:sizeDotState,c) * crystallite_subdt(g,i,e) !ToDo: state, partitioned state?
|
||||||
|
|
||||||
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
|
||||||
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
|
||||||
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
|
||||||
if (crystallite_todo(g,i,e)) then
|
|
||||||
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
|
||||||
sizeDotState = plasticState(p)%sizeDotState
|
|
||||||
|
|
||||||
residuum_plastic(1:sizeDotState,g,i,e) = residuum_plastic(1:sizeDotState,g,i,e) &
|
|
||||||
+ 0.5_pReal * plasticState(p)%dotState(:,c) * crystallite_subdt(g,i,e)
|
|
||||||
|
|
||||||
crystallite_converged(g,i,e) = converged(residuum_plastic(1:sizeDotState,g,i,e), &
|
|
||||||
plasticState(p)%state(1:sizeDotState,c), &
|
|
||||||
plasticState(p)%atol(1:sizeDotState))
|
|
||||||
|
|
||||||
do s = 1, phase_Nsources(p)
|
|
||||||
sizeDotState = sourceState(p)%p(s)%sizeDotState
|
|
||||||
|
|
||||||
residuum_source(1:sizeDotState,s,g,i,e) = &
|
|
||||||
residuum_source(1:sizeDotState,s,g,i,e) + 0.5_pReal * sourceState(p)%p(s)%dotState(:,c) * crystallite_subdt(g,i,e)
|
|
||||||
|
|
||||||
crystallite_converged(g,i,e) = &
|
|
||||||
crystallite_converged(g,i,e) .and. converged(residuum_source(1:sizeDotState,s,g,i,e), &
|
|
||||||
sourceState(p)%p(s)%state(1:sizeDotState,c), &
|
|
||||||
sourceState(p)%p(s)%atol(1:sizeDotState))
|
|
||||||
enddo
|
enddo
|
||||||
|
endif
|
||||||
|
enddo; enddo; enddo
|
||||||
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
endif
|
call update_deltaState
|
||||||
enddo; enddo; enddo
|
call update_dependentState
|
||||||
!$OMP END PARALLEL DO
|
call update_stress(1.0_pReal)
|
||||||
|
call update_dotState(1.0_pReal)
|
||||||
|
|
||||||
if (any(plasticState(:)%nonlocal)) call nonlocalConvergenceCheck
|
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
||||||
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
|
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
||||||
|
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
||||||
|
if (crystallite_todo(g,i,e)) then
|
||||||
|
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
||||||
|
sizeDotState = plasticState(p)%sizeDotState
|
||||||
|
|
||||||
|
residuum_plastic(1:sizeDotState,g,i,e) = residuum_plastic(1:sizeDotState,g,i,e) &
|
||||||
|
+ 0.5_pReal * plasticState(p)%dotState(:,c) * crystallite_subdt(g,i,e)
|
||||||
|
|
||||||
|
crystallite_converged(g,i,e) = converged(residuum_plastic(1:sizeDotState,g,i,e), &
|
||||||
|
plasticState(p)%state(1:sizeDotState,c), &
|
||||||
|
plasticState(p)%atol(1:sizeDotState))
|
||||||
|
|
||||||
|
do s = 1, phase_Nsources(p)
|
||||||
|
sizeDotState = sourceState(p)%p(s)%sizeDotState
|
||||||
|
|
||||||
|
residuum_source(1:sizeDotState,s,g,i,e) = &
|
||||||
|
residuum_source(1:sizeDotState,s,g,i,e) + 0.5_pReal * sourceState(p)%p(s)%dotState(:,c) * crystallite_subdt(g,i,e)
|
||||||
|
|
||||||
|
crystallite_converged(g,i,e) = &
|
||||||
|
crystallite_converged(g,i,e) .and. converged(residuum_source(1:sizeDotState,s,g,i,e), &
|
||||||
|
sourceState(p)%p(s)%state(1:sizeDotState,c), &
|
||||||
|
sourceState(p)%p(s)%atol(1:sizeDotState))
|
||||||
|
enddo
|
||||||
|
|
||||||
|
endif
|
||||||
|
enddo; enddo; enddo
|
||||||
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
|
if (any(plasticState(:)%nonlocal)) call nonlocalConvergenceCheck
|
||||||
|
|
||||||
end subroutine integrateStateAdaptiveEuler
|
end subroutine integrateStateAdaptiveEuler
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue