[MAP Logo]

Materials Algorithms Project
Program Library



Subroutine MAP_UTIL_TRAPE

  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

Proprietary code, not available in MAP library.

Can, for example, be substituted by subroutine D01GAF of the "NAG" library.

Top | Next

Purpose

Numerical integration. Integrates a function which is specified numerically using a trapezoidal rule.

Top | Next | Prev

Specification

Language:FORTRAN
Product form:Source code

SUBROUTINE MAP_UTIL_TRAPE(X,Y,Z,NDIM)

DOUBLE PRECISION X(NDIM),Y(NDIM),Z(NDIM)

INTEGER NDIM

Top | Next | Prev

Description

Uses the trapezoidal rule to numerically integrate a function Y specified at NDIM points X(1), X(2),....X(NDIM).

The result is stored in the array Z.

Top | Next | Prev

References

  1. F. B. Hildebrand, Introduction to Numerical Analysis, McGraw-Hill, New York/Toronto/London, 1956, p.75

Top | Next | Prev

Parameters

Input parameters

X - real array of dimension NDIM
On entry, X must contain the values of the independent variable.

Y - real array of dimension NDIM
On entry, Y must contain the values of the dependent variable.

NDIM - integer
NDIM specifies the number of points.

Output parameters

Z - real array of dimenstion NDIM
On exit, Z contains the estimate of the integral.

Top | Next | Prev

Error Indicators

None.

Top | Next | Prev

Accuracy

Not output.

Top | Next | Prev

Further Comments

Can be substituted by NAG subroutine D01GAF.

Top | Next | Prev

Example

Example code not provided.

1. Program text

See MAP steel subroutines MAP_STEEL_RATE2 and MAP_STEEL_AVOLF.

Top | Next | Prev

Auxiliary Routines

None.

Top | Next | Prev

Keywords

numerical integration

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!