[MAP Logo]

Materials Algorithms Project
Program Library



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.

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

A function to calculate the scalar product of two vectors.

Top | Next | Prev

Specification

Language:FORTRAN
Product form:Source code

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

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

Top | Next | Prev

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

Top | Next | Prev

References

None provided.

Top | Next | Prev

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

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 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

Top | Next | Prev

Auxiliary Routines

None.

Top | Next | Prev

Keywords

scalar 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!