Error caused by Ntslip,Ntwin and Ntrans removed by reverting it back to original form - a 2 D array and not in the blackbox(param)

This commit is contained in:
Sharan Roongta 2018-05-08 16:26:49 +02:00
parent 7c3b63ba7d
commit 12a0125121
1 changed files with 68 additions and 60 deletions

View File

@ -29,8 +29,10 @@ module plastic_dislotwin
totalNtwin, & !< total number of active twin systems for each instance totalNtwin, & !< total number of active twin systems for each instance
totalNtrans !< number of active transformation systems totalNtrans !< number of active transformation systems
integer(pInt), dimension(:,:), allocatable, private :: &
Nslip, &
Ntwin, &
Ntrans
real(pReal), dimension(:,:,:,:), allocatable, private :: & real(pReal), dimension(:,:,:,:), allocatable, private :: &
Ctwin66 !< twin elasticity matrix in Mandel notation for each instance Ctwin66 !< twin elasticity matrix in Mandel notation for each instance
@ -151,10 +153,10 @@ module plastic_dislotwin
Cthresholdtrans, & !< Cthresholdtrans, & !<
transStackHeight !< Stack height of hex nucleus transStackHeight !< Stack height of hex nucleus
integer(pInt), dimension(:), allocatable, private :: & !integer(pInt), dimension(:), allocatable, private :: &
Nslip, & !< number of active slip systems for each family and instance ! Nslip, & !< number of active slip systems for each family and instance
Ntwin, & !< number of active twin systems for each family and instance ! Ntwin, & !< number of active twin systems for each family and instance
Ntrans !< number of active transformation systems for each family and instance ! Ntrans !< number of active transformation systems for each family and instance
end type end type
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance) type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
@ -301,6 +303,12 @@ subroutine plastic_dislotwin_init(fileUnit)
allocate(totalNslip(maxNinstance), source=0_pInt) allocate(totalNslip(maxNinstance), source=0_pInt)
allocate(totalNtwin(maxNinstance), source=0_pInt) allocate(totalNtwin(maxNinstance), source=0_pInt)
allocate(totalNtrans(maxNinstance), source=0_pInt) allocate(totalNtrans(maxNinstance), source=0_pInt)
allocate(Nslip(lattice_maxNslipFamily,maxNinstance), source=0_pInt)
allocate(Ntwin(lattice_maxNtwinFamily,maxNinstance), source=0_pInt)
allocate(Ntrans(lattice_maxNtransFamily,maxNinstance), source=0_pInt)
allocate(rhoEdge0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal) allocate(rhoEdge0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
allocate(rhoEdgeDip0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal) allocate(rhoEdgeDip0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
allocate(burgersPerSlipFamily(lattice_maxNslipFamily,maxNinstance), & allocate(burgersPerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
@ -492,7 +500,7 @@ subroutine plastic_dislotwin_init(fileUnit)
Nchunks_SlipFamilies = chunkPos(1) - 1_pInt Nchunks_SlipFamilies = chunkPos(1) - 1_pInt
do j = 1_pInt, Nchunks_SlipFamilies do j = 1_pInt, Nchunks_SlipFamilies
param(instance)%Nslip(j) = IO_intValue(line,chunkPos,1_pInt+j) Nslip(j,instance) = IO_intValue(line,chunkPos,1_pInt+j)
enddo enddo
case ('rhoedge0','rhoedgedip0','slipburgers','qedge','v0','clambdaslip','tau_peierls','p_slip','q_slip') case ('rhoedge0','rhoedgedip0','slipburgers','qedge','v0','clambdaslip','tau_peierls','p_slip','q_slip')
do j = 1_pInt, Nchunks_SlipFamilies do j = 1_pInt, Nchunks_SlipFamilies
@ -529,7 +537,7 @@ subroutine plastic_dislotwin_init(fileUnit)
call IO_error(150_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(150_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
Nchunks_TwinFamilies = chunkPos(1) - 1_pInt Nchunks_TwinFamilies = chunkPos(1) - 1_pInt
do j = 1_pInt, Nchunks_TwinFamilies do j = 1_pInt, Nchunks_TwinFamilies
param(instance)%Ntwin(j) = IO_intValue(line,chunkPos,1_pInt+j) Ntwin(j,instance) = IO_intValue(line,chunkPos,1_pInt+j)
enddo enddo
case ('ndot0_twin','twinsize','twinburgers','r_twin') case ('ndot0_twin','twinsize','twinburgers','r_twin')
do j = 1_pInt, Nchunks_TwinFamilies do j = 1_pInt, Nchunks_TwinFamilies
@ -556,7 +564,7 @@ subroutine plastic_dislotwin_init(fileUnit)
call IO_error(150_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(150_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
Nchunks_TransFamilies = chunkPos(1) - 1_pInt Nchunks_TransFamilies = chunkPos(1) - 1_pInt
do j = 1_pInt, Nchunks_TransFamilies do j = 1_pInt, Nchunks_TransFamilies
param(instance)%Ntrans(j) = IO_intValue(line,chunkPos,1_pInt+j) Ntrans(j,instance) = IO_intValue(line,chunkPos,1_pInt+j)
enddo enddo
case ('ndot0_trans','lamellarsize','transburgers','s_trans') case ('ndot0_trans','lamellarsize','transburgers','s_trans')
do j = 1_pInt, Nchunks_TransFamilies do j = 1_pInt, Nchunks_TransFamilies
@ -686,14 +694,14 @@ subroutine plastic_dislotwin_init(fileUnit)
myPhase: if (phase_plasticity(phase) == PLASTICITY_dislotwin_ID) then myPhase: if (phase_plasticity(phase) == PLASTICITY_dislotwin_ID) then
instance = phase_plasticityInstance(phase) instance = phase_plasticityInstance(phase)
if (sum(param(instance)%Nslip(:)) < 0_pInt) & if (sum(Nslip(:,instance)) < 0_pInt) &
call IO_error(211_pInt,el=instance,ext_msg='Nslip ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='Nslip ('//PLASTICITY_DISLOTWIN_label//')')
if (sum(param(instance)%Ntwin(:)) < 0_pInt) & if (sum(Ntwin(:,instance)) < 0_pInt) &
call IO_error(211_pInt,el=instance,ext_msg='Ntwin ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='Ntwin ('//PLASTICITY_DISLOTWIN_label//')')
if (sum(param(instance)%Ntrans(:)) < 0_pInt) & if (sum(Ntrans(:,instance)) < 0_pInt) &
call IO_error(211_pInt,el=instance,ext_msg='Ntrans ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='Ntrans ('//PLASTICITY_DISLOTWIN_label//')')
do f = 1_pInt,lattice_maxNslipFamily do f = 1_pInt,lattice_maxNslipFamily
if (param(instance)%Nslip(f) > 0_pInt) then if (Nslip(f,instance) > 0_pInt) then
if (rhoEdge0(f,instance) < 0.0_pReal) & if (rhoEdge0(f,instance) < 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='rhoEdge0 ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='rhoEdge0 ('//PLASTICITY_DISLOTWIN_label//')')
if (rhoEdgeDip0(f,instance) < 0.0_pReal) & if (rhoEdgeDip0(f,instance) < 0.0_pReal) &
@ -707,7 +715,7 @@ subroutine plastic_dislotwin_init(fileUnit)
endif endif
enddo enddo
do f = 1_pInt,lattice_maxNtwinFamily do f = 1_pInt,lattice_maxNtwinFamily
if (param(instance)%Ntwin(f) > 0_pInt) then if (Ntwin(f,instance) > 0_pInt) then
if (burgersPerTwinFamily(f,instance) <= 0.0_pReal) & if (burgersPerTwinFamily(f,instance) <= 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='twinburgers ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='twinburgers ('//PLASTICITY_DISLOTWIN_label//')')
if (Ndot0PerTwinFamily(f,instance) < 0.0_pReal) & if (Ndot0PerTwinFamily(f,instance) < 0.0_pReal) &
@ -720,7 +728,7 @@ subroutine plastic_dislotwin_init(fileUnit)
call IO_error(211_pInt,el=instance,ext_msg='D0 ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='D0 ('//PLASTICITY_DISLOTWIN_label//')')
if (param(instance)%Qsd <= 0.0_pReal) & if (param(instance)%Qsd <= 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='Qsd ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='Qsd ('//PLASTICITY_DISLOTWIN_label//')')
if (sum(param(instance)%Ntwin(:)) > 0_pInt) then if (sum(Ntwin(:,instance)) > 0_pInt) then
if (dEq0(param(instance)%SFE_0K) .and. & if (dEq0(param(instance)%SFE_0K) .and. &
dEq0(param(instance)%dSFE_dT) .and. & dEq0(param(instance)%dSFE_dT) .and. &
lattice_structure(phase) == LATTICE_fcc_ID) & lattice_structure(phase) == LATTICE_fcc_ID) &
@ -730,7 +738,7 @@ subroutine plastic_dislotwin_init(fileUnit)
if (param(instance)%aTolTwinFrac <= 0.0_pReal) & if (param(instance)%aTolTwinFrac <= 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='aTolTwinFrac ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211_pInt,el=instance,ext_msg='aTolTwinFrac ('//PLASTICITY_DISLOTWIN_label//')')
endif endif
if (sum(param(instance)%Ntrans(:)) > 0_pInt) then if (sum(Ntrans(:,instance)) > 0_pInt) then
if (dEq0(param(instance)%SFE_0K) .and. & if (dEq0(param(instance)%SFE_0K) .and. &
dEq0(param(instance)%dSFE_dT) .and. & dEq0(param(instance)%dSFE_dT) .and. &
lattice_structure(phase) == LATTICE_fcc_ID) & lattice_structure(phase) == LATTICE_fcc_ID) &
@ -754,12 +762,12 @@ subroutine plastic_dislotwin_init(fileUnit)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! Determine total number of active slip or twin systems ! Determine total number of active slip or twin systems
param(instance)%Nslip(:) = min(lattice_NslipSystem(:,phase),param(instance)%Nslip(:)) Nslip(:,instance) = min(lattice_NslipSystem(:,phase),Nslip(:,instance))
param(instance)%Ntwin(:) = min(lattice_NtwinSystem(:,phase),param(instance)%Ntwin(:)) Ntwin(:,instance) = min(lattice_NtwinSystem(:,phase),Ntwin(:,instance))
param(instance)%Ntrans(:)= min(lattice_NtransSystem(:,phase),param(instance)%Ntrans(:)) Ntrans(:,instance)= min(lattice_NtransSystem(:,phase),Ntrans(:,instance))
totalNslip(instance) = sum(param(instance)%Nslip(:)) totalNslip(instance) = sum(Nslip(:,instance))
totalNtwin(instance) = sum(param(instance)%Ntwin(:)) totalNtwin(instance) = sum(Ntwin(:,instance))
totalNtrans(instance) = sum(param(instance)%Ntrans(:)) totalNtrans(instance) = sum(Ntrans(:,instance))
endif myPhase endif myPhase
enddo sanityChecks enddo sanityChecks
@ -915,8 +923,8 @@ subroutine plastic_dislotwin_init(fileUnit)
!* Process slip related parameters ------------------------------------------------ !* Process slip related parameters ------------------------------------------------
slipFamiliesLoop: do f = 1_pInt,lattice_maxNslipFamily slipFamiliesLoop: do f = 1_pInt,lattice_maxNslipFamily
index_myFamily = sum(param(instance)%Nslip(1:f-1_pInt)) ! index in truncated slip system list index_myFamily = sum(Nslip(1:f-1_pInt,instance)) ! index in truncated slip system list
slipSystemsLoop: do j = 1_pInt,param(instance)%Nslip(f) slipSystemsLoop: do j = 1_pInt,Nslip(f,instance)
!* Burgers vector, !* Burgers vector,
! dislocation velocity prefactor, ! dislocation velocity prefactor,
@ -938,8 +946,8 @@ subroutine plastic_dislotwin_init(fileUnit)
!* Calculation of forest projections for edge dislocations !* Calculation of forest projections for edge dislocations
!* Interaction matrices !* Interaction matrices
do o = 1_pInt,lattice_maxNslipFamily do o = 1_pInt,lattice_maxNslipFamily
index_otherFamily = sum(param(instance)%Nslip(1:o-1_pInt)) index_otherFamily = sum(Nslip(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Nslip(o) ! loop over (active) systems in other family (slip) do k = 1_pInt,Nslip(o,instance) ! loop over (active) systems in other family (slip)
forestProjectionEdge(index_myFamily+j,index_otherFamily+k,instance) = & forestProjectionEdge(index_myFamily+j,index_otherFamily+k,instance) = &
abs(math_mul3x3(lattice_sn(:,sum(lattice_NslipSystem(1:f-1,phase))+j,phase), & abs(math_mul3x3(lattice_sn(:,sum(lattice_NslipSystem(1:f-1,phase))+j,phase), &
lattice_st(:,sum(lattice_NslipSystem(1:o-1,phase))+k,phase))) lattice_st(:,sum(lattice_NslipSystem(1:o-1,phase))+k,phase)))
@ -951,8 +959,8 @@ subroutine plastic_dislotwin_init(fileUnit)
enddo; enddo enddo; enddo
do o = 1_pInt,lattice_maxNtwinFamily do o = 1_pInt,lattice_maxNtwinFamily
index_otherFamily = sum(param(instance)%Ntwin(1:o-1_pInt)) index_otherFamily = sum(Ntwin(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Ntwin(o) ! loop over (active) systems in other family (twin) do k = 1_pInt,Ntwin(o,instance) ! loop over (active) systems in other family (twin)
interactionMatrix_SlipTwin(index_myFamily+j,index_otherFamily+k,instance) = & interactionMatrix_SlipTwin(index_myFamily+j,index_otherFamily+k,instance) = &
interaction_SlipTwin(lattice_interactionSlipTwin( & interaction_SlipTwin(lattice_interactionSlipTwin( &
sum(lattice_NslipSystem(1:f-1_pInt,phase))+j, & sum(lattice_NslipSystem(1:f-1_pInt,phase))+j, &
@ -961,8 +969,8 @@ subroutine plastic_dislotwin_init(fileUnit)
enddo; enddo enddo; enddo
do o = 1_pInt,lattice_maxNtransFamily do o = 1_pInt,lattice_maxNtransFamily
index_otherFamily = sum(param(instance)%Ntrans(1:o-1_pInt)) index_otherFamily = sum(Ntrans(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Ntrans(o) ! loop over (active) systems in other family (trans) do k = 1_pInt,Ntrans(o,instance) ! loop over (active) systems in other family (trans)
interactionMatrix_SlipTrans(index_myFamily+j,index_otherFamily+k,instance) = & interactionMatrix_SlipTrans(index_myFamily+j,index_otherFamily+k,instance) = &
interaction_SlipTrans(lattice_interactionSlipTrans( & interaction_SlipTrans(lattice_interactionSlipTrans( &
sum(lattice_NslipSystem(1:f-1_pInt,phase))+j, & sum(lattice_NslipSystem(1:f-1_pInt,phase))+j, &
@ -975,8 +983,8 @@ subroutine plastic_dislotwin_init(fileUnit)
!* Process twin related parameters ------------------------------------------------ !* Process twin related parameters ------------------------------------------------
twinFamiliesLoop: do f = 1_pInt,lattice_maxNtwinFamily twinFamiliesLoop: do f = 1_pInt,lattice_maxNtwinFamily
index_myFamily = sum(param(instance)%Ntwin(1:f-1_pInt)) ! index in truncated twin system list index_myFamily = sum(Ntwin(1:f-1_pInt,instance)) ! index in truncated twin system list
twinSystemsLoop: do j = 1_pInt,param(instance)%Ntwin(f) twinSystemsLoop: do j = 1_pInt,Ntwin(f,instance)
!* Burgers vector, !* Burgers vector,
! nucleation rate prefactor, ! nucleation rate prefactor,
@ -1009,8 +1017,8 @@ subroutine plastic_dislotwin_init(fileUnit)
!* Interaction matrices !* Interaction matrices
do o = 1_pInt,lattice_maxNslipFamily do o = 1_pInt,lattice_maxNslipFamily
index_otherFamily = sum(param(instance)%Nslip(1:o-1_pInt)) index_otherFamily = sum(Nslip(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Nslip(o) ! loop over (active) systems in other family (slip) do k = 1_pInt,Nslip(o,instance) ! loop over (active) systems in other family (slip)
interactionMatrix_TwinSlip(index_myFamily+j,index_otherFamily+k,instance) = & interactionMatrix_TwinSlip(index_myFamily+j,index_otherFamily+k,instance) = &
interaction_TwinSlip(lattice_interactionTwinSlip( & interaction_TwinSlip(lattice_interactionTwinSlip( &
sum(lattice_NtwinSystem(1:f-1_pInt,phase))+j, & sum(lattice_NtwinSystem(1:f-1_pInt,phase))+j, &
@ -1019,8 +1027,8 @@ subroutine plastic_dislotwin_init(fileUnit)
enddo; enddo enddo; enddo
do o = 1_pInt,lattice_maxNtwinFamily do o = 1_pInt,lattice_maxNtwinFamily
index_otherFamily = sum(param(instance)%Ntwin(1:o-1_pInt)) index_otherFamily = sum(Ntwin(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Ntwin(o) ! loop over (active) systems in other family (twin) do k = 1_pInt,Ntwin(o,instance) ! loop over (active) systems in other family (twin)
interactionMatrix_TwinTwin(index_myFamily+j,index_otherFamily+k,instance) = & interactionMatrix_TwinTwin(index_myFamily+j,index_otherFamily+k,instance) = &
interaction_TwinTwin(lattice_interactionTwinTwin( & interaction_TwinTwin(lattice_interactionTwinTwin( &
sum(lattice_NtwinSystem(1:f-1_pInt,phase))+j, & sum(lattice_NtwinSystem(1:f-1_pInt,phase))+j, &
@ -1033,8 +1041,8 @@ subroutine plastic_dislotwin_init(fileUnit)
!* Process transformation related parameters ------------------------------------------------ !* Process transformation related parameters ------------------------------------------------
transFamiliesLoop: do f = 1_pInt,lattice_maxNtransFamily transFamiliesLoop: do f = 1_pInt,lattice_maxNtransFamily
index_myFamily = sum(param(instance)%Ntrans(1:f-1_pInt)) ! index in truncated trans system list index_myFamily = sum(Ntrans(1:f-1_pInt,instance)) ! index in truncated trans system list
transSystemsLoop: do j = 1_pInt,param(instance)%Ntrans(f) transSystemsLoop: do j = 1_pInt,Ntrans(f,instance)
!* Burgers vector, !* Burgers vector,
! nucleation rate prefactor, ! nucleation rate prefactor,
@ -1067,8 +1075,8 @@ subroutine plastic_dislotwin_init(fileUnit)
!* Interaction matrices !* Interaction matrices
do o = 1_pInt,lattice_maxNslipFamily do o = 1_pInt,lattice_maxNslipFamily
index_otherFamily = sum(param(instance)%Nslip(1:o-1_pInt)) index_otherFamily = sum(Nslip(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Nslip(o) ! loop over (active) systems in other family (slip) do k = 1_pInt,Nslip(o,instance) ! loop over (active) systems in other family (slip)
interactionMatrix_TransSlip(index_myFamily+j,index_otherFamily+k,instance) = & interactionMatrix_TransSlip(index_myFamily+j,index_otherFamily+k,instance) = &
interaction_TransSlip(lattice_interactionTransSlip( & interaction_TransSlip(lattice_interactionTransSlip( &
sum(lattice_NtransSystem(1:f-1_pInt,phase))+j, & sum(lattice_NtransSystem(1:f-1_pInt,phase))+j, &
@ -1077,8 +1085,8 @@ subroutine plastic_dislotwin_init(fileUnit)
enddo; enddo enddo; enddo
do o = 1_pInt,lattice_maxNtransFamily do o = 1_pInt,lattice_maxNtransFamily
index_otherFamily = sum(param(instance)%Ntrans(1:o-1_pInt)) index_otherFamily = sum(Ntrans(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Ntrans(o) ! loop over (active) systems in other family (trans) do k = 1_pInt,Ntrans(o,instance) ! loop over (active) systems in other family (trans)
interactionMatrix_TransTrans(index_myFamily+j,index_otherFamily+k,instance) = & interactionMatrix_TransTrans(index_myFamily+j,index_otherFamily+k,instance) = &
interaction_TransTrans(lattice_interactionTransTrans( & interaction_TransTrans(lattice_interactionTransTrans( &
sum(lattice_NtransSystem(1:f-1_pInt,phase))+j, & sum(lattice_NtransSystem(1:f-1_pInt,phase))+j, &
@ -1090,8 +1098,8 @@ subroutine plastic_dislotwin_init(fileUnit)
select case(trans_lattice_structure(phase)) select case(trans_lattice_structure(phase))
case (LATTICE_bcc_ID) case (LATTICE_bcc_ID)
do o = 1_pInt,lattice_maxNtransFamily do o = 1_pInt,lattice_maxNtransFamily
index_otherFamily = sum(param(instance)%Nslip(1:o-1_pInt)) index_otherFamily = sum(Nslip(1:o-1_pInt,instance))
do k = 1_pInt,param(instance)%Nslip(o) ! loop over (active) systems in other family (trans) do k = 1_pInt,Nslip(o,instance) ! loop over (active) systems in other family (trans)
projectionMatrix_Trans(index_myFamily+j,index_otherFamily+k,instance) = & projectionMatrix_Trans(index_myFamily+j,index_otherFamily+k,instance) = &
lattice_projectionTrans( sum(lattice_NtransSystem(1:f-1,phase))+j, & lattice_projectionTrans( sum(lattice_NtransSystem(1:f-1,phase))+j, &
sum(lattice_NslipSystem(1:o-1,phase))+k, phase) sum(lattice_NslipSystem(1:o-1,phase))+k, phase)
@ -1253,12 +1261,12 @@ subroutine plastic_dislotwin_stateInit(ph,instance)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! initialize basic slip state variables ! initialize basic slip state variables
do f = 1_pInt,lattice_maxNslipFamily do f = 1_pInt,lattice_maxNslipFamily
index_myFamily = sum(param(instance)%Nslip(1:f-1_pInt)) ! index in truncated slip system list index_myFamily = sum(Nslip(1:f-1_pInt,instance)) ! index in truncated slip system list
rhoEdge0_temp(index_myFamily+1_pInt: & rhoEdge0_temp(index_myFamily+1_pInt: &
index_myFamily+param(instance)%Nslip(f)) = & index_myFamily+Nslip(f,instance)) = &
rhoEdge0(f,instance) rhoEdge0(f,instance)
rhoEdgeDip0_temp(index_myFamily+1_pInt: & rhoEdgeDip0_temp(index_myFamily+1_pInt: &
index_myFamily+param(instance)%Nslip(f)) = & index_myFamily+Nslip(f,instance)) = &
rhoEdgeDip0(f,instance) rhoEdgeDip0(f,instance)
enddo enddo
@ -1686,7 +1694,7 @@ subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature
j = 0_pInt j = 0_pInt
slipFamiliesLoop: do f = 1_pInt,lattice_maxNslipFamily slipFamiliesLoop: do f = 1_pInt,lattice_maxNslipFamily
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
slipSystemsLoop: do i = 1_pInt,param(instance)%Nslip(f) slipSystemsLoop: do i = 1_pInt,Nslip(f,instance)
j = j+1_pInt j = j+1_pInt
!* Calculation of Lp !* Calculation of Lp
@ -1804,7 +1812,7 @@ subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature
j = 0_pInt j = 0_pInt
twinFamiliesLoop: do f = 1_pInt,lattice_maxNtwinFamily twinFamiliesLoop: do f = 1_pInt,lattice_maxNtwinFamily
index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family
twinSystemsLoop: do i = 1_pInt,param(instance)%Ntwin(f) twinSystemsLoop: do i = 1_pInt,Ntwin(f,instance)
j = j+1_pInt j = j+1_pInt
!* Calculation of Lp !* Calculation of Lp
@ -1855,7 +1863,7 @@ subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature
j = 0_pInt j = 0_pInt
transFamiliesLoop: do f = 1_pInt,lattice_maxNtransFamily transFamiliesLoop: do f = 1_pInt,lattice_maxNtransFamily
index_myFamily = sum(lattice_NtransSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtransSystem(1:f-1_pInt,ph)) ! at which index starts my family
transSystemsLoop: do i = 1_pInt,param(instance)%Ntrans(f) transSystemsLoop: do i = 1_pInt,Ntrans(f,instance)
j = j+1_pInt j = j+1_pInt
!* Resolved shear stress on transformation system !* Resolved shear stress on transformation system
@ -1983,7 +1991,7 @@ subroutine plastic_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Nslip(f) ! process each (active) slip system in family do i = 1_pInt,Nslip(f,instance) ! process each (active) slip system in family
j = j+1_pInt j = j+1_pInt
!* Resolved shear stress on slip system !* Resolved shear stress on slip system
@ -2071,7 +2079,7 @@ subroutine plastic_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNtwinFamily ! loop over all twin families do f = 1_pInt,lattice_maxNtwinFamily ! loop over all twin families
index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Ntwin(f) ! process each (active) twin system in family do i = 1_pInt,Ntwin(f,instance) ! process each (active) twin system in family
j = j+1_pInt j = j+1_pInt
!* Resolved shear stress on twin system !* Resolved shear stress on twin system
@ -2111,7 +2119,7 @@ subroutine plastic_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNtransFamily ! loop over all trans families do f = 1_pInt,lattice_maxNtransFamily ! loop over all trans families
index_myFamily = sum(lattice_NtransSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtransSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Ntrans(f) ! process each (active) trans system in family do i = 1_pInt,Ntrans(f,instance) ! process each (active) trans system in family
j = j+1_pInt j = j+1_pInt
!* Resolved shear stress on transformation system !* Resolved shear stress on transformation system
@ -2235,7 +2243,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Nslip(f) ! process each (active) slip system in family do i = 1_pInt,Nslip(f,instance) ! process each (active) slip system in family
j = j + 1_pInt ! could be taken from state by now! j = j + 1_pInt ! could be taken from state by now!
!* Resolved shear stress on slip system !* Resolved shear stress on slip system
@ -2277,7 +2285,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Nslip(f) ! process each (active) slip system in family do i = 1_pInt,Nslip(f,instance) ! process each (active) slip system in family
j = j + 1_pInt j = j + 1_pInt
plastic_dislotwin_postResults(c+j) =& plastic_dislotwin_postResults(c+j) =&
dot_product(Tstar_v,lattice_Sslip_v(:,1,index_myFamily+i,ph)) dot_product(Tstar_v,lattice_Sslip_v(:,1,index_myFamily+i,ph))
@ -2291,7 +2299,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Nslip(f) ! process each (active) slip system in family do i = 1_pInt,Nslip(f,instance) ! process each (active) slip system in family
j = j + 1_pInt j = j + 1_pInt
plastic_dislotwin_postResults(c+j) = & plastic_dislotwin_postResults(c+j) = &
(3.0_pReal*lattice_mu(ph)*burgersPerSlipSystem(j,instance))/& (3.0_pReal*lattice_mu(ph)*burgersPerSlipSystem(j,instance))/&
@ -2341,7 +2349,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Nslip(f) ! process each (active) slip system in family do i = 1_pInt,Nslip(f,instance) ! process each (active) slip system in family
j = j + 1_pInt j = j + 1_pInt
!* Resolved shear stress on slip system !* Resolved shear stress on slip system
@ -2375,7 +2383,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNtwinFamily ! loop over all twin families do f = 1_pInt,lattice_maxNtwinFamily ! loop over all twin families
index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1,param(instance)%Ntwin(f) ! process each (active) twin system in family do i = 1,Ntwin(f,instance) ! process each (active) twin system in family
j = j + 1_pInt j = j + 1_pInt
tau = dot_product(Tstar_v,lattice_Stwin_v(:,index_myFamily+i,ph)) tau = dot_product(Tstar_v,lattice_Stwin_v(:,index_myFamily+i,ph))
@ -2421,7 +2429,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNtwinFamily ! loop over all slip families do f = 1_pInt,lattice_maxNtwinFamily ! loop over all slip families
index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Ntwin(f) ! process each (active) slip system in family do i = 1_pInt,Ntwin(f,instance) ! process each (active) slip system in family
j = j + 1_pInt j = j + 1_pInt
plastic_dislotwin_postResults(c+j) = dot_product(Tstar_v,lattice_Stwin_v(:,index_myFamily+i,ph)) plastic_dislotwin_postResults(c+j) = dot_product(Tstar_v,lattice_Stwin_v(:,index_myFamily+i,ph))
enddo; enddo enddo; enddo
@ -2434,7 +2442,7 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el)
j = 0_pInt j = 0_pInt
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
do i = 1_pInt,param(instance)%Nslip(f) ! process each (active) slip system in family do i = 1_pInt,Nslip(f,instance) ! process each (active) slip system in family
j = j + 1_pInt j = j + 1_pInt
!* Resolved shear stress on slip system !* Resolved shear stress on slip system