[MAP Logo]

Materials Algorithms Project
Program Library



Subroutine MAP_UTIL_CROSS

  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

Takes a vector cross product and converts all vectors to real space.

Top | Next | Prev

Specification

Language:FORTRAN
Product form:Source code

SUBROUTINE MAP_UTIL_CROSS(H1,K1,L1,JR1,H2,K2,L2,JR2,H3,K3,L3,JR3,F,G)

REAL H1,K1,L1,H2,K2,L2,H3,K3,L3

INTEGER JR1,JR2,JR3

Top | Next | Prev

Description

MAP_UTIL_CROSS takes the vector cross product of the three-dimensional vectors [H1,K1,L1] and [H2,K2,L2], to generate the vector [H3,K3,L3]. If the original vectors are in reciprocal space they are converted to real space.

Top | Next | Prev

References

  1. H.K.D.H. Bhadeshia, Worked Examples in the Geometry of Crystals, Institute of Materials, London, 1987.

Top | Next | Prev

Parameters

Input parameters

H1,K1,L1 - reals
H1,K1,L1 are the components of the first vector used in the cross product. They may be either in real or reciprocal space.

JR1 - integer
JR1 is 0 if [H1,K1,L1] is in real space, 1 if [H1,K1,L1] is in reciprocal space. JR1 is set to 0 on exit from the routine, as all vectors are then in real space co-ordinates.

H2,K2,L2 - reals
H2,K2,L2 ate the components of the second vector used in the cross product. They may be either in real or reciprocal space.

JR2 - integer
JR2 is 0 if [H2,K2,L2] is in real space, 1 if [H2,K2,L2] is in reciprocal space. JR2 is set to 0 on exit from the routine, as all vectors are then in real space co-ordinates.

F - real array of dimension 9
F is the metric tensor converting components from reciprocal to real space.

G - real array of dimension 9
G is the metric tensor converting components from real to reciprocal space.

Output parameters

H3,K3,L3 - real
H3,K3,L3 are the components of the vector resulting from the cross product. They are in real space co-ordinates.

JR3 - integer
JR3 is set to zero, to indicate that [H3,K3,L3] is in real space co-ordinates.

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 H1,K1,L1,H2,K2,L2,H3,K3,L3,F(9),G(9),AP
       INTEGER JR1,JR2,JR3
       READ (5,*) H1,K1,L1,JR1 
       READ (5,*) H2,K2,L2,JR2
       READ (5,*) AP
       CALL MAP_CRYSTAL_TENSOR1(F,G,AP)
       CALL MAP_UTIL_CROSS(H1,K1,L1,JR1,H2,K2,L2,JR2,H3,K3,L3,JR3,F,G)
       WRITE (6,*) H3,K3,L3
       STOP
       END

2. Program data

None supplied.

3. Program results

None supplied.

Top | Next | Prev

Auxiliary Routines

MAP_UTIL_DET
MAP_UTIL_TRANS

Top | Next | Prev

Keywords

vector cross product

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!