From 6ccbc5e4e66999c7d1dcf14ad8bc121764604359 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 5 Oct 2018 07:20:51 +0200 Subject: [PATCH] characteristing shear is defined per system --- src/lattice.f90 | 32 ++++++++++++++++---------------- src/plastic_phenopowerlaw.f90 | 4 +--- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 15fd71b8a..3ccd65fea 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -2099,19 +2099,18 @@ function lattice_characteristicShear_Twin(Ntwin,structure,CoverA) result(charact ig, & !< index in full list mf, & !< index of my family ms !< index of my system in current family - - select case(structure) - case('fcc') - characteristicShear = LATTICE_FCC_SHEARTWIN - case('bcc') - characteristicShear = LATTICE_BCC_SHEARTWIN - case('hex') - ir = 0_pInt - myFamilies: do mf = 1_pInt,size(Ntwin,1) - mySystems: do ms = 1_pInt,Ntwin(mf) - ir = ir + 1_pInt - ig = sum(LATTICE_HEX_NTWINSYSTEM(1:mf-1))+ms - characteristicShear = LATTICE_BCC_SHEARTWIN + return + ir = 0_pInt + myFamilies: do mf = 1_pInt,size(Ntwin,1) + mySystems: do ms = 1_pInt,Ntwin(mf) + ir = ir + 1_pInt + ig = sum(LATTICE_HEX_NTWINSYSTEM(1:mf-1))+ms + select case(structure) + case('fcc') + characteristicShear(ir) = LATTICE_FCC_SHEARTWIN(ig) + case('bcc') + characteristicShear(ir) = LATTICE_BCC_SHEARTWIN(ig) + case('hex') select case(LATTICE_HEX_SHEARTWIN(ig)) ! from Christian & Mahajan 1995 p.29 case (1_pInt) ! <-10.1>{10.2} characteristicShear(ir) = (3.0_pReal-cOverA*cOverA)/sqrt(3.0_pReal)/CoverA @@ -2124,9 +2123,10 @@ function lattice_characteristicShear_Twin(Ntwin,structure,CoverA) result(charact case (4_pInt) ! <11.-3>{11.2} characteristicShear(ir) = 2.0_pReal*(cOverA*cOverA-2.0_pReal)/3.0_pReal/cOverA end select - enddo mySystems - enddo myFamilies - end select + end select + enddo mySystems + enddo myFamilies + end function lattice_characteristicShear_Twin diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index 1532b9d52..b957e76f0 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -145,9 +145,8 @@ subroutine plastic_phenopowerlaw_init integer(pInt) :: & maxNinstance, & - instance,p,j,k, f,o, i,& + instance,p,j,k, o, i,& NipcMyPhase, outputSize, & - index_myFamily, index_otherFamily, & sizeState,sizeDotState, & startIndex, endIndex @@ -385,7 +384,6 @@ subroutine plastic_phenopowerlaw_init allocate(plasticState(p)%RKCK45dotState (6,sizeDotState,NipcMyPhase), source=0.0_pReal) - !-------------------------------------------------------------------------------------------------- ! locally defined state aliases and initialization of state0 and aTolState startIndex = 1_pInt