proper indentation
This commit is contained in:
parent
83d545782e
commit
fef525aee1
|
@ -1025,33 +1025,30 @@ function crystallite_stress(co,ip,el)
|
|||
subLi0 !< intermediate velocity grad at start of crystallite inc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! initialize to starting condition
|
||||
crystallite_subStep(co,ip,el) = 0.0_pReal
|
||||
|
||||
ph = material_phaseAt(co,el)
|
||||
me = material_phaseMemberAt(co,ip,el)
|
||||
subLi0 = constitutive_mech_partionedLi0(ph)%data(1:3,1:3,me)
|
||||
subLp0 = crystallite_partitionedLp0(1:3,1:3,co,ip,el)
|
||||
homogenizationRequestsCalculation: if (crystallite_requested(co,ip,el)) then
|
||||
plasticState (material_phaseAt(co,el))%subState0( :,material_phaseMemberAt(co,ip,el)) = &
|
||||
plasticState (material_phaseAt(co,el))%partitionedState0(:,material_phaseMemberAt(co,ip,el))
|
||||
ph = material_phaseAt(co,el)
|
||||
me = material_phaseMemberAt(co,ip,el)
|
||||
subLi0 = constitutive_mech_partionedLi0(ph)%data(1:3,1:3,me)
|
||||
subLp0 = crystallite_partitionedLp0(1:3,1:3,co,ip,el)
|
||||
homogenizationRequestsCalculation: if (crystallite_requested(co,ip,el)) then
|
||||
plasticState (material_phaseAt(co,el))%subState0( :,material_phaseMemberAt(co,ip,el)) = &
|
||||
plasticState (material_phaseAt(co,el))%partitionedState0(:,material_phaseMemberAt(co,ip,el))
|
||||
|
||||
do s = 1, phase_Nsources(material_phaseAt(co,el))
|
||||
sourceState(material_phaseAt(co,el))%p(s)%subState0( :,material_phaseMemberAt(co,ip,el)) = &
|
||||
sourceState(material_phaseAt(co,el))%p(s)%partitionedState0(:,material_phaseMemberAt(co,ip,el))
|
||||
enddo
|
||||
crystallite_subFp0(1:3,1:3,co,ip,el) = constitutive_mech_partionedFp0(ph)%data(1:3,1:3,me)
|
||||
crystallite_subFi0(1:3,1:3,co,ip,el) = constitutive_mech_partionedFi0(ph)%data(1:3,1:3,me)
|
||||
crystallite_subF0(1:3,1:3,co,ip,el) = crystallite_partitionedF0(1:3,1:3,co,ip,el)
|
||||
subFrac = 0.0_pReal
|
||||
crystallite_subStep(co,ip,el) = 1.0_pReal/num%subStepSizeCryst
|
||||
todo = .true.
|
||||
crystallite_converged(co,ip,el) = .false. ! pretend failed step of 1/subStepSizeCryst
|
||||
endif homogenizationRequestsCalculation
|
||||
do s = 1, phase_Nsources(material_phaseAt(co,el))
|
||||
sourceState(material_phaseAt(co,el))%p(s)%subState0( :,material_phaseMemberAt(co,ip,el)) = &
|
||||
sourceState(material_phaseAt(co,el))%p(s)%partitionedState0(:,material_phaseMemberAt(co,ip,el))
|
||||
enddo
|
||||
crystallite_subFp0(1:3,1:3,co,ip,el) = constitutive_mech_partionedFp0(ph)%data(1:3,1:3,me)
|
||||
crystallite_subFi0(1:3,1:3,co,ip,el) = constitutive_mech_partionedFi0(ph)%data(1:3,1:3,me)
|
||||
crystallite_subF0(1:3,1:3,co,ip,el) = crystallite_partitionedF0(1:3,1:3,co,ip,el)
|
||||
subFrac = 0.0_pReal
|
||||
crystallite_subStep(co,ip,el) = 1.0_pReal/num%subStepSizeCryst
|
||||
todo = .true.
|
||||
crystallite_converged(co,ip,el) = .false. ! pretend failed step of 1/subStepSizeCryst
|
||||
endif homogenizationRequestsCalculation
|
||||
|
||||
todo = .true.
|
||||
NiterationCrystallite = 0
|
||||
|
@ -1060,70 +1057,66 @@ function crystallite_stress(co,ip,el)
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! wind forward
|
||||
if (crystallite_converged(co,ip,el)) then
|
||||
formerSubStep = crystallite_subStep(co,ip,el)
|
||||
subFrac = subFrac + crystallite_subStep(co,ip,el)
|
||||
crystallite_subStep(co,ip,el) = min(1.0_pReal - subFrac, &
|
||||
num%stepIncreaseCryst * crystallite_subStep(co,ip,el))
|
||||
if (crystallite_converged(co,ip,el)) then
|
||||
formerSubStep = crystallite_subStep(co,ip,el)
|
||||
subFrac = subFrac + crystallite_subStep(co,ip,el)
|
||||
crystallite_subStep(co,ip,el) = min(1.0_pReal - subFrac, &
|
||||
num%stepIncreaseCryst * crystallite_subStep(co,ip,el))
|
||||
|
||||
todo = crystallite_subStep(co,ip,el) > 0.0_pReal ! still time left to integrate on?
|
||||
todo = crystallite_subStep(co,ip,el) > 0.0_pReal ! still time left to integrate on?
|
||||
|
||||
if (todo) then
|
||||
crystallite_subF0 (1:3,1:3,co,ip,el) = crystallite_subF(1:3,1:3,co,ip,el)
|
||||
subLp0 = crystallite_Lp (1:3,1:3,co,ip,el)
|
||||
subLi0 = constitutive_mech_Li(ph)%data(1:3,1:3,me)
|
||||
crystallite_subFp0(1:3,1:3,co,ip,el) = constitutive_mech_Fp(ph)%data(1:3,1:3,me)
|
||||
crystallite_subFi0(1:3,1:3,co,ip,el) = constitutive_mech_Fi(ph)%data(1:3,1:3,me)
|
||||
plasticState( material_phaseAt(co,el))%subState0(:,material_phaseMemberAt(co,ip,el)) &
|
||||
= plasticState(material_phaseAt(co,el))%state( :,material_phaseMemberAt(co,ip,el))
|
||||
do s = 1, phase_Nsources(material_phaseAt(co,el))
|
||||
sourceState( material_phaseAt(co,el))%p(s)%subState0(:,material_phaseMemberAt(co,ip,el)) &
|
||||
= sourceState(material_phaseAt(co,el))%p(s)%state( :,material_phaseMemberAt(co,ip,el))
|
||||
enddo
|
||||
endif
|
||||
if (todo) then
|
||||
crystallite_subF0 (1:3,1:3,co,ip,el) = crystallite_subF(1:3,1:3,co,ip,el)
|
||||
subLp0 = crystallite_Lp (1:3,1:3,co,ip,el)
|
||||
subLi0 = constitutive_mech_Li(ph)%data(1:3,1:3,me)
|
||||
crystallite_subFp0(1:3,1:3,co,ip,el) = constitutive_mech_Fp(ph)%data(1:3,1:3,me)
|
||||
crystallite_subFi0(1:3,1:3,co,ip,el) = constitutive_mech_Fi(ph)%data(1:3,1:3,me)
|
||||
plasticState( material_phaseAt(co,el))%subState0(:,material_phaseMemberAt(co,ip,el)) &
|
||||
= plasticState(material_phaseAt(co,el))%state( :,material_phaseMemberAt(co,ip,el))
|
||||
do s = 1, phase_Nsources(material_phaseAt(co,el))
|
||||
sourceState( material_phaseAt(co,el))%p(s)%subState0(:,material_phaseMemberAt(co,ip,el)) &
|
||||
= sourceState(material_phaseAt(co,el))%p(s)%state( :,material_phaseMemberAt(co,ip,el))
|
||||
enddo
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! cut back (reduced time and restore)
|
||||
else
|
||||
crystallite_subStep(co,ip,el) = num%subStepSizeCryst * crystallite_subStep(co,ip,el)
|
||||
constitutive_mech_Fp(ph)%data(1:3,1:3,me) = crystallite_subFp0(1:3,1:3,co,ip,el)
|
||||
constitutive_mech_Fi(ph)%data(1:3,1:3,me) = crystallite_subFi0(1:3,1:3,co,ip,el)
|
||||
crystallite_S (1:3,1:3,co,ip,el) = crystallite_S0 (1:3,1:3,co,ip,el)
|
||||
if (crystallite_subStep(co,ip,el) < 1.0_pReal) then ! actual (not initial) cutback
|
||||
crystallite_Lp (1:3,1:3,co,ip,el) = subLp0
|
||||
constitutive_mech_Li(ph)%data(1:3,1:3,me) = subLi0
|
||||
endif
|
||||
plasticState (material_phaseAt(co,el))%state( :,material_phaseMemberAt(co,ip,el)) &
|
||||
= plasticState(material_phaseAt(co,el))%subState0(:,material_phaseMemberAt(co,ip,el))
|
||||
do s = 1, phase_Nsources(material_phaseAt(co,el))
|
||||
sourceState( material_phaseAt(co,el))%p(s)%state( :,material_phaseMemberAt(co,ip,el)) &
|
||||
= sourceState(material_phaseAt(co,el))%p(s)%subState0(:,material_phaseMemberAt(co,ip,el))
|
||||
enddo
|
||||
else
|
||||
crystallite_subStep(co,ip,el) = num%subStepSizeCryst * crystallite_subStep(co,ip,el)
|
||||
constitutive_mech_Fp(ph)%data(1:3,1:3,me) = crystallite_subFp0(1:3,1:3,co,ip,el)
|
||||
constitutive_mech_Fi(ph)%data(1:3,1:3,me) = crystallite_subFi0(1:3,1:3,co,ip,el)
|
||||
crystallite_S (1:3,1:3,co,ip,el) = crystallite_S0 (1:3,1:3,co,ip,el)
|
||||
if (crystallite_subStep(co,ip,el) < 1.0_pReal) then ! actual (not initial) cutback
|
||||
crystallite_Lp (1:3,1:3,co,ip,el) = subLp0
|
||||
constitutive_mech_Li(ph)%data(1:3,1:3,me) = subLi0
|
||||
endif
|
||||
plasticState (material_phaseAt(co,el))%state( :,material_phaseMemberAt(co,ip,el)) &
|
||||
= plasticState(material_phaseAt(co,el))%subState0(:,material_phaseMemberAt(co,ip,el))
|
||||
do s = 1, phase_Nsources(material_phaseAt(co,el))
|
||||
sourceState( material_phaseAt(co,el))%p(s)%state( :,material_phaseMemberAt(co,ip,el)) &
|
||||
= sourceState(material_phaseAt(co,el))%p(s)%subState0(:,material_phaseMemberAt(co,ip,el))
|
||||
enddo
|
||||
|
||||
! cant restore dotState here, since not yet calculated in first cutback after initialization
|
||||
todo = crystallite_subStep(co,ip,el) > num%subStepMinCryst ! still on track or already done (beyond repair)
|
||||
endif
|
||||
! cant restore dotState here, since not yet calculated in first cutback after initialization
|
||||
todo = crystallite_subStep(co,ip,el) > num%subStepMinCryst ! still on track or already done (beyond repair)
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! prepare for integration
|
||||
if (todo) then
|
||||
crystallite_subF(1:3,1:3,co,ip,el) = crystallite_subF0(1:3,1:3,co,ip,el) &
|
||||
+ crystallite_subStep(co,ip,el) *( crystallite_partitionedF (1:3,1:3,co,ip,el) &
|
||||
-crystallite_partitionedF0(1:3,1:3,co,ip,el))
|
||||
crystallite_Fe(1:3,1:3,co,ip,el) = matmul(crystallite_subF(1:3,1:3,co,ip,el), &
|
||||
math_inv33(matmul(constitutive_mech_Fi(ph)%data(1:3,1:3,me), &
|
||||
constitutive_mech_Fp(ph)%data(1:3,1:3,me))))
|
||||
crystallite_subdt(co,ip,el) = crystallite_subStep(co,ip,el) * crystallite_dt(co,ip,el)
|
||||
crystallite_converged(co,ip,el) = .false.
|
||||
call integrateState(co,ip,el)
|
||||
call integrateSourceState(co,ip,el)
|
||||
endif
|
||||
if (todo) then
|
||||
crystallite_subF(1:3,1:3,co,ip,el) = crystallite_subF0(1:3,1:3,co,ip,el) &
|
||||
+ crystallite_subStep(co,ip,el) *( crystallite_partitionedF (1:3,1:3,co,ip,el) &
|
||||
-crystallite_partitionedF0(1:3,1:3,co,ip,el))
|
||||
crystallite_Fe(1:3,1:3,co,ip,el) = matmul(crystallite_subF(1:3,1:3,co,ip,el), &
|
||||
math_inv33(matmul(constitutive_mech_Fi(ph)%data(1:3,1:3,me), &
|
||||
constitutive_mech_Fp(ph)%data(1:3,1:3,me))))
|
||||
crystallite_subdt(co,ip,el) = crystallite_subStep(co,ip,el) * crystallite_dt(co,ip,el)
|
||||
crystallite_converged(co,ip,el) = .false.
|
||||
call integrateState(co,ip,el)
|
||||
call integrateSourceState(co,ip,el)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! integrate --- requires fully defined state array (basic + dependent state)
|
||||
if (.not. crystallite_converged(co,ip,el) .and. crystallite_subStep(co,ip,el) > num%subStepMinCryst) & ! do not try non-converged but fully cutbacked any further
|
||||
if (.not. crystallite_converged(co,ip,el) .and. crystallite_subStep(co,ip,el) > num%subStepMinCryst) & ! do not try non-converged but fully cutbacked any further
|
||||
todo = .true.
|
||||
enddo cutbackLooping
|
||||
|
||||
|
|
Loading…
Reference in New Issue