0% found this document useful (0 votes)
72 views2 pages

Clufac For

This document describes a FORTRAN subroutine that performs an LU factorization of a complex matrix. The subroutine takes a complex matrix A as input and outputs the lower triangular matrix L, upper triangular matrix U, and permutation matrix P such that A = P*L*U. It has no dependent routines, is open source under the GNU license, and the source code and documentation can be found on the listed websites.

Uploaded by

rodwellhead
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views2 pages

Clufac For

This document describes a FORTRAN subroutine that performs an LU factorization of a complex matrix. The subroutine takes a complex matrix A as input and outputs the lower triangular matrix L, upper triangular matrix U, and permutation matrix P such that A = P*L*U. It has no dependent routines, is open source under the GNU license, and the source code and documentation can be found on the listed websites.

Uploaded by

rodwellhead
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

www.numerical-methods.

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

You might also like