ZPTTRSV(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– ZPTTRSV β€” bestie, we're solving triangular systems πŸ’–

okay so this is ZPTTRSV from LAPACK (version 2.0), and it is genuinely one of the most useful little gremlins in the whole library. it's the kind of routine that just quietly does its job and never asks for credit. main character energy but make it humble. πŸŽ€


✨ NAME ✨

ZPTTRSV β€” solve one of the triangular systems L * X = B, or L**H * X = B, πŸ’…


🌸 SYNOPSIS 🌸

SUBROUTINE ZPTTRSV( UPLO, TRANS, N, NRHS, D, E, B, LDB, INFO )

    CHARACTER       UPLO, TRANS

    INTEGER         INFO, LDB, N, NRHS

    DOUBLE          PRECISION D( * )

    COMPLEX*16      B( LDB, * ), E( * )

πŸ¦‹ PURPOSE πŸ¦‹

so basically ZPTTRSV solves one of these triangular systems:

L * X = B, or  L**H * X = B,
U * X = B, or  U**H * X = B,

where L or U is the Cholesky factor of a Hermitian positive definite tridiagonal matrix A such that

A = U**H*D*U or A = L*D*L**H (computed by ZPTTRF).

so yeah, ZPTTRF did the factorizing earlier and now we're doing the solving part. teamwork, fr fr. 🫢


πŸ’œ ARGUMENTS πŸ’œ

  • UPLO (input) CHARACTER*1 β€” tells us whether it's the superdiagonal or the subdiagonal of the tridiagonal matrix A that's stored, plus which form of the factorization we're in:
    • = 'U': E is the superdiagonal of U, and A = U'*D*U;
    • = 'L': E is the subdiagonal of L, and A = L*D*L'. (the two forms are equivalent if A is real, so no drama either way πŸ’…)
  • TRANS (input) CHARACTER β€” specifies the form of the system of equations:
    • = 'N': L * X = B (No transpose)
    • = 'N': L * X = B (No transpose)
    • = 'C': U**H * X = B (Conjugate transpose)
    • = 'C': L**H * X = B (Conjugate transpose)
okay yes, the 'N' line and the 'C' line each show up twice in the original and i am NOT editing the lore. that's just how it is. iconic of it honestly. 😭
  • N (input) INTEGER β€” the order of the tridiagonal matrix A. N >= 0. (no negative girlies allowed 🚫)
  • NRHS (input) INTEGER β€” the number of right hand sides, aka the number of columns of the matrix B. NRHS >= 0.
  • D (input) REAL array, dimension (N) β€” the n diagonal elements of the diagonal matrix D from the factorization computed by ZPTTRF. ⭐
  • E (input) COMPLEX array, dimension (N-1) β€” the (n-1) off-diagonal elements of the unit bidiagonal factor U or L from the factorization computed by ZPTTRF (peep UPLO to know which one πŸ‘€).
  • B (input/output) COMPLEX array, dimension (LDB,NRHS) β€” on entry, the right hand side matrix B. on exit, the solution matrix X. glow up moment ✨
  • LDB (input) INTEGER β€” the leading dimension of the array B. LDB >= max(1,N).
  • INFO (output) INTEGER β€” the vibe check:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value 😬

ngl, if INFO comes back negative, one of your arguments was being messy. go check the i-th one. no cap. πŸ™ˆ

and that's the whole page, bestie!! this was a modified LAPACK routine, dated 12 May 1997 β€” vintage but still eating, fr fr. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from