cell-based indexing
This commit is contained in:
parent
b783b66d3d
commit
c729e7d53f
|
@ -137,8 +137,8 @@ module constitutive
|
||||||
end subroutine thermal_forward
|
end subroutine thermal_forward
|
||||||
|
|
||||||
|
|
||||||
module subroutine mech_restore(ip,el,includeL)
|
module subroutine mech_restore(ce,includeL)
|
||||||
integer, intent(in) :: ip, el
|
integer, intent(in) :: ce
|
||||||
logical, intent(in) :: includeL
|
logical, intent(in) :: includeL
|
||||||
end subroutine mech_restore
|
end subroutine mech_restore
|
||||||
|
|
||||||
|
@ -497,26 +497,24 @@ end subroutine constitutive_allocateState
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Restore data after homog cutback.
|
!> @brief Restore data after homog cutback.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine constitutive_restore(ip,el,includeL)
|
subroutine constitutive_restore(ce,includeL)
|
||||||
|
|
||||||
logical, intent(in) :: includeL
|
logical, intent(in) :: includeL
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: ce
|
||||||
ip, & !< integration point number
|
|
||||||
el !< element number
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
co, & !< constituent number
|
co, & !< constituent number
|
||||||
so
|
so
|
||||||
|
|
||||||
|
|
||||||
do co = 1,homogenization_Nconstituents(material_homogenizationAt(el))
|
do co = 1,homogenization_Nconstituents(material_homogenizationAt2(ce))
|
||||||
do so = 1, phase_Nsources(material_phaseAt(co,el))
|
do so = 1, phase_Nsources(material_phaseAt2(co,ce))
|
||||||
damageState(material_phaseAt(co,el))%p(so)%state( :,material_phasememberAt(co,ip,el)) = &
|
damageState(material_phaseAt2(co,ce))%p(so)%state( :,material_phasememberAt2(co,ce)) = &
|
||||||
damageState(material_phaseAt(co,el))%p(so)%partitionedState0(:,material_phasememberAt(co,ip,el))
|
damageState(material_phaseAt2(co,ce))%p(so)%partitionedState0(:,material_phasememberAt2(co,ce))
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call mech_restore(ip,el,includeL)
|
call mech_restore(ce,includeL)
|
||||||
|
|
||||||
end subroutine constitutive_restore
|
end subroutine constitutive_restore
|
||||||
|
|
||||||
|
|
|
@ -1656,11 +1656,9 @@ end function crystallite_stress
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Restore data after homog cutback.
|
!> @brief Restore data after homog cutback.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module subroutine mech_restore(ip,el,includeL)
|
module subroutine mech_restore(ce,includeL)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: ce
|
||||||
ip, & !< integration point number
|
|
||||||
el !< element number
|
|
||||||
logical, intent(in) :: &
|
logical, intent(in) :: &
|
||||||
includeL !< protect agains fake cutback
|
includeL !< protect agains fake cutback
|
||||||
|
|
||||||
|
@ -1668,9 +1666,9 @@ module subroutine mech_restore(ip,el,includeL)
|
||||||
co, ph, me
|
co, ph, me
|
||||||
|
|
||||||
|
|
||||||
do co = 1,homogenization_Nconstituents(material_homogenizationAt(el))
|
do co = 1,homogenization_Nconstituents(material_homogenizationAt2(ce))
|
||||||
ph = material_phaseAt(co,el)
|
ph = material_phaseAt2(co,ce)
|
||||||
me = material_phaseMemberAt(co,ip,el)
|
me = material_phaseMemberAt2(co,ce)
|
||||||
if (includeL) then
|
if (includeL) then
|
||||||
constitutive_mech_Lp(ph)%data(1:3,1:3,me) = constitutive_mech_partitionedLp0(ph)%data(1:3,1:3,me)
|
constitutive_mech_Lp(ph)%data(1:3,1:3,me) = constitutive_mech_partitionedLp0(ph)%data(1:3,1:3,me)
|
||||||
constitutive_mech_Li(ph)%data(1:3,1:3,me) = constitutive_mech_partitionedLi0(ph)%data(1:3,1:3,me)
|
constitutive_mech_Li(ph)%data(1:3,1:3,me) = constitutive_mech_partitionedLi0(ph)%data(1:3,1:3,me)
|
||||||
|
|
|
@ -190,9 +190,9 @@ subroutine materialpoint_stressAndItsTangent(dt,FEsolving_execIP,FEsolving_execE
|
||||||
ho = material_homogenizationAt(el)
|
ho = material_homogenizationAt(el)
|
||||||
myNgrains = homogenization_Nconstituents(ho)
|
myNgrains = homogenization_Nconstituents(ho)
|
||||||
do ip = FEsolving_execIP(1),FEsolving_execIP(2)
|
do ip = FEsolving_execIP(1),FEsolving_execIP(2)
|
||||||
me = material_homogenizationMemberAt(ip,el)
|
ce = (el-1)*discretization_nIPs + ip
|
||||||
!--------------------------------------------------------------------------------------------------
|
me = material_homogenizationMemberAt2(ce)
|
||||||
! initialize restoration points
|
|
||||||
call constitutive_initializeRestorationPoints(ip,el)
|
call constitutive_initializeRestorationPoints(ip,el)
|
||||||
|
|
||||||
subFrac = 0.0_pReal
|
subFrac = 0.0_pReal
|
||||||
|
@ -226,7 +226,7 @@ subroutine materialpoint_stressAndItsTangent(dt,FEsolving_execIP,FEsolving_execE
|
||||||
else ! cutback makes sense
|
else ! cutback makes sense
|
||||||
subStep = num%subStepSizeHomog * subStep ! crystallite had severe trouble, so do a significant cutback
|
subStep = num%subStepSizeHomog * subStep ! crystallite had severe trouble, so do a significant cutback
|
||||||
|
|
||||||
call constitutive_restore(ip,el,subStep < 1.0_pReal)
|
call constitutive_restore(ce,subStep < 1.0_pReal)
|
||||||
|
|
||||||
if(homogState(ho)%sizeState > 0) homogState(ho)%State(:,me) = homogState(ho)%subState0(:,me)
|
if(homogState(ho)%sizeState > 0) homogState(ho)%State(:,me) = homogState(ho)%subState0(:,me)
|
||||||
if(damageState_h(ho)%sizeState > 0) damageState_h(ho)%State(:,me) = damageState_h(ho)%subState0(:,me)
|
if(damageState_h(ho)%sizeState > 0) damageState_h(ho)%State(:,me) = damageState_h(ho)%subState0(:,me)
|
||||||
|
@ -243,7 +243,6 @@ subroutine materialpoint_stressAndItsTangent(dt,FEsolving_execIP,FEsolving_execE
|
||||||
! deformation partitioning
|
! deformation partitioning
|
||||||
|
|
||||||
if (.not. doneAndHappy(1)) then
|
if (.not. doneAndHappy(1)) then
|
||||||
ce = (el-1)*discretization_nIPs + ip
|
|
||||||
call mech_partition( homogenization_F0(1:3,1:3,ce) &
|
call mech_partition( homogenization_F0(1:3,1:3,ce) &
|
||||||
+ (homogenization_F(1:3,1:3,ce)-homogenization_F0(1:3,1:3,ce))*(subStep+subFrac), &
|
+ (homogenization_F(1:3,1:3,ce)-homogenization_F0(1:3,1:3,ce))*(subStep+subFrac), &
|
||||||
ip,el)
|
ip,el)
|
||||||
|
@ -255,7 +254,6 @@ subroutine materialpoint_stressAndItsTangent(dt,FEsolving_execIP,FEsolving_execE
|
||||||
if (.not. converged) then
|
if (.not. converged) then
|
||||||
doneAndHappy = [.true.,.false.]
|
doneAndHappy = [.true.,.false.]
|
||||||
else
|
else
|
||||||
ce = (el-1)*discretization_nIPs + ip
|
|
||||||
doneAndHappy = mech_updateState(dt*subStep, &
|
doneAndHappy = mech_updateState(dt*subStep, &
|
||||||
homogenization_F0(1:3,1:3,ce) &
|
homogenization_F0(1:3,1:3,ce) &
|
||||||
+ (homogenization_F(1:3,1:3,ce)-homogenization_F0(1:3,1:3,ce)) &
|
+ (homogenization_F(1:3,1:3,ce)-homogenization_F0(1:3,1:3,ce)) &
|
||||||
|
|
Loading…
Reference in New Issue