H.K.D.H. Bhadeshia,
Phase Transformations Group,
Department of Materials Science and Metallurgy,
University of Cambridge,
Cambridge, U.K.
To find the angle between two vectors.
Language: | FORTRAN |
Product form: | Source code |
SUBROUTINE MAP_CRYSTAL_ANGLEE(F, G, H, K, L, JR1, HH, KK, LL, JR2, ANG, ADEG, PI)
REAL F(9), G(9), H, K, L, HH, KK, LL, ANG, ADEG, PI
INTEGER JR1, JR2
The vectors may be defined by components in real or reciprocal space. The metric tensor F converts components from reciprocal to real space. The metric tensor G converts components from real to reciprocal space.
In order to calculate the angle, it is necessary for one vector to be defined in real space, and the other in reciprocal space. The magnitude of each vector is calculated, and the scalar product of the two vectors is used to compute the angle.
None.
Works for any crystal system.
None.
REAL F(9), G(9), H, K, L, HH, KK, LL, ANG, ADEG, AP, CP, PI INTEGER JR1, JR2 INCLUDE 'map_constants_pi.f' READ (5,*) AP, CP CALL MAP_CRYSTAL_TENSOR2(F, G, AP, CP) READ (5,*) H, K, L, JR1 READ (5,*) HH, KK, LL, JR2 CALL MAP_CRYSTAL_ANGLEE(F, G, H, K, L, JR1, HH, KK, LL, JR2, ANG, ADEG, PI) WRITE (6,*) ANG, ADEG STOP END
1.0 1.0 0.0 1.0 1.0 0 1.0 0.0 1.0 1
0.500000 120.000
angle
MAP originated from a joint project of the National Physical Laboratory and the University of Cambridge.
MAP Website administration / map@msm.cam.ac.uk