Materials Algorithms Project
Program Library
- Provenance of code.
- Purpose of code.
- Specification.
- Description of subroutine's operation.
- References.
- Parameter descriptions.
- Error indicators.
- Accuracy estimate.
- Any additional information.
- Example of code
- Auxiliary subroutines required.
- Keywords.
- Download source code.
- Links.
Proprietary code, not available in MAP library.
Can, for example, be substituted by subroutine D01GAF of the "NAG" library.
Top |
Next
Numerical integration. Integrates a function which is specified numerically using a trapezoidal rule.
Top |
Next |
Prev
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
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
- F. B. Hildebrand, Introduction to Numerical Analysis, McGraw-Hill,
New York/Toronto/London, 1956, p.75
Top |
Next |
Prev
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
None.
Top |
Next |
Prev
Not output.
Top |
Next |
Prev
Can be substituted by NAG subroutine D01GAF.
Top |
Next |
Prev
Example code not provided.
1. Program text
See MAP steel subroutines MAP_STEEL_RATE2
and MAP_STEEL_AVOLF.
Top |
Next |
Prev
None.
Top |
Next |
Prev
numerical integration
Top |
Next |
Prev
Download source code
Top |
Prev