lu_invert - fabiankindermann/ce-fortran GitHub Wiki
function lu_invert(a)
Determines the inverse of a matrix
, such that
. Note that
needs to be a square matrix of full rank for this subroutine to work.
-
real*8 :: a(:, :)
A two-dimensional array representing the matrix that should be inverted.
-
real*8 :: a(:, :)
Having successfully inverted the input matrix, the resulting matrixwill again be stored in the array
a
, such that no additional output argument is needed. The arraya
is hence of the typeinout
./li>
- Parts of this routine were copied and adapted from:
- Press, W.H., Teukolsky, S.A., Vetterling, W.T. & Flannery, B.P. (1992). Numerical Recipes in Fortran 90: The Art of Parallel Scientific Computing, 2nd edition. Cambridge: Cambridge Univeristy Press.
- For further reading refer to:
- Golub, G.H. & Van Loan, C.F. (2013). Matrix Computations, 4th ed. Baltimore: Johns Hopkins University Press.
- This routine is used in the following programs:
prog02_03.f90
prog04_01.f90