lu_solve - fabiankindermann/ce-fortran GitHub Wiki

subroutine lu_solve(a, b)

Description:

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.

Input arguments:

  • 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 that b needs to have the same length as the matrix a

Output arguments:

  • real*8 :: b(:)
    Having successfully solved the linear equation system, the resulting vector will again be stored in the array b, such that no additional output argument is needed. The array b is hence of the type inout.

References

  • 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.f90
    • prog03_06m.f90
    • prog03_07m.f90
⚠️ **GitHub.com Fallback** ⚠️