Civil Engineering Reference
In-Depth Information
the calling programs by means of a simple
USE
statement at the beginning of the program
(see Chapter 1, Section 1.9.9).
A summary of these subroutines and functions is given in Appendices D, E, and F
where their actions and input/output parameters are described. Appendix D describes func-
tions and subroutines that appear in the
main
library, and describes “black box” routines
(concerned with some matrix operations), whose mode of action the reader need not nec-
essarily know in detail, and special purpose routines which are the basis of specific finite
element computations. Some of these routines should be thought of as an addition to
the intrinsic Fortran 95 library functions such as
MATMUL
or
DOT_PRODUCT
, and could
well be substituted with equivalents from a mathematical subroutine library, for example
Basic Linear Algebra Subroutine (BLAS), perhaps tuned to a specific machine. Appendix
E describes subroutines that appear in the
geom
library which holds customised routines,
usually for generating element nodal coordinates and numbering for some of the simple
geometries used with the specific examples described in this topic. Appendix F describes the
additional subroutines and functions needed by the Chapter 12 programs for their parallel
algorithms.
3.7.1 Black box routines
Readers are reminded of the much improved array handling facilities of Fortran 95, com-
pared with earlier FORTRANs. Chapter 1, Section 1.9 summarised such features as whole
array operations and intrinsic array procedures, which mean that most simple array manip-
ulations can be done using the power of the language itself and do not need to be
user-supplied.
In the programs which follow from Chapter 4 onwards, only three simple functions
or subroutines have been added to those provided as standard in the language. These are,
determinant
,
invert
,and
cross_product
determinant
returns the determinant of a 1
3 matrix (usually
the Jacobian matrix [
J
]),
invert
computes the inverse of a (small) square matrix, again
usually the Jacobian matrix (3.4) and
cross_product
computes the matrix result given
by the cross-product of two vectors.
A second batch of subroutines shown in Table 3.4 is concerned with the solution of lin-
ear algebraic equations. The subroutines have been split into factorisation and forward/back-
substitution phases.
Several subroutines are associated with eigenvalue and eigenvector determination; for
example for symmetric banded matrices,
bandred
tridiagonalises the matrix and
bisect
×
1, 2
×
2, or 3
×
Table 3.4 Subroutines for solution of linear algebraic equations
Method
Gauss
Cholesky
Gauss
Gauss
Storage
Symmetric
Symmetric
Symmetric
Unsymmetric
half-band
skyline
skyline
full band
Factorisation
banred
sparin
sparin gauss gauss band
Substitution
bacsub
spabac
spabac gauss solve band