[MAP Logo]

Materials Algorithms Project
Program Library



Module MAP_Steel_Acquire F90

  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.

Conversion to Fortran 90 by S. Cardie
Address as above.

Top | Next

Purpose

Provides a user-interface for program MAP_STEEL_MUCG46_90.

Top | Next | Prev

Specification

Language:FORTRAN 90
Product form:Source code.


MODULE MAP_Steel_Acquire_Data

INTERFACE reed
  MODULE PROCEDURE MAP_UTIL_REED,MAP_UTIL_REEDI
END INTERFACE 

CONTAINS

SUBROUTINE LOGO()

SUBROUTINE BOUND(A,B,C)
  USE MAP_Util_Global_Data
  IMPLICIT NONE
    REAL(KIND=real_8_30), INTENT(INOUT) :: A
    REAL(KIND=real_8_30), INTENT(IN)    :: B,C
END SUBROUTINE BOUND

SUBROUTINE MAP_UTIL_REED(A)
  USE MAP_Util_Global_Data
  IMPLICIT NONE
    REAL(KIND=real_8_30),INTENT(OUT) :: A
END SUBROUTINE MAP_UTIL_REED

SUBROUTINE MAP_UTIL_REEDI(I)
  IMPLICIT NONE
    INTEGER,INTENT(OUT) :: I
END SUBROUTINE

SUBROUTINE REED_IN_FILE(C,ITYPE)
  USE MAP_Util_Global_Data
  IMPLICIT NONE
    REAL(KIND=real_8_30), INTENT(INOUT) :: C
    INTEGER, INTENT(IN)  :: ITYPE
END SUBROUTINE REED_IN_FILE

SUBROUTINE REED_IN_KEYS(C,ITYPE)
  USE MAP_Util_Global_Data
  IMPLICIT NONE
  REAL(KIND=real_8_30), INTENT(INOUT) :: C
  INTEGER, INTENT(IN)  :: ITYPE
END SUBROUTINE REED_IN_KEYS

SUBROUTINE CHECK_ITYPE(ITYPE,UPPER,LOWER)
  USE MAP_Util_Global_Data
  IMPLICIT NONE
    INTEGER,INTENT(IN)   :: ITYPE
    REAL(KIND=real_8_30),INTENT(OUT) :: UPPER,LOWER
END SUBROUTINE CHECK_ITYPE

SUBROUTINE INPUT_TYPE(C)
  USE MAP_Util_Global_Data
  IMPLICIT NONE
    REAL(KIND=real_8_30),DIMENSION(8),INTENT(OUT) :: C
END SUBROUTINE INPUT_TYPE

END MODULE MAP_Steel_Acquire_Data

Top | Next | Prev

Description

This module contains six public and two private procedures which allow the user to interact with the program MAP_STEEL_MUCG46_90. This module acquires data from the user (either via a data file or STDIN) and checks it for validity.

The PUBLIC procedures are:

LOGO
Prints introductory information to STDOUT.
MAP_UTIL_REED
Reads in data of type REAL from STDIN and attempts to trap simple errors.
MAP_UTIL_REEDI
As above for data of type INTEGER.
READ_IN_FILE
Reads data in from data file. This procedure reads data from UNIT 14, which should be opened in the main program unit.
READ_IN_KEYS
As above, but for STDIN
CHECK_ITYPE
Checks data against upper and lower bounds and provides dialogue to prompt user.
INPUT_TYPE
Allows user to select either data file or STDIN input.

The PRIVATE procedures are:

BOUND
Checks acquired data against predetermined upper and lower bounds.
CHECK_ITYPE
Checks data against upper and lower bounds and provides dialogue to prompt user.

Additionaly, an interface block defines the generic procedure reed, which contains MAP_UTIL_REED and MAP_UTIL_REEDI.

Top | Next | Prev

References

None supplied.

Top | Next | Prev

Parameters

Input parameters

  1. LOGO neither receives nor returns any arguments. Its only function is to write to STDOUT

  2. MAP_UTIL_REED has no input arguments.

  3. MAP_UTIL_REEDI has no input arguments.

  4. READ_IN_FILE:

    C - real array of dimension 8
    Contains alloy element concentrations supplied by user.
    ITYPE - integer
    Data are checked against pre-specified upper and lower bounds; ITYPE matches each element of array C with the appropriate bounds.
  5. READ_IN_KEYS:

    This procedure performs the same task for STDIN as READ_IN_FILE does for data from a data file.

    C - real array of dimension 8
    Contains alloy element concentrations supplied by user.
    ITYPE - integer
    Data are checked against pre-specified upper and lower bounds; ITYPE matches each element of array C with the appropriate bounds.
  6. INPUT_TYPE has no input arguments.

  7. BOUND:

    A - reals
    The value to be checked against the bounds.
    B,C - reals
    Upper and lower bounds.
  8. CHECK_ITYPE:

    ITYPE - integer
    Indicates the identity of the element C which is to be checked against the upper and lower bounds.

Output parameters

  1. LOGO neither receives nor returns any arguments. Its only function is to write to STDOUT

  2. MAP_UTIL_REED:

    A - real
    Data of type REAL, to be checked.
  3. MAP_UTIL_REEDI:

    I - integer
    Data of type INTEGER, to be checked.
  4. READ_IN_FILE:

    C - real array of dimension 8
    Contains alloy element concentrations supplied by user.
  5. READ_IN_KEYS:

    This procedure performs the same task for STDIN as READ_IN_FILE does for data from a data file.

    C - real array of dimension 8
    Contains alloy element concentrations supplied by user.
  6. BOUND:

    A - real
    The value checked against the bounds.
  7. CHECK_ITYPE:

    UPPER,LOWER - reals
    The upper and lower bounds against which user-supplied data are checked.

Top | Next | Prev

Error Indicators

A certain amount of validity-checking is performed by reed and by BOUND. In the event of failure, the user is invited to re-submit the offending datum.

Top | Next | Prev

Accuracy

Not applicable

Top | Next | Prev

Further Comments

MAP_UTIL_REED and MAP_UTIL_REEDI are also available as Fortran 77 procedures.

Top | Next | Prev

Example

1. Program text

Not applicable.

2. Program data

Data read from a file should be in the following format:

0.39
2.05
0.00
4.08
0.00
0.00
0.00

3. Program results

Not applicable.

Top | Next | Prev

Auxiliary Routines

Module: MAP_Util_Global_Data.

Top | Next | Prev

Keywords

user interface, data entry, error trapping

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!