[MAP Logo]

Materials Algorithms Project
Program Library



Subroutine MAP_CRYSTAL_VECMAG

  1. Provenance of code.
  2. Purpose of code.
  3. Specification.
  4. Description of subroutine's operation.
  5. References.
  6. Parameter descriptions.
  7. Error indicators.
  8. Accuracy estimate.
  9. Any additional information.
  10. Example of code
  11. Auxiliary subroutines required.
  12. Keywords.
  13. Download source code.
  14. Links.

Provenance of Source Code

H.K.D.H. Bhadeshia,
Phase Transformations Group,
Department of Materials Science and Metallurgy,
University of Cambridge,
Cambridge, U.K.

Top | Next

Purpose

Calculates the magnitude of a vector defined in real space.

Top | Next | Prev

Specification

Language:FORTRAN
Product form:Source code

SUBROUTINE MAP_CRYSTAL_VECMAG(G, U, V, W, M)

REAL G(9), U, V, W, M

Top | Next | Prev

Description

MAP_CRYSTAL_VECMAG uses the metric tensor G to transform the real space vector [U,V,W] into the reciprocal space vector [H,K,L]. The vector magnitude is sqrt[(U*H + U*K + W*L)].

Top | Next | Prev

References

  1. H.K.D.H. Bhadeshia, Worked Examples in the Geometry of Crystal, Institute of Materials, London, (1987), 5-6.

Top | Next | Prev

Parameters

Input parameters

G - real array of dimension 9
G is the metric tensor.

U, V, W - reals
[U,V,W] is the vector in real space coordinates.

Output parameters

M - real
M is the magnitude of the vector.

Top | Next | Prev

Error Indicators

None.

Top | Next | Prev

Accuracy

No information supplied.

Top | Next | Prev

Further Comments

None.

Top | Next | Prev

Example

1. Program text

       REAL G(9), U, V, W, M
       READ (5,*) (G(I), I=1,9)
       READ (5,*) U, V, W
       CALL MAP_CRYSTAL_VECMAG(G, U, V, W, M)
       WRITE (6,10) M
10     FORMAT (3X,'Magnitude is ',F8.4)
       STOP
       END

2. Program data

1.00   0.00   0.00   0.00   1.00   0.00   0.00   0.00   4.00
1.00   0.00   1.00

3. Program results

Magnitude is    2.2361

Top | Next | Prev

Auxiliary Routines

Utility Subroutines:
MAP_UTIL_TRANS

Top | Next | Prev

Keywords

metric tensor, vector magnitude, real space

Top | Next | Prev

Download

Download source code

Top | Prev


MAP originated from a joint project of the National Physical Laboratory and the University of Cambridge.

MAP Website administration / map@msm.cam.ac.uk

Top | Index | MAP Homepage Valid HTML 3.2!