diff --git a/src/constitutive.f90 b/src/constitutive.f90 index d8fb42bd2..e3c118bad 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -384,7 +384,9 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el) use prec, only: & pReal use material, only: & + phasememberAt, & phase_plasticity, & + phase_plasticityInstance, & material_phase, & material_homogenizationAt, & temperature, & @@ -396,8 +398,8 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el) plastic_nonlocal_microstructure use plastic_dislotwin, only: & plastic_dislotwin_microstructure - use plastic_disloucla, only: & - plastic_disloucla_microstructure + use plastic_disloUCLA, only: & + plastic_disloUCLA_dependentState implicit none integer(pInt), intent(in) :: & @@ -409,7 +411,8 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el) Fp !< plastic deformation gradient integer(pInt) :: & ho, & !< homogenization - tme !< thermal member position + tme, & !< thermal member position + instance, of real(pReal), intent(in), dimension(:,:,:,:) :: & orientations !< crystal orientations as quaternions @@ -420,7 +423,9 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el) case (PLASTICITY_DISLOTWIN_ID) plasticityType call plastic_dislotwin_microstructure(temperature(ho)%p(tme),ipc,ip,el) case (PLASTICITY_DISLOUCLA_ID) plasticityType - call plastic_disloucla_microstructure(temperature(ho)%p(tme),ipc,ip,el) + of = phasememberAt(ipc,ip,el) + instance = phase_plasticityInstance(material_phase(ipc,ip,el)) + call plastic_disloUCLA_dependentState(temperature(ho)%p(tme),instance,of) case (PLASTICITY_NONLOCAL_ID) plasticityType call plastic_nonlocal_microstructure (Fe,Fp,ip,el) end select plasticityType diff --git a/src/plastic_disloUCLA.f90 b/src/plastic_disloUCLA.f90 index b61672221..51fabe042 100644 --- a/src/plastic_disloUCLA.f90 +++ b/src/plastic_disloUCLA.f90 @@ -112,7 +112,7 @@ module plastic_disloUCLA public :: & plastic_disloUCLA_init, & - plastic_disloUCLA_microstructure, & + plastic_disloUCLA_dependentState, & plastic_disloUCLA_LpAndItsTangent, & plastic_disloUCLA_dotState, & plastic_disloUCLA_postResults @@ -436,30 +436,18 @@ end subroutine plastic_disloUCLA_init !-------------------------------------------------------------------------------------------------- !> @brief calculates derived quantities from state !-------------------------------------------------------------------------------------------------- -subroutine plastic_disloUCLA_microstructure(temperature,ipc,ip,el) - use material, only: & - phase_plasticityInstance, & - phaseAt, phasememberAt, & - material_phase +subroutine plastic_disloUCLA_dependentState(temperature,instance,of) implicit none - integer(pInt), intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + integer(pInt), intent(in) :: instance, of real(pReal), intent(in) :: & temperature !< temperature at IP integer(pInt) :: & - instance, & - s, & - of - real(pReal), dimension(plastic_disloUCLA_totalNslip(phase_plasticityInstance(material_phase(ipc,ip,el)))) :: & + s + real(pReal), dimension(param(instance)%totalNslip) :: & invLambdaSlip ! 1/mean free distance between 2 forest dislocations seen by a moving dislocation - of = phasememberAt(ipc,ip,el) - instance = phase_plasticityInstance(phaseAt(ipc,ip,el)) - associate(prm => param(instance), stt => state(instance),mse => microstructure(instance)) forall (s = 1_pInt:prm%totalNslip) & @@ -476,7 +464,7 @@ subroutine plastic_disloUCLA_microstructure(temperature,ipc,ip,el) end associate -end subroutine plastic_disloUCLA_microstructure +end subroutine plastic_disloUCLA_dependentState !--------------------------------------------------------------------------------------------------