Clufac For
Clufac For
com
Numerical Methods Library in FORTRAN
Module
SUBROUTINE CLUFAC
Title
Carries out an LU factorisation of a complex matrix.
Description
This is the FORTRAN source files for carrying out a LU factorisation of a
complex square matrix , so that
where is a lower-triangular matrix (with diagonal elements set to 1)
and is an upper-triangular matrix and is a permutation matrix.
Interface
SUBROUTINE LUFAC(MAXN, N, A, PERM, LFAIL)
integer MAXN: the limit on the dimension of the matrix/vector
integer N: the dimension of the matrix/vector
complex A: on input the nxn matrix A, on output L and U
integer PERM: an N-vector, the column index of the permutation matrix
P
logical LFAIL: returns 'true' if the method fails, otherwise 'false'
Note the output matrix A is such that the diagonal and upper-triangular
elements is the U matrix and the lower-triangular elements together
with 1s on the diagonal is the matrix U.
On exit PERM records the row exchanges that have occurred as a
result of pivoting, otherwise known as a permutation matrix P. It would
be wasteful of computer memory to store the permutation matrix as an
NxN array. P is taken to be made up of all zeros, except for P[j,i]=1
when PERM(i)=j.
Web source of
code.
http://www.numerical-methods.com/fortran/CLUFAC.FOR
Web source of
this guide
www.numerical-methods.com/fortan/CLUFAC_FOR.htm
Web source of
the algorithm
http://www.numerical-methods.com/lineq/LU Factorisation.htm
Dependent
routines
NONE
www.numerical-methods.com
Test problems
http://www.numerical-methods.com/fortran/CLUTESTS_FOR.htm
Licence
This is open source; the software may be used and applied within other
systems as long as its provenance is appropriately acknowledged.
See the GNU Licence for more information or contact
[email protected]
Similar codes
that may be of
interest
LUFAC, www.numerical-methods.com/fortran/LUFAC_FOR.htm , for
real-valued systems
LUfac.bas, www.numerical-metods.com/Excel_VBA/LU.xlsm
For the method in visual basic / VBA (Excel)
Bibilography
Linear Systems and 2x2 Matrices
www.numerical-methods.com/lineq/LU Factorisation.htm
Tutorials on Fortran77
Numerical Methods