DDTTRF(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– DDTTRF β€” bestie, we're doing an LU factorization πŸ’–

okay so this is DDTTRF from the LAPACK crew (a modified LAPACK routine, if we're being precise, version 2.0, dated 12 May 1997 β€” vintage, iconic, no notes). She lives in section l of the manual, and she computes an LU factorization of a complex tridiagonal matrix A using elimination without partial pivoting. Yes, you read that right. No pivoting. We're raw-dogging this factorization. Buckle up πŸŽ€


✨ SYNOPSIS ✨

SUBROUTINE DDTTRF( N, DL, D, DU, INFO )

    INTEGER        INFO, N

    DOUBLE         PRECISION D( * ), DL( * ), DU( * )

🌸 PURPOSE 🌸

DDTTRF computes an LU factorization of a complex tridiagonal matrix A using elimination without partial pivoting. (Say it with me: no. partial. pivoting. πŸ’…)

The factorization has the form

A = L * U

where L is a product of unit lower bidiagonal matrices, and U is upper triangular with nonzeros in only the main diagonal and first superdiagonal. So like… L is doing the bare minimum structurally, and U is keeping it tight. main character energy from both of them honestly πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • N (input) INTEGER β€” the order of the matrix A. Constraint check bestie: N >= 0. That's it. That's the rule.
  • DL (input/output) COMPLEX array, dimension (N-1) β€” on entry, DL must contain the (n-1) subdiagonal elements of A. On exit, DL gets overwritten by the (n-1) multipliers that define the matrix L from the LU factorization of A. So she comes in as your data and leaves as somebody else's data. glow up πŸ’«
  • D (input/output) COMPLEX array, dimension (N) β€” on entry, D must contain the diagonal elements of A. On exit, D is overwritten by the n diagonal elements of the upper triangular matrix U from the LU factorization of A. Same deal, same glow up.
  • DU (input/output) COMPLEX array, dimension (N-1) β€” on entry, DU must contain the (n-1) superdiagonal elements of A. On exit, DU is overwritten by the (n-1) elements of the first superdiagonal of U. bye original values, hope you had a nice time ✌️
  • INFO (output) INTEGER β€” the vibe check on how it all went down:
    • = 0: successful exit. slay. everything ate πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value. not me getting called out on argument number i 😭
    • > 0: if INFO = i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations. 🚨
⚠️ bestie, listen to me for one second: that > 0 case is not a cute little warning, it's a real one. U is exactly singular. If you take this factorization and try to solve a system with it, you are going to divide by zero. That is a πŸ’€ moment, not a 🌸 moment. Check INFO before you use anything, fr fr.
πŸ™ˆ also lowkey worth saying out loud: there's no partial pivoting here. That's the whole design of this routine, it's not a bug, but it does mean the factorization is what it is β€” and if U(i,i) hits exactly zero, you get told about it via INFO, and that's your lot. No rescue pivot incoming.

πŸ’œ and that's the whole page, bestie! this was DDTTRF(l), a modified LAPACK routine, LAPACK routine version 2.0, dated 12 May 1997. go forth and factorize responsibly 🫢✨

πŸ“¦ where this page comes from