PSPTTRSV(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’… PSPTTRSV β€” bestie, it's giving "solve the tridiagonal situation"

ok so real talk: this is a LAPACK routine, version 1.5, and it lives in section l of the manual. It's old-school Fortran (like, 12 May 1997 old β€” vintage, iconic, ahead of its time) but it does exactly one thing and it does it well. Sit with me, I gotchu. 🫢


✨ NAME ✨

PSPTTRSV β€” solve a tridiagonal triangular system of linear equations

A(1:N, JA:JA+N-1) * X = B(IB:IB+N-1, 1:NRHS)

that's it. that's the whole job. no cap. πŸ’–


🌸 SYNOPSIS 🌸

ok so here's the whole cast of characters, no cuts, everyone gets a line:

SUBROUTINE PSPTTRSV( UPLO, N, NRHS, D, E, JA, DESCA, B, IB, DESCB, AF,
                     LAF, WORK, LWORK, INFO )

    CHARACTER        UPLO

    INTEGER          IB, INFO, JA, LAF, LWORK, N, NRHS

    INTEGER          DESCA( * ), DESCB( * )

    REAL             AF( * ), B( * ), D( * ), E( * ), WORK( * )

look at them. so many parameters. so much main character energy. πŸ’œ


πŸ¦‹ PURPOSE πŸ¦‹

PSPTTRSV solves a tridiagonal triangular system of linear equations

                         A(1:N, JA:JA+N-1) * X = B(IB:IB+N-1, 1:NRHS)

or

                    A(1:N, JA:JA+N-1)^T * X = B(IB:IB+N-1, 1:NRHS)

where A(1:N, JA:JA+N-1) is a tridiagonal triangular matrix factor produced by the Cholesky factorization code PSPTTRF, and it's stored in A(1:N,JA:JA+N-1) and AF. πŸ’Ύβœ¨

The matrix stored in A(1:N, JA:JA+N-1) is either upper or lower triangular according to UPLO, and the choice of solving A(1:N, JA:JA+N-1) or A(1:N, JA:JA+N-1)^T is dictated by the user by the parameter TRANS. πŸŽ€

🚨 OK GIRL, IMPORTANT ONE: Routine PSPTTRF MUST be called first. Like, must. Don't skip it. Don't think you can freestyle this. You can't. It's not a vibe, it's a requirement. 😭

and that's the whole page, bestie. short, sweet, tridiagonal. 🌈

sign-off time: this lil slice of history is from LAPACK routine version 1.5, dated 12 May 1997 β€” and it's stamped PSPTTRSV(l) in the old manual, so you know it's legit. mwah. πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from