From 31dadd67ca7595154c03bbd253c57462dfcc8f9c Mon Sep 17 00:00:00 2001 From: achalhp Date: Mon, 8 Apr 2024 18:30:52 +0530 Subject: [PATCH] completed correspondence_matrix --- bin/correspondence_matrix | Bin 17240 -> 21728 bytes correspondence_matrix.f90 | 127 +++++++++++++++++++++++++++++++++++--- math.mod | Bin 0 -> 432 bytes 3 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 math.mod diff --git a/bin/correspondence_matrix b/bin/correspondence_matrix index 171fe38f579914b07651134a0a940948be58c89f..1e9aaa6ff5f165658e76c960e80c8d097aa38961 100755 GIT binary patch literal 21728 zcmeHP4Rlo1oqv;LFlxd~_-GMCrml7YVN4((ARiORzza=Cgrvq(a2S#anQgvyGSQ$S zv0+@Nacb--%AVR&dUmUH>#np~7b&|A>XN{^Y*315v5gdKBB-%g7e8lz|9kI$-kV`2 zDSNu-czSZ-&Hwv<|M&my*L#_{+uWrqGb|R3OQyC|BWlPlIW8sGSf&sFm$pF5#phMp zRBa6CEWwjd&yef833i++r7|qw+q_oQm+n67RrzE{_nXS~4gO8@3$Jgeo!#JXYHOd}zF_|B z`GwBbX6GCsr?{vN>Qk%MRB0Ic1tZPJO7O>}kWGTaRQ%dB`c%Iog&&F| z6@OM5{uAJ*s`ueE{Pr~b@oD0JDUJRoY4~H)_!&r}KP!#?RPe8c%>~8d+1%LN+~|9+K=9+*9h``M92X@F5JpFD`tBtZTS&=yo#1)8FORe|twOB_%`;6(3b`@LeI~wnp6fR8)lwvkcAEI) zi_0z(pW95b-6p=;3J8-uCjMpY1aPm3f4PYtHSu#y{9Y43*TnBL@yD9@qv&V`Ml&#) zfzb?%X5fpMfpfO2KGr+WX6s$nL(A~E8j1!pVtsn&3)#<$aAWgUgB`oJ6rZ+fE?`90 zlWed*hH~w4qG^dA>=X1NqG@R#j0$=V(X^xw?h*7%qG>BKxJ%Gi6HQx?!EQlMCYrV$ zgB^k%M>H+{gDrx-jA&Z&2R8~jgJ@dn2P*{q@lw#V#1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p?_ssEE;{ZJ14l*Bz^@(LBfuLDgG?#5FgPYAAH zcQ9^M_+r=%5@?K=R-jn`NLU?BO}?PWY_#|tG)=QK8xx6(nx4q)R+?rUjv^0sY_g)QO4Cg! z7fvJH#%V^`dztKxW5bf%+a$-75WYlLn-ypTwc?7lFc*npn^n8;MKOYW&Cw2Ddpy=2 zj$2(0sIeo0t$vY^hN?DgDWfSP&07MA7U2tZMNx&KR$OT?_!8KsHBB&~i-%hSDOWXXln3*uAhZ@k6JBlnJ0QZ4qB_R|2pl@)C--n@cN9gwP2k7 zcWQs8^n0GO@coD}dVX>G^Yar^FB@u_?f-4y__;C0?dSC{Q?CCK?VsKL0B~9hvp=tw znR+R?DAYz`*`L>~5n$A1_UH9CQ(kYwL>3*6MezVQTFbIOuV0yRJ=}h_WBM5UX>H81 zUmG&rscYgKbNjgg{a`4k?9c0UrYUX6^|L>>>qpvuleXjaKhpt+KYd4#?f+9?loO6` z-yijTlD`+xVPspGC;AKyr@vSGF>QAmgV$=CKAYt~pbeOEdpQitOb=)I4{Cp=oJaQO z`dOxZv(EPOa~@Ov-iYn9$N!7kpU3=%G9Q|r(!s748H?r9u9rku-6~FA3xikWv1is#cIj+=k?B0WdKpwPDvS=@sFXP zvB&lEb3E_s=fu$bp~8Ng$6o=X{@ebvDn%JsrD(e%_9y!@rSA`&{=%-yym5-8|CMAr=N nH(x(!-OOzVYnPMXQ0$qk;9M^o((-dA|DpBDVt$rGmMH!O&se-; diff --git a/correspondence_matrix.f90 b/correspondence_matrix.f90 index 5f943b6..1eb8337 100644 --- a/correspondence_matrix.f90 +++ b/correspondence_matrix.f90 @@ -1,16 +1,76 @@ +module math + +implicit none + +contains + +function math_axisAngleToR(axis,omega) result(math_axisAngleToR1) + + implicit none + + real, dimension(3), intent(in) :: axis + real, intent(in) :: omega + real, dimension(3) :: n + real :: norm,s,c,c1 + + real, dimension(3,3), parameter :: & + I3 = real(reshape([& + 1, 0, 0, & + 0, 1, 0, & + 0, 0, 1 & + ],shape(I3))) !< 3x3 Identity + + real, dimension(3,3) :: math_axisAngleToR1 + + norm = norm2(axis) + wellDefined: if (norm > 1.0e-8) then + n = axis/norm ! normalize axis to be sure + + s = sin(omega) + c = cos(omega) + c1 = 1.0 - c + + math_axisAngleToR1(1,1) = c + c1*n(1)**2.0 + math_axisAngleToR1(1,2) = c1*n(1)*n(2) - s*n(3) + math_axisAngleToR1(1,3) = c1*n(1)*n(3) + s*n(2) + + math_axisAngleToR1(2,1) = c1*n(1)*n(2) + s*n(3) + math_axisAngleToR1(2,2) = c + c1*n(2)**2.0 + math_axisAngleToR1(2,3) = c1*n(2)*n(3) - s*n(1) + + math_axisAngleToR1(3,1) = c1*n(1)*n(3) - s*n(2) + math_axisAngleToR1(3,2) = c1*n(2)*n(3) + s*n(1) + math_axisAngleToR1(3,3) = c + c1*n(3)**2.0 + else wellDefined + math_axisAngleToR1 = I3 + endif wellDefined + +end function + +end module math + + program corresponcence_matrix - implicit none + use math + implicit none + integer, dimension(4) :: & - active = [6,0,6,0], & - potential = [6,6,6,6] + active = [6,6,6,6], & !< number of active twin systems + potential = [6,6,6,6] !< all the potential twin systems real, dimension(3) :: & direction, normal - real, dimension(3,12) :: normal_vector + real, dimension(3,24) :: normal_vector, direction_vector + + real, dimension(3,3,24) :: SchmidMatrix, corresponcenceMatrix + + real, dimension(24) :: characteristicShear real :: cOverA = 1.6235 + real :: pi = 3.14159274 + real, dimension(8,24) :: & system = reshape(real([& ! <-10.1>{10.2} systems, shear = (3-(c/a)^2)/(sqrt(3) c/a) @@ -47,11 +107,21 @@ program corresponcence_matrix 2, -1, -1, -3, 2, -1, -1, 2 & ]),shape(system)) + real, dimension(3,3), parameter :: & + I3 = real(reshape([& + 1, 0, 0, & + 0, 1, 0, & + 0, 0, 1 & + ],shape(I3))) !< 3x3 Identity + integer :: & a, & !< index of active system p, & !< index in potential system matrix f, & !< index of my family - s !< index of my system in current family + s, f1, s1, e1, i, j, k !< index of my system in current family + + + a = 0 do f = 1, size(active,1) !< Loops 1 to 4 for hP @@ -70,12 +140,51 @@ program corresponcence_matrix - normal_vector(1:3,a) = normal /norm2(normal) - write(6,*)'normal vector', normal_vector + normal_vector(1:3,a) = normal /norm2(normal) + direction_vector(1:3,a) = direction / norm2(direction) + end do end do - do f = 1,size(active,1) + do f1 = 1,size(active,1) + s1 = sum(active(:f1-1)) + 1 + e1 = sum(active(:f1)) + select case(f1) + case (1) + characteristicShear(s1:e1) = (3.0-cOverA**2)/sqrt(3.0)/cOverA + case (2) + characteristicShear(s1:e1) = 1.0/cOverA + case (3) + characteristicShear(s1:e1) = (4.0*cOverA**2-9.0)/sqrt(48.0)/cOverA + case (4) + characteristicShear(s1:e1) = 2.0*(cOverA**2-2.0)/3.0/cOverA + end select + enddo + + write(6,*)'characteristic shear, 1, 0, -1, 1, -1, 0, 1, 2, = ',characteristicShear(4) + write(6,*)'characteristic shear, -1, -1, 2, 6, 1, 1, -2, 1, =',characteristicShear(7) + write(6,*)'characteristic shear, 1, 0, -1, -2, 1, 0, -1, 1, =',characteristicShear(13) + write(6,*)'characteristic shear, 1, 1, -2, -3, 1, 1, -2, 2, =',characteristicShear(19) + + + do i = 1, sum(active) + forall(j=1:3, k=1:3) SchmidMatrix(j,k,i) = direction_vector(j,i) * normal_vector(k,i) enddo -end program corresponcence_matrix \ No newline at end of file + do i = 1, sum(active) + corresponcenceMatrix(1:3,1:3,i) = matmul(math_axisAngleToR(normal_vector(1:3,i),pi),& + I3+characteristicShear(i)*SchmidMatrix(1:3,1:3,i)) + + enddo + + write(6,*)'correspondence matrix for 1, 0, -1, 1, -1, 0, 1, 2 =====',corresponcenceMatrix(1:3,1:3,4) + write(6,*)'ooooooooooooooooooooooooooooooooooooooooooooooo' + write(6,*)'correspondence matrix for -1, -1, 2, 6, 1, 1, -2, 1 =====',corresponcenceMatrix(1:3,1:3,7) + write(6,*)'ooooooooooooooooooooooooooooooooooooooooooooooo' + write(6,*)'correspondence matrix for 1, 0, -1, -2, 1, 0, -1, 1 =====',corresponcenceMatrix(1:3,1:3,13) + write(6,*)'ooooooooooooooooooooooooooooooooooooooooooooooo' + write(6,*)'correspondence matrix for 1, 1, -2, -3, 1, 1, -2, 2 =====',corresponcenceMatrix(1:3,1:3,19) + + +end program corresponcence_matrix + diff --git a/math.mod b/math.mod new file mode 100644 index 0000000000000000000000000000000000000000..5f34ee6d0cbec04effaaa07814e420546cf631a2 GIT binary patch literal 432 zcmV;h0Z;xPiwFP!000001HF_>Z^AGP$M60WzNH*CwLGgjPW?N%qTavRSP7F3rxVWL|2= zK@F_H&AGs)mW!thw&PJ2IzGdG%&bTnjyH52%ZVmKxtZyX%yBrOZ^dGP1pzf(Y?n3U zjx0bfXdUc|FPg%vVo82~p&TuA{JQZ%r4 zCQ1j1)FT%_jJD9=)eIc-S@ed(l>Kme^l&_SJNCSBvA6nQtIjZfoa#T+eBOv%B