[MAP Logo]

Materials Algorithms Project
Program Library



Subroutine MAP_CRYSTAL_TENSOR6

  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 metric tensor and its inverse for a triclinic crystal.

Top | Next | Prev

Specification

Language:FORTRAN
Product form:Source code

SUBROUTINE MAP_CRYSTAL_TENSOR6(F, G, AP, BP, CP, ALPH, BETA, GAMM, PI, IFAIL)

REAL F(9), G(9), AP, BP, CP, ALPH, BETA, GAMM, PI

INTEGER IFAIL

Top | Next | Prev

Description

MAP_CRYSTAL_TENSOR6 calculates the metric tensor and its inverse for a triclinic crystal structure.

Top | Next | Prev

References

  1. Microstructural Characterisation of High Temperature Materials, ed. E. Metcalfe, Institute of Metals, London, 1988, (page 33, Table 3).

Top | Next | Prev

Parameters

Input parameters

AP, BP, CP - reals
AP, BP and CP are the lattice parameters for the triclinic crystal.

ALPH, BETA, GAMM - reals
ALPH, BETA, GAMM are the angles alpha, beta and gamma. These angles must lie within the range 0 to 180 degrees.

Output parameters

F - real array of dimension 9
F contains the inverse of the metric tensor.

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

IFAIL - integer
IFAIL is set to 1, if any of the angles ALPH, BETA, GAMM fall outside the permitted range of 0 to 180 degrees.

Top | Next | Prev

Error Indicators

IFAIL is set to 1 if any of the angles alpha, beta or gamma fall outside the permitted range of 0 to 180 degrees, 0 otherwise.

Top | Next | Prev

Accuracy

No information supplied.

Top | Next | Prev

Further Comments

None.

Top | Next | Prev

Example

1. Program text

       REAL F(9), G(9), AP, BP, CP, ALPH, BETA, GAMM, PI
       INTEGER I, IFAIL
       INCLUDE 'map_constants_pi.f'
       READ (5,*) AP, BP, CP, ALPH, BETA, GAMM
       CALL MAP_CRYSTAL_TENSOR6(F, G, AP, BP, CP, ALPH, BETA, GAMM, PI, IFAIL)
       WRITE (6,*) (G(I), I=1,9)
       WRITE (6,*) (F(I), I=1,9)
       IF (IFAIL.EQ.0) GOTO 20
       WRITE(6,40) 
40     FORMAT('Invalid value for angle. Must be in range 0 - 180')
20     CONTINUE
       STOP
       END

2. Program data

1.0   1.5   2.0   30.0   45.0   60.0

3. Program results

1.00    1.29904   1.84776   1.29904   2.25   2.89778   1.84776    2.89778   4.00

7.34958   1.92908  -4.79257   1.92908   7.14113  -6.06447  -4.79257  -6.06447   6.85725

Top | Next | Prev

Auxiliary Routines

Subroutines:
MAP_CRYSTAL_MET6

Utility Subroutines:
MAP_UTIL_CRYSTAL

Top | Next | Prev

Keywords

triclinic, metric tensor, inverse

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!