From 4989a1665bd91ab417eb5752b9ba96dc39471fe6 Mon Sep 17 00:00:00 2001 From: achalhp Date: Tue, 9 Apr 2024 16:48:50 +0530 Subject: [PATCH] Minor changes to correspondence matrix --- bin/correspondence_matrix | Bin 21728 -> 21728 bytes correspondence_matrix.f90 | 66 ++++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/bin/correspondence_matrix b/bin/correspondence_matrix index 1e9aaa6ff5f165658e76c960e80c8d097aa38961..3545c4caa9fb9d08b9bc8f4297996635e78599ef 100755 GIT binary patch delta 1827 zcmb7FUr19?7~ehXx?E0O#GtmhyXk6+x$d@FDFkX|3yQD@p)#lpA(AXLG6@OIOeho2 zLlJ}}6d3f!ZZGqtKSV*6l||4~dsyleY%9qiVV(0`=V^yXx?{Wh&iDI%f6lpZBmF|8 zU%0TGwB)feqD`Mpb#Xwi3k#wxkW0MwqEX;5b@ z{LDQ%Q+|bk2aAcn&_%;KKn_zqJ?qkPiAwd*$jRTQRDz5%^X#sp32Jd(y%$O`#E%Ss z`ZER|EK=2P020)LtV`9`t5lI(PW=I>S7A)lug25VhoBT2`4NSV1mg^xQa3R5gRD!{ zt5vG3Tx=@vqw{f`XOoQ2zoyB}e8oF$c64@)Qg71>sL89eNJj*;M#i(wwbYM@DhrIeHxya?^364 zpcI>Usv+2?X&iTU;Hd(iYciHL_6kbzL?-9p6*x#R@Sv=oR2K+BY8FcI=3>s(Fr`BF7*06DE>rr<%owE*uj{y(Hz03e;8c<@utSnA zn4N!oFR4@;c&fKR^^k#656}}vwUTw|rmRw_-ez#F-a(S>VSlG(IsWeegfHdJRX;gzyiq$;Td!YKvz^ODI$PH8#tV`4EQmK9|;#_@zG$+46 znl88BSQ|~Vup^4!xt-=3SQUH0>hniLMl)VU*2X(xig9(XwnwfksHv-$_WC@MBzvSn zdiU+~xZn?2km!Qnjf-WA3ZxBa`bi^5kT5~kXzc@FKF?U_pTo^7xN(teWjM-7<_iNH z9}!OY?3D|-BdN$$*YtlMT;f|H?OiaBPqO`~|FBuupUtW*NcXUQ6U%Mw0)q0e^jd?m$Vp5)N{wUD;YWWWV xt@bEAA-j+h40wH-x?_!p>y9>fHw2WY+gfy}*^J97y!u)XAtD!CW|aTT}O<#e|hs&RGN*r4dC+AXt=>ibNtQnE-tFvc28=`&8Py&G&A6@QptHb-}|Om!4PA&sK0MwM9u? zg=|JLEKf{>&l3|2=e~tPZl4#-qOEBl@Q8#=WxPbv_iOl&epC?q^H5p0 zPgPHpL-_1=*q+21XhDOMb{_anEdq8B;7&p8cksYm0XPV2^sJ$FCdy$a37KtT;B^cH zLxMO03=$=Am_Gwu0I0uCM-lZi@EBm}TNbVjC@A_;HrK%(py)Cy^ciztQA!P6IK}x> zVkue|2M1FtG{s*+p@zZ{YU0$-P^j7MV`7vr9@xNXln>9+pU-#mQHlE|#picyxoGMyiS*k8b-o-Um? zcyJOK>@mEYh$3<%WOmC%<{l7pZv=6~+)+}Sw7f}pi~HQnqh@17sBU7;BZwo@^9rcZ z05W$5%1t&yQ6S2ofrQKpnTXm$3~mv`5rdPYJ~7xk9);>7AyXwr`7uiWSrA7I=8>ro zR2e*JJPY5ivZ)`AMM2xgAZt!b=ptEWiWGm+i%LiWEhraw9poy^7p0s>zLjpVl%`tE z09ec*6Yux}{3A+{&}Ifs0P`%mRIDH>lme@Xk|=N*r_k=i!W2vi6UhsNT#({*4of1@ zg%4-i7xQps=&-UoM28nS1WvrF|8K!{)`X0Iw#1{ci}VF9{@7Jmns3z->E9aTrB`Zg z6x})p>+Cm^r#0yN6vQrTq&KLRxErL>Pa35ReL5XV_o1uxJLk&TC8u>J?y@sUMo(+F z{*A-v4`JfkTyqrt*2uNESt>5qk!6)sdyZ69A3B`1CYS3kJ|Uw`E8+T*EQQX5Kxm;e IbtRS3-$%e>S^xk5 diff --git a/correspondence_matrix.f90 b/correspondence_matrix.f90 index 1eb8337..39744b9 100644 --- a/correspondence_matrix.f90 +++ b/correspondence_matrix.f90 @@ -18,13 +18,13 @@ function math_axisAngleToR(axis,omega) result(math_axisAngleToR1) 1, 0, 0, & 0, 1, 0, & 0, 0, 1 & - ],shape(I3))) !< 3x3 Identity + ],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 + n = axis/norm ! normalize axis to be sure s = sin(omega) c = cos(omega) @@ -112,23 +112,26 @@ program corresponcence_matrix 1, 0, 0, & 0, 1, 0, & 0, 0, 1 & - ],shape(I3))) !< 3x3 Identity + ],shape(I3))) !< 3x3 Identity integer :: & a, & !< index of active system p, & !< index in potential system matrix f, & !< index of my family - s, f1, s1, e1, i, j, k !< index of my system in current family + s, & !< index of my system in current family + f1, s1, e1, i, j, k !< indices for similar loops - + !-------------------------------------------------------------------- + !> Normal vector to twin plane and direction vector of the twin + !-------------------------------------------------------------------- a = 0 - do f = 1, size(active,1) !< Loops 1 to 4 for hP - do s = 1, active(f) !< 1 to 6 two times + do f = 1, size(active,1) !< Active Twin Modes + do s = 1, active(f) !< Active twin systems a = a + 1 - p = sum(potential(1:f-1))+s !< 1 to 6 and 13 to 18 + p = sum(potential(1:f-1))+s direction = [ system(1,p)*1.5, & (system(1,p)+2.0*system(2,p))*sqrt(0.75), & @@ -146,7 +149,11 @@ program corresponcence_matrix end do end do - do f1 = 1,size(active,1) + !-------------------------------------------------------------------- + !> Magnitude of Characteristic shear for twinning modes + !-------------------------------------------------------------------- + + do f1 = 1,size(active,1) !< Active twin modes s1 = sum(active(:f1-1)) + 1 e1 = sum(active(:f1)) select case(f1) @@ -161,29 +168,48 @@ program corresponcence_matrix 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) + !> Write results for characteristic shear + write(6,*)'characteristic shear, for [1, 0, -1, 1],(-1, 0, 1, 2)' + write(6,*)characteristicShear(4) + write(6,*)'characteristic shear, for [-1, -1, 2, 6],(1, 1, -2, 1)' + write(6,*)characteristicShear(7) + write(6,*)'characteristic shear, for [1, 0, -1, -2],(1, 0, -1, 1)' + write(6,*)characteristicShear(13) + write(6,*)'characteristic shear, for [1, 1, -2, -3],(1, 1, -2, 2)' + write(6,*)characteristicShear(19) + + !-------------------------------------------------------------------- + !> SchmidMatrix = Outer product of direction and normal vectors. + !-------------------------------------------------------------------- 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 + !-------------------------------------------------------------------- + !> Correspondence Matrix = Reorientation * Shear + !-------------------------------------------------------------------- + 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 results for Correspondence Matrix - 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) + write(6,*)'correspondence matrix for [1, 0, -1, 1],(-1, 0, 1, 2)' + write(6,*)corresponcenceMatrix(1:3,1:3,4) + write(6,*)'oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox' + write(6,*)'correspondence matrix for [-1, -1, 2, 6],(1, 1, -2, 1)' + write(6,*)corresponcenceMatrix(1:3,1:3,7) + write(6,*)'oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox' + write(6,*)'correspondence matrix for [1, 0, -1, -2],(1, 0, -1, 1)' + write(6,*)corresponcenceMatrix(1:3,1:3,13) + write(6,*)'oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox' + write(6,*)'correspondence matrix for [1, 1, -2, -3],(1, 1, -2, 2)' + write(6,*)corresponcenceMatrix(1:3,1:3,19) end program corresponcence_matrix