loop not needed

This commit is contained in:
Martin Diehl 2023-11-22 20:31:35 +01:00
parent 34db73b068
commit eaf65e5665
1 changed files with 14 additions and 16 deletions

View File

@ -431,9 +431,8 @@ function crystal_characteristicShear_Twin(Ntwin,lattice,CoverA) result(character
real(pREAL), dimension(sum(Ntwin)) :: characteristicShear real(pREAL), dimension(sum(Ntwin)) :: characteristicShear
integer :: & integer :: &
a, & !< index of active system
f, & !< index of my family f, & !< index of my family
s !< index of my system in current family s, e
integer, dimension(size(HP_NTWINSYSTEM)), parameter :: & integer, dimension(size(HP_NTWINSYSTEM)), parameter :: &
HP_SHEARTWIN = [& HP_SHEARTWIN = [&
@ -450,21 +449,20 @@ function crystal_characteristicShear_Twin(Ntwin,lattice,CoverA) result(character
case('hP') case('hP')
if (cOverA < 1.0_pREAL .or. cOverA > 2.0_pREAL) & if (cOverA < 1.0_pREAL .or. cOverA > 2.0_pREAL) &
call IO_error(131,ext_msg='crystal_characteristicShear_Twin') call IO_error(131,ext_msg='crystal_characteristicShear_Twin')
a = 0
myFamilies: do f = 1,size(Ntwin,1) myFamilies: do f = 1,size(Ntwin,1)
mySystems: do s = 1,Ntwin(f) s = sum(Ntwin(:f-1)) + 1
a = a + 1 e = sum(Ntwin(:f))
select case(HP_SHEARTWIN(f)) ! from Christian & Mahajan 1995 p.29 select case(HP_SHEARTWIN(f)) ! from Christian & Mahajan 1995 p.29
case (1) ! <-10.1>{10.2} case (1) ! <-10.1>{10.2}
characteristicShear(a) = (3.0_pREAL-cOverA**2)/sqrt(3.0_pREAL)/CoverA characteristicShear(s:e) = (3.0_pREAL-cOverA**2)/sqrt(3.0_pREAL)/CoverA
case (2) ! <11.6>{-1-1.1} case (2) ! <11.6>{-1-1.1}
characteristicShear(a) = 1.0_pREAL/cOverA characteristicShear(s:e) = 1.0_pREAL/cOverA
case (3) ! <10.-2>{10.1} case (3) ! <10.-2>{10.1}
characteristicShear(a) = (4.0_pREAL*cOverA**2-9.0_pREAL)/sqrt(48.0_pREAL)/cOverA characteristicShear(s:e) = (4.0_pREAL*cOverA**2-9.0_pREAL)/sqrt(48.0_pREAL)/cOverA
case (4) ! <11.-3>{11.2} case (4) ! <11.-3>{11.2}
characteristicShear(a) = 2.0_pREAL*(cOverA**2-2.0_pREAL)/3.0_pREAL/cOverA characteristicShear(s:e) = 2.0_pREAL*(cOverA**2-2.0_pREAL)/3.0_pREAL/cOverA
end select end select
end do mySystems
end do myFamilies end do myFamilies
case default case default
call IO_error(137,ext_msg='crystal_characteristicShear_Twin: '//trim(lattice)) call IO_error(137,ext_msg='crystal_characteristicShear_Twin: '//trim(lattice))