phasing out postResults
This commit is contained in:
parent
6ef00a9266
commit
65eb4e364f
|
@ -128,16 +128,16 @@ subroutine constitutive_init
|
|||
thisSize => plastic_phenopowerlaw_sizePostResult
|
||||
case (PLASTICITY_KINEHARDENING_ID) plasticityType
|
||||
outputName = PLASTICITY_KINEHARDENING_label
|
||||
thisOutput => plastic_kinehardening_output
|
||||
thisSize => plastic_kinehardening_sizePostResult
|
||||
thisOutput => null()
|
||||
thisSize => null()
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||
outputName = PLASTICITY_DISLOTWIN_label
|
||||
thisOutput => plastic_dislotwin_output
|
||||
thisSize => plastic_dislotwin_sizePostResult
|
||||
thisOutput => null()
|
||||
thisSize => null()
|
||||
case (PLASTICITY_DISLOUCLA_ID) plasticityType
|
||||
outputName = PLASTICITY_DISLOUCLA_label
|
||||
thisOutput => plastic_disloucla_output
|
||||
thisSize => plastic_disloucla_sizePostResult
|
||||
thisOutput => null()
|
||||
thisSize => null()
|
||||
case (PLASTICITY_NONLOCAL_ID) plasticityType
|
||||
outputName = PLASTICITY_NONLOCAL_label
|
||||
thisOutput => plastic_nonlocal_output
|
||||
|
@ -744,18 +744,6 @@ function constitutive_postResults(S, Fi, ipc, ip, el)
|
|||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_phenopowerlaw_postResults(Mp,instance,of)
|
||||
|
||||
case (PLASTICITY_KINEHARDENING_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_kinehardening_postResults(Mp,instance,of)
|
||||
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_dislotwin_postResults(Mp,temperature(ho)%p(tme),instance,of)
|
||||
|
||||
case (PLASTICITY_DISLOUCLA_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_disloucla_postResults(Mp,temperature(ho)%p(tme),instance,of)
|
||||
|
||||
case (PLASTICITY_NONLOCAL_ID) plasticityType
|
||||
constitutive_postResults(startPos:endPos) = &
|
||||
plastic_nonlocal_postResults (material_phaseAt(ipc,el),instance,of)
|
||||
|
|
|
@ -19,11 +19,6 @@ module plastic_disloUCLA
|
|||
implicit none
|
||||
private
|
||||
|
||||
integer, dimension(:,:), allocatable, target, public :: &
|
||||
plastic_disloUCLA_sizePostResult !< size of each post result output
|
||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||
plastic_disloUCLA_output !< name of each post result output
|
||||
|
||||
real(pReal), parameter, private :: &
|
||||
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
|
||||
|
||||
|
@ -106,7 +101,6 @@ module plastic_disloUCLA
|
|||
plastic_disloUCLA_dependentState, &
|
||||
plastic_disloUCLA_LpAndItsTangent, &
|
||||
plastic_disloUCLA_dotState, &
|
||||
plastic_disloUCLA_postResults, &
|
||||
plastic_disloUCLA_results
|
||||
private :: &
|
||||
kinetics
|
||||
|
@ -148,10 +142,6 @@ subroutine plastic_disloUCLA_init()
|
|||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||
|
||||
allocate(plastic_disloUCLA_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
||||
allocate(plastic_disloUCLA_output(maxval(phase_Noutput),Ninstance))
|
||||
plastic_disloUCLA_output = ''
|
||||
|
||||
allocate(param(Ninstance))
|
||||
allocate(state(Ninstance))
|
||||
allocate(dotState(Ninstance))
|
||||
|
@ -289,8 +279,6 @@ subroutine plastic_disloUCLA_init()
|
|||
end select
|
||||
|
||||
if (outputID /= undefined_ID) then
|
||||
plastic_disloUCLA_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||
plastic_disloUCLA_sizePostResult(i,phase_plasticityInstance(p)) = prm%sum_N_sl
|
||||
prm%outputID = [prm%outputID, outputID]
|
||||
endif
|
||||
|
||||
|
@ -304,7 +292,6 @@ subroutine plastic_disloUCLA_init()
|
|||
|
||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0, &
|
||||
prm%sum_N_sl,0,0)
|
||||
plasticState(p)%sizePostResults = sum(plastic_disloUCLA_sizePostResult(:,phase_plasticityInstance(p)))
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! locally defined state aliases and initialization of state0 and aTolState
|
||||
|
@ -472,59 +459,6 @@ subroutine plastic_disloUCLA_dependentState(instance,of)
|
|||
end subroutine plastic_disloUCLA_dependentState
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
function plastic_disloUCLA_postResults(Mp,T,instance,of) result(postResults)
|
||||
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
Mp !< Mandel stress
|
||||
real(pReal), intent(in) :: &
|
||||
T !< temperature
|
||||
integer, intent(in) :: &
|
||||
instance, &
|
||||
of
|
||||
|
||||
real(pReal), dimension(sum(plastic_disloUCLA_sizePostResult(:,instance))) :: &
|
||||
postResults
|
||||
|
||||
integer :: &
|
||||
o,c
|
||||
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||
gdot_pos,gdot_neg
|
||||
|
||||
c = 0
|
||||
|
||||
associate(prm => param(instance), stt => state(instance), dst => dependentState(instance))
|
||||
|
||||
outputsLoop: do o = 1,size(prm%outputID)
|
||||
select case(prm%outputID(o))
|
||||
|
||||
case (rho_mob_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = stt%rho_mob(1:prm%sum_N_sl,of)
|
||||
case (rho_dip_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = stt%rho_dip(1:prm%sum_N_sl,of)
|
||||
case (dot_gamma_sl_ID)
|
||||
call kinetics(Mp,T,instance,of,gdot_pos,gdot_neg)
|
||||
postResults(c+1:c+prm%sum_N_sl) = gdot_pos + gdot_neg
|
||||
case (gamma_sl_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = stt%gamma_sl(1:prm%sum_N_sl, of)
|
||||
case (Lambda_sl_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = dst%Lambda_sl(1:prm%sum_N_sl, of)
|
||||
case (thresholdstress_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = dst%threshold_stress(1:prm%sum_N_sl,of)
|
||||
|
||||
end select
|
||||
|
||||
c = c + prm%sum_N_sl
|
||||
|
||||
enddo outputsLoop
|
||||
|
||||
end associate
|
||||
|
||||
end function plastic_disloUCLA_postResults
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief writes results to HDF5 output file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -21,11 +21,6 @@ module plastic_dislotwin
|
|||
implicit none
|
||||
private
|
||||
|
||||
integer, dimension(:,:), allocatable, target, public :: &
|
||||
plastic_dislotwin_sizePostResult !< size of each post result output
|
||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||
plastic_dislotwin_output !< name of each post result output
|
||||
|
||||
real(pReal), parameter :: &
|
||||
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
|
||||
|
||||
|
@ -167,7 +162,6 @@ module plastic_dislotwin
|
|||
plastic_dislotwin_dependentState, &
|
||||
plastic_dislotwin_LpAndItsTangent, &
|
||||
plastic_dislotwin_dotState, &
|
||||
plastic_dislotwin_postResults, &
|
||||
plastic_dislotwin_results
|
||||
|
||||
contains
|
||||
|
@ -214,10 +208,6 @@ subroutine plastic_dislotwin_init
|
|||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||
|
||||
allocate(plastic_dislotwin_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
||||
allocate(plastic_dislotwin_output(maxval(phase_Noutput),Ninstance))
|
||||
plastic_dislotwin_output = ''
|
||||
|
||||
allocate(param(Ninstance))
|
||||
allocate(state(Ninstance))
|
||||
allocate(dotState(Ninstance))
|
||||
|
@ -507,8 +497,6 @@ subroutine plastic_dislotwin_init
|
|||
end select
|
||||
|
||||
if (outputID /= undefined_ID) then
|
||||
plastic_dislotwin_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||
plastic_dislotwin_sizePostResult(i,phase_plasticityInstance(p)) = outputSize
|
||||
prm%outputID = [prm%outputID, outputID]
|
||||
endif
|
||||
|
||||
|
@ -524,8 +512,6 @@ subroutine plastic_dislotwin_init
|
|||
|
||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0, &
|
||||
prm%sum_N_sl,prm%sum_N_tw,prm%sum_N_tr)
|
||||
plasticState(p)%sizePostResults = sum(plastic_dislotwin_sizePostResult(:,phase_plasticityInstance(p)))
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! locally defined state aliases and initialization of state0 and aTolState
|
||||
|
@ -936,82 +922,6 @@ subroutine plastic_dislotwin_dependentState(T,instance,of)
|
|||
end subroutine plastic_dislotwin_dependentState
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
function plastic_dislotwin_postResults(Mp,T,instance,of) result(postResults)
|
||||
|
||||
real(pReal), dimension(3,3),intent(in) :: &
|
||||
Mp !< 2nd Piola Kirchhoff stress tensor in Mandel notation
|
||||
real(pReal), intent(in) :: &
|
||||
T !< temperature at integration point
|
||||
integer, intent(in) :: &
|
||||
instance, &
|
||||
of
|
||||
|
||||
real(pReal), dimension(sum(plastic_dislotwin_sizePostResult(:,instance))) :: &
|
||||
postResults
|
||||
|
||||
integer :: &
|
||||
o,c,j
|
||||
|
||||
associate(prm => param(instance), stt => state(instance), dst => dependentState(instance))
|
||||
|
||||
c = 0
|
||||
|
||||
do o = 1,size(prm%outputID)
|
||||
select case(prm%outputID(o))
|
||||
|
||||
case (rho_mob_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = stt%rho_mob(1:prm%sum_N_sl,of)
|
||||
c = c + prm%sum_N_sl
|
||||
case (rho_dip_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = stt%rho_dip(1:prm%sum_N_sl,of)
|
||||
c = c + prm%sum_N_sl
|
||||
case (dot_gamma_sl_ID)
|
||||
call kinetics_slip(Mp,T,instance,of,postResults(c+1:c+prm%sum_N_sl))
|
||||
c = c + prm%sum_N_sl
|
||||
case (gamma_sl_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = stt%gamma_sl(1:prm%sum_N_sl,of)
|
||||
c = c + prm%sum_N_sl
|
||||
case (Lambda_sl_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = dst%Lambda_sl(1:prm%sum_N_sl,of)
|
||||
c = c + prm%sum_N_sl
|
||||
case (resolved_stress_slip_ID)
|
||||
do j = 1, prm%sum_N_sl
|
||||
postResults(c+j) = math_mul33xx33(Mp,prm%P_sl(1:3,1:3,j))
|
||||
enddo
|
||||
c = c + prm%sum_N_sl
|
||||
case (threshold_stress_slip_ID)
|
||||
postResults(c+1:c+prm%sum_N_sl) = dst%tau_pass(1:prm%sum_N_sl,of)
|
||||
c = c + prm%sum_N_sl
|
||||
|
||||
case (f_tw_ID)
|
||||
postResults(c+1:c+prm%sum_N_tw) = stt%f_tw(1:prm%sum_N_tw,of)
|
||||
c = c + prm%sum_N_tw
|
||||
case (Lambda_tw_ID)
|
||||
postResults(c+1:c+prm%sum_N_tw) = dst%Lambda_tw(1:prm%sum_N_tw,of)
|
||||
c = c + prm%sum_N_tw
|
||||
case (resolved_stress_twin_ID)
|
||||
do j = 1, prm%sum_N_tw
|
||||
postResults(c+j) = math_mul33xx33(Mp,prm%P_tw(1:3,1:3,j))
|
||||
enddo
|
||||
c = c + prm%sum_N_tw
|
||||
case (tau_hat_tw_ID)
|
||||
postResults(c+1:c+prm%sum_N_tw) = dst%tau_hat_tw(1:prm%sum_N_tw,of)
|
||||
c = c + prm%sum_N_tw
|
||||
|
||||
case (f_tr_ID)
|
||||
postResults(c+1:c+prm%sum_N_tr) = stt%f_tr(1:prm%sum_N_tr,of)
|
||||
c = c + prm%sum_N_tr
|
||||
end select
|
||||
enddo
|
||||
|
||||
end associate
|
||||
|
||||
end function plastic_dislotwin_postResults
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief writes results to HDF5 output file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -19,11 +19,6 @@ module plastic_kinehardening
|
|||
implicit none
|
||||
private
|
||||
|
||||
integer, dimension(:,:), allocatable, target, public :: &
|
||||
plastic_kinehardening_sizePostResult !< size of each post result output
|
||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||
plastic_kinehardening_output !< name of each post result output
|
||||
|
||||
enum, bind(c)
|
||||
enumerator :: &
|
||||
undefined_ID, &
|
||||
|
@ -90,7 +85,6 @@ module plastic_kinehardening
|
|||
plastic_kinehardening_LpAndItsTangent, &
|
||||
plastic_kinehardening_dotState, &
|
||||
plastic_kinehardening_deltaState, &
|
||||
plastic_kinehardening_postResults, &
|
||||
plastic_kinehardening_results
|
||||
|
||||
contains
|
||||
|
@ -127,10 +121,6 @@ subroutine plastic_kinehardening_init
|
|||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||
|
||||
allocate(plastic_kinehardening_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
||||
allocate(plastic_kinehardening_output(maxval(phase_Noutput),Ninstance))
|
||||
plastic_kinehardening_output = ''
|
||||
|
||||
allocate(param(Ninstance))
|
||||
allocate(state(Ninstance))
|
||||
allocate(dotState(Ninstance))
|
||||
|
@ -247,8 +237,6 @@ subroutine plastic_kinehardening_init
|
|||
end select
|
||||
|
||||
if (outputID /= undefined_ID) then
|
||||
plastic_kinehardening_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||
plastic_kinehardening_sizePostResult(i,phase_plasticityInstance(p)) = prm%totalNslip
|
||||
prm%outputID = [prm%outputID , outputID]
|
||||
endif
|
||||
|
||||
|
@ -263,7 +251,6 @@ subroutine plastic_kinehardening_init
|
|||
|
||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,sizeDeltaState, &
|
||||
prm%totalNslip,0,0)
|
||||
plasticState(p)%sizePostResults = sum(plastic_kinehardening_sizePostResult(:,phase_plasticityInstance(p)))
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! locally defined state aliases and initialization of state0 and aTolState
|
||||
|
@ -446,63 +433,6 @@ subroutine plastic_kinehardening_deltaState(Mp,instance,of)
|
|||
end subroutine plastic_kinehardening_deltaState
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
function plastic_kinehardening_postResults(Mp,instance,of) result(postResults)
|
||||
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
Mp !< Mandel stress
|
||||
integer, intent(in) :: &
|
||||
instance, &
|
||||
of
|
||||
|
||||
real(pReal), dimension(sum(plastic_kinehardening_sizePostResult(:,instance))) :: &
|
||||
postResults
|
||||
|
||||
integer :: &
|
||||
o,c,i
|
||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
||||
gdot_pos,gdot_neg
|
||||
|
||||
c = 0
|
||||
|
||||
associate(prm => param(instance), stt => state(instance))
|
||||
|
||||
outputsLoop: do o = 1,size(prm%outputID)
|
||||
select case(prm%outputID(o))
|
||||
|
||||
case (crss_ID)
|
||||
postResults(c+1:c+prm%totalNslip) = stt%crss(:,of)
|
||||
case(crss_back_ID)
|
||||
postResults(c+1:c+prm%totalNslip) = stt%crss_back(:,of)
|
||||
case (sense_ID)
|
||||
postResults(c+1:c+prm%totalNslip) = stt%sense(:,of)
|
||||
case (chi0_ID)
|
||||
postResults(c+1:c+prm%totalNslip) = stt%chi0(:,of)
|
||||
case (gamma0_ID)
|
||||
postResults(c+1:c+prm%totalNslip) = stt%gamma0(:,of)
|
||||
case (accshear_ID)
|
||||
postResults(c+1:c+prm%totalNslip) = stt%accshear(:,of)
|
||||
case (shearrate_ID)
|
||||
call kinetics(Mp,instance,of,gdot_pos,gdot_neg)
|
||||
postResults(c+1:c+prm%totalNslip) = gdot_pos+gdot_neg
|
||||
case (resolvedstress_ID)
|
||||
do i = 1, prm%totalNslip
|
||||
postResults(c+i) = math_mul33xx33(Mp,prm%Schmid(1:3,1:3,i))
|
||||
enddo
|
||||
|
||||
end select
|
||||
|
||||
c = c + prm%totalNslip
|
||||
|
||||
enddo outputsLoop
|
||||
|
||||
end associate
|
||||
|
||||
end function plastic_kinehardening_postResults
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief writes results to HDF5 output file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue