[MAP Logo] Materials Algorithms Project
           FORTRAN Library

[Dept logo bar]

Function MAP_UTIL_MAG

  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.

[Dept logo bar]

Provenance of Source Code

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

Return to top of Document

Purpose

A function to calculate the scalar product of two vectors.

Return to top of Document

Specification

REAL FUNCTION MAP_UTIL_MAG(H, K, L, H1, K1, L1)

REAL H, K, L, H1, K1, L1

Return to top of Document

Description

MAP_UTIL_MAG calculates the scalar product of two three-dimensional vectors
[H,K,L] and [H1,K1,L1], i.e.:-

MAP_UTIL_MAG(H, K, L, H1, K1, L1) = [H,K,L].[H1,K1,L1] = H*H1 + K*K1 + L*L1

Return to top of Document

References

None provided.

Return to top of Document

Parameters

Input parameters

H,K,L - reals
     H,K,L are the components of the vector [H,K,L].

H1,K1,L1 - reals
     H1,K1,L1 are the components of the vector [H1,K1,L1].

Output parameters

MAP_UTIL_MAG - real
     MAP_UTIL_MAG = (H, K, L, H1, K1, L1) = H*H1 + K*K1 + L*L1

Return to top of Document

Error Indicators

None.

Return to top of Document

Accuracy

No information supplied.

Return to top of Document

Further Comments

None.

Return to top of Document

Example

1. Program text

       REAL H, K, L, H1, K1, L1, A, MAP_UTIL_MAG
       READ (5,*) H, K, L, H1, K1, L1
       A = MAP_UTIL_MAG(H, K, L, H1, K1, L1)
       WRITE (6,*) A
       STOP
       END

2. Program data

1.0   1.5   3.0   -1.0   2.0   1.0

3. Program results

5.0

Return to top of Document

Auxiliary Routines

None.

Keywords

scalar product

Download source code

[Dept logo bar]

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

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

Return to top of Document
Functions Index
MAP Homepage

[W3C Wilbur Checked!]
