lu_solve - fabiankindermann/ce-fortran GitHub Wiki
subroutine lu_solve(a, b)
Solves a linear equation system of the form , with a matrix
and vectors
and
. Note that in order for the subroutine to work, the matrix
needs to have full rank.
-
real*8 :: a(:, :)
A two-dimensional array defining the matrix ofthe linear equation system. -
real*8 :: b(:)
An array defining the right-hand-side vector of the equation system. Note thatbneeds to have the same length as the matrixa
-
real*8 :: b(:)
Having successfully solved the linear equation system, the resulting vectorwill again be stored in the array
b, such that no additional output argument is needed. The arraybis hence of the typeinout.
- 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_02.f90prog03_06m.f90prog03_07m.f90