grid_tools  1.9.0
pmat.f90 File Reference

Utility routines for various linear inversions and Cholesky. More...

Go to the source code of this file.

Data Types

interface  pmat::inv
 
interface  pmat::invl
 
interface  pmat::invu
 
interface  pmat::l1lm
 
interface  pmat::ldlm
 
interface  pmat::ldum
 
interface  pmat::swpvv
 
interface  pmat::udlmm
 

Functions/Subroutines

subroutine pmat::cinvmt (a)
 Invert complex matrix in place. More...
 
subroutine pmat::cinvmtf (a, ff)
 Invert a complex matrix in place, or flag if process fails. More...
 
subroutine pmat::cldum (a, ipiv, d)
 Perform L*D*U decomposition, with pivoting, of square matrix. More...
 
subroutine pmat::cldumf (a, ipiv, d, ff)
 Perform l-d-u decomposition of square matrix a in place with pivoting. More...
 
subroutine pmat::clinmmt (a, b)
 Invert complex linear system with multiple right-hand side vectors. More...
 
subroutine pmat::clinmmtf (a, b, ff)
 Invert linear system with multiple right-hand side vectors, or flag failure. More...
 
subroutine pmat::clinmvt (a, b)
 Invert linear system with single right-hand side vector. More...
 
subroutine pmat::clinmvtf (a, b, ff)
 Invert complex linear system with single right-hand side vector. More...
 
subroutine pmat::cswpvv (d, e)
 Swap a pair of complex vectors. More...
 
subroutine pmat::cudlmm (a, b, ipiv)
 Use l-u factors in A to back-substitute for several rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition. More...
 
subroutine pmat::cudlmv (a, b, ipiv)
 Use l-u factors in A to back-substitute for 1 rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition. More...
 
subroutine pmat::dinvl (a)
 Invert lower triangular matrix in place. More...
 
subroutine pmat::dinvmt (a)
 Invert double precision matrix in place. More...
 
subroutine pmat::dinvmtf (a, ff)
 Invert a double precision matrix in place, or flag if process fails. More...
 
subroutine pmat::dinvu (a)
 Invert the upper triangular matrix in place by transposing, calling invl, and transposing again. More...
 
subroutine pmat::dl1lm (a, b)
 Cholesky, M -> L*U, U(i,j)=L(j,i) More...
 
subroutine pmat::dl1lmf (a, b, ff)
 Cholesky, M -> L*U, U(i,j)=L(j,i) More...
 
subroutine pmat::dldlm (a, b, d)
 Modified Cholesky decompose Q –> L*D*U, U(i,j)=L(j,i) More...
 
subroutine pmat::dldlmf (a, b, d, ff)
 Modified Cholesky Q –> L*D*U, U(i,j)=L(j,i) More...
 
subroutine pmat::dldum (a, ipiv, d)
 Perform L*D*U decomposition, with pivoting, of square matrix. More...
 
subroutine pmat::dldumf (a, ipiv, d, ff)
 Perform l-d-u decomposition of square matrix a in place with pivoting. More...
 
subroutine pmat::dlinlv (a, u)
 Solve linear system involving lower triangular system matrix. More...
 
subroutine pmat::dlinmmt (a, b)
 Invert linear system with multiple right-hand side vectors. More...
 
subroutine pmat::dlinmmtf (a, b, ff)
 Invert linear system with multiple right-hand side vectors, or flag failure. More...
 
subroutine pmat::dlinmvt (a, b)
 Invert linear system with single right-hand side vector. More...
 
subroutine pmat::dlinmvtf (a, b, ff)
 Invert linear system with single right-hand side vector. More...
 
subroutine pmat::dlinuv (a, u)
 Solve linear system involving upper triangular system matrix. More...
 
subroutine pmat::dswpvv (d, e)
 Swap a pair of double precision vectors. More...
 
subroutine pmat::dudlmm (a, b, ipiv)
 Use l-u factors in A to back-substitute for several rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition. More...
 
subroutine pmat::dudlmv (a, b, ipiv)
 Use l-u factors in A to back-substitute for 1 rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition. More...
 
subroutine pmat::iinvf (imat, ff)
 Invert integer square matrix, imat, if possible, but flag ff=.true. More...
 
subroutine pmat::sinvl (a)
 Invert lower triangular matrix in place. More...
 
subroutine pmat::sinvmt (a)
 Invert single precision matrix in place. More...
 
subroutine pmat::sinvmtf (a, ff)
 Invert a single precision matrix in place, or flag if process fails. More...
 
subroutine pmat::sinvu (a)
 Invert the upper triangular matrix in place by transposing, calling invl, and transposing again. More...
 
subroutine pmat::sl1lm (a, b)
 Cholesky, M -> L*U, U(i,j)=L(j,i) More...
 
subroutine pmat::sl1lmf (a, b, ff)
 Cholesky, M -> L*U, U(i,j)=L(j,i) More...
 
subroutine pmat::sldlm (a, b, d)
 Modified Cholesky decompose Q –> L*D*U, U(i,j)=L(j,i) More...
 
subroutine pmat::sldlmf (a, b, d, ff)
 Modified Cholesky decompose Q –> L*D*U, U(i,j)=L(j,i) More...
 
subroutine pmat::sldum (a, ipiv, d)
 Perform L*D*U decomposition, with pivoting, of square matrix. More...
 
subroutine pmat::sldumf (a, ipiv, d, ff)
 Perform l-d-u decomposition of square matrix a in place with pivoting. More...
 
subroutine pmat::slinlv (a, u)
 Solve linear system involving lower triangular system matrix. More...
 
subroutine pmat::slinmmt (a, b)
 Invert linear system with multiple right-hand side vectors. More...
 
subroutine pmat::slinmmtf (a, b, ff)
 Invert linear system with multiple right-hand side vectors, or flag failure. More...
 
subroutine pmat::slinmvt (a, b)
 Invert linear system with single right-hand side vector. More...
 
subroutine pmat::slinmvtf (a, b, ff)
 Invert linear system with single right-hand side vector. More...
 
subroutine pmat::slinuv (a, u)
 Solve linear system involving upper triangular system matrix. More...
 
subroutine pmat::sswpvv (d, e)
 Swap a pair of single precision vectors. More...
 
subroutine pmat::sudlmm (a, b, ipiv)
 Use l-u factors in A to back-substitute for several rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition. More...
 
subroutine pmat::sudlmv (a, b, ipiv)
 Use l-u factors in A to back-substitute for 1 rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition. More...
 

Detailed Description

Utility routines for various linear inversions and Cholesky.

Author
R. J. Purser, NOAA/NCEP/EMC, Tsukasa Fujita, JMA.

Definition in file pmat.f90.

Function/Subroutine Documentation

◆ cinvmt()

subroutine pmat::cinvmt ( complex(dpc), dimension(:,:), intent(inout)  a)
private

Invert complex matrix in place.

Parameters
[in,out]amatrix
Author
R. J. Purser

Definition at line 104 of file pmat.f90.

◆ cinvmtf()

subroutine pmat::cinvmtf ( complex(dpc), dimension(:,:), intent(inout)  a,
logical, intent(out)  ff 
)
private

Invert a complex matrix in place, or flag if process fails.

Parameters
[in,out]amatrix
[out]ffflag for error condition
Author
R. J. Purser

Definition at line 191 of file pmat.f90.

References pietc::c1.

◆ cldum()

subroutine pmat::cldum ( complex(dpc), dimension(:,:), intent(inout)  a,
integer(spi), dimension(:), intent(out)  ipiv,
complex(dpc), intent(out)  d 
)
private

Perform L*D*U decomposition, with pivoting, of square matrix.

Complex double precision version.

Parameters
[in,out]ainput square matrix, output L,D,U factors
[out]ddeterminant sign change indicator (+1 or -1)
[out]ipivvector of pivots
Author
R. J. Purser

Definition at line 509 of file pmat.f90.

◆ cldumf()

subroutine pmat::cldumf ( complex(dpc), dimension(:,:), intent(inout)  a,
integer(spi), dimension(:), intent(out)  ipiv,
complex(dpc), intent(out)  d,
logical, intent(out)  ff 
)

Perform l-d-u decomposition of square matrix a in place with pivoting.

Complex double precision version.

Parameters
[in,out]asquare matrix to be factorized
[out]ipivvector encoding the pivoting sequence
[out]dindicator for possible sign change of determinant
[out]fffailure flag, set to .true. when determinant of a vanishes.
Author
R. J. Purser

Definition at line 660 of file pmat.f90.

References pietc::c0, pietc::c1, pietc::u0, and pietc::u1.

◆ clinmmt()

subroutine pmat::clinmmt ( complex(dpc), dimension(:,:), intent(inout)  a,
complex(dpc), dimension(:,:), intent(inout)  b 
)
private

Invert complex linear system with multiple right-hand side vectors.

Complex double precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vectors, output solution vectors
Author
R. J. Purser

Definition at line 256 of file pmat.f90.

◆ clinmmtf()

subroutine pmat::clinmmtf ( complex(dpc), dimension(:,:), intent(inout)  a,
complex(dpc), dimension(:,:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Invert linear system with multiple right-hand side vectors, or flag failure.

Complex double precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vectors, output solution vectors
[out]fffailure flag
Author
R. J. Purser

Definition at line 320 of file pmat.f90.

◆ clinmvt()

subroutine pmat::clinmvt ( complex(dpc), dimension(:,:), intent(inout)  a,
complex(dpc), dimension(:), intent(inout)  b 
)
private

Invert linear system with single right-hand side vector.

Complex double precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vector, output solution vector
Author
R. J. Purser

Definition at line 372 of file pmat.f90.

◆ clinmvtf()

subroutine pmat::clinmvtf ( complex(dpc), dimension(:,:), intent(inout)  a,
complex(dpc), dimension(:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Invert complex linear system with single right-hand side vector.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vector, output solution vector
[out]fffailure flag
Author
R. J. Purser

Definition at line 430 of file pmat.f90.

◆ cswpvv()

subroutine pmat::cswpvv ( complex(dpc), dimension(:), intent(inout)  d,
complex(dpc), dimension(:), intent(inout)  e 
)
private

Swap a pair of complex vectors.

Parameters
[in,out]dvector
[in,out]evector
Author
R. J. Purser

Definition at line 72 of file pmat.f90.

◆ cudlmm()

subroutine pmat::cudlmm ( complex(dpc), dimension(:,:), intent(in)  a,
complex(dpc), dimension(:,:), intent(inout)  b,
integer(spi), dimension(:), intent(in)  ipiv 
)

Use l-u factors in A to back-substitute for several rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition.

Parameters
[in]asquare matrix to be factorized
[in,out]brt-hand-sides vectors on input, corresponding solutions on return
[in]ipivvector encoding the pivoting sequence
Author
R. J. Purser

Definition at line 798 of file pmat.f90.

References pietc::c1.

◆ cudlmv()

subroutine pmat::cudlmv ( complex(dpc), dimension(:,:), intent(in)  a,
complex(dpc), dimension(:), intent(inout)  b,
integer(spi), dimension(:), intent(in)  ipiv 
)

Use l-u factors in A to back-substitute for 1 rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition.

Parameters
[in]asquare matrix to be factorized
[in,out]bright-hand side vector on input, corresponding solution on return
[in]ipivarray encoding the pivoting sequence
Author
R. J. Purser

Definition at line 893 of file pmat.f90.

References pietc::c1.

◆ dinvl()

subroutine pmat::dinvl ( real(dp), dimension(:,:), intent(inout)  a)

Invert lower triangular matrix in place.

Double precision.

Parameters
[in,out]alower triangular matrix.
Author
R. J. Purser

Definition at line 1154 of file pmat.f90.

References pietc::u0, and pietc::u1.

◆ dinvmt()

subroutine pmat::dinvmt ( real(dp), dimension(:,:), intent(inout)  a)
private

Invert double precision matrix in place.

Parameters
[in,out]amatrix
Author
R. J. Purser

Definition at line 93 of file pmat.f90.

◆ dinvmtf()

subroutine pmat::dinvmtf ( real(dp), dimension(:,:), intent(inout)  a,
logical, intent(out)  ff 
)

Invert a double precision matrix in place, or flag if process fails.

Parameters
[in,out]amatrix
[out]ffflag for error condition
Author
R. J. Purser

Definition at line 154 of file pmat.f90.

◆ dinvu()

subroutine pmat::dinvu ( real(dp), dimension(:,:), intent(inout)  a)
private

Invert the upper triangular matrix in place by transposing, calling invl, and transposing again.

Double precision version.

Parameters
[in,out]aupper triangular matrix.
Author
R. J. Purser

Definition at line 1127 of file pmat.f90.

◆ dl1lm()

subroutine pmat::dl1lm ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:,:), intent(inout)  b 
)
private

Cholesky, M -> L*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]bCholesky factor matrix.
Author
R. J. Purser

Definition at line 934 of file pmat.f90.

◆ dl1lmf()

subroutine pmat::dl1lmf ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:,:), intent(inout)  b,
logical, intent(out)  ff 
)

Cholesky, M -> L*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]bCholesky factor matrix.
[out]fffailure flag
Author
R. J. Purser

Definition at line 982 of file pmat.f90.

References pietc::u0, and pietc::u1.

◆ dldlm()

subroutine pmat::dldlm ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:,:), intent(inout)  b,
real(dp), dimension(:), intent(out)  d 
)
private

Modified Cholesky decompose Q –> L*D*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]boutput modified cholesky factor, L.
[out]ddiagonal matrix, D.
Author
R. J. Purser

Definition at line 1031 of file pmat.f90.

◆ dldlmf()

subroutine pmat::dldlmf ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:,:), intent(inout)  b,
real(dp), dimension(:), intent(out)  d,
logical, intent(out)  ff 
)

Modified Cholesky Q –> L*D*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]bmodified Cholesky factor, L.
[out]ddiagonal matrix, D.
[out]fferror flag
Author
R. J. Purser

Definition at line 1084 of file pmat.f90.

References pietc::u0, and pietc::u1.

◆ dldum()

subroutine pmat::dldum ( real(dp), dimension(:,:), intent(inout)  a,
integer(spi), dimension(:), intent(out)  ipiv,
real(dp), intent(out)  d 
)
private

Perform L*D*U decomposition, with pivoting, of square matrix.

Double precision version.

Parameters
[in,out]ainput square matrix, output L,D,U factors
[out]ddeterminant sign change indicator (+1 or -1)
[out]ipivvector of pivots
Author
R. J. Purser

Definition at line 493 of file pmat.f90.

◆ dldumf()

subroutine pmat::dldumf ( real(dp), dimension(:,:), intent(inout)  a,
integer, dimension(:), intent(out)  ipiv,
real(dp), intent(out)  d,
logical(spi), intent(out)  ff 
)

Perform l-d-u decomposition of square matrix a in place with pivoting.

Double precision version.

Parameters
[in,out]asquare matrix to be factorized
[out]ipivvector encoding the pivoting sequence
[out]dindicator for possible sign change of determinant
[out]fffailure flag, set to .true. when determinant of a vanishes.
Author
R. J. Purser

Definition at line 593 of file pmat.f90.

References pietc::u0, and pietc::u1.

◆ dlinlv()

subroutine pmat::dlinlv ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:), intent(inout)  u 
)
private

Solve linear system involving lower triangular system matrix.

Double precision version.

Parameters
[in]alower triangular matrix.
[in,out]uinput RHS vector, output solution vector.
Author
R. J. Purser

Definition at line 1189 of file pmat.f90.

◆ dlinmmt()

subroutine pmat::dlinmmt ( real(dp), dimension(:,:), intent(inout)  a,
real(dp), dimension(:,:), intent(inout)  b 
)
private

Invert linear system with multiple right-hand side vectors.

Double precision version

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vectors, output solution vectors
Author
R. J. Purser

Definition at line 243 of file pmat.f90.

◆ dlinmmtf()

subroutine pmat::dlinmmtf ( real(dp), dimension(:,:), intent(inout)  a,
real(dp), dimension(:,:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Invert linear system with multiple right-hand side vectors, or flag failure.

Double precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vectors, output solution vectors
[out]fffailure flag
Author
R. J. Purser

Definition at line 295 of file pmat.f90.

◆ dlinmvt()

subroutine pmat::dlinmvt ( real(dp), dimension(:,:), intent(inout)  a,
real(dp), dimension(:), intent(inout)  b 
)
private

Invert linear system with single right-hand side vector.

Double precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vector, output solution vector
Author
R. J. Purser

Definition at line 358 of file pmat.f90.

◆ dlinmvtf()

subroutine pmat::dlinmvtf ( real(dp), dimension(:,:), intent(inout)  a,
real(dp), dimension(:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Invert linear system with single right-hand side vector.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vector, output solution vector
[out]fffailure flag
Author
R. J. Purser

Definition at line 408 of file pmat.f90.

◆ dlinuv()

subroutine pmat::dlinuv ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:), intent(inout)  u 
)
private

Solve linear system involving upper triangular system matrix.

Double precision version.

Parameters
[in]aupper triangular matrix.
[in,out]uinput RHS vector, output solution vector.
Author
R. J. Purser

Definition at line 1219 of file pmat.f90.

◆ dswpvv()

subroutine pmat::dswpvv ( real(dp), dimension(:), intent(inout)  d,
real(dp), dimension(:), intent(inout)  e 
)
private

Swap a pair of double precision vectors.

Parameters
[in,out]dvector
[in,out]evector
Author
R. J. Purser

Definition at line 61 of file pmat.f90.

◆ dudlmm()

subroutine pmat::dudlmm ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:,:), intent(inout)  b,
integer(spi), dimension(:), intent(in)  ipiv 
)

Use l-u factors in A to back-substitute for several rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition.

Parameters
[in]asquare matrix to be factorized
[in,out]brt-hand-sides vectors on input, corresponding solutions on return
[in]ipivvector encoding the pivoting sequence
Author
R. J. Purser

Definition at line 764 of file pmat.f90.

References pietc::u1.

◆ dudlmv()

subroutine pmat::dudlmv ( real(dp), dimension(:,:), intent(in)  a,
real(dp), dimension(:), intent(inout)  b,
integer(spi), dimension(:), intent(in)  ipiv 
)

Use l-u factors in A to back-substitute for 1 rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition.

Parameters
[in]asquare matrix to be factorized
[in,out]bright-hand side vector on input, corresponding solution on return
[in]ipivarray encoding the pivoting sequence
Author
R. J. Purser

Definition at line 862 of file pmat.f90.

References pietc::u1.

◆ iinvf()

subroutine pmat::iinvf ( integer(spi), dimension(:,:), intent(inout)  imat,
logical, intent(out)  ff 
)
private

Invert integer square matrix, imat, if possible, but flag ff=.true.

if not possible. (Determinant of imat must be +1 or -1)

Parameters
[in,out]imatinteger square matrix
[out]fferror flag
Author
R. J. Purser

Definition at line 452 of file pmat.f90.

References pietc::t.

◆ sinvl()

subroutine pmat::sinvl ( real(sp), dimension(:,:), intent(inout)  a)
private

Invert lower triangular matrix in place.

Single precision.

Parameters
[in,out]alower triangular matrix.
Author
R. J. Purser

Definition at line 1136 of file pmat.f90.

◆ sinvmt()

subroutine pmat::sinvmt ( real(sp), dimension(:,:), intent(inout)  a)
private

Invert single precision matrix in place.

Parameters
[in,out]amatrix
Author
R. J. Purser

Definition at line 82 of file pmat.f90.

◆ sinvmtf()

subroutine pmat::sinvmtf ( real(sp), dimension(:,:), intent(inout)  a,
logical, intent(out)  ff 
)
private

Invert a single precision matrix in place, or flag if process fails.

Parameters
[in,out]amatrix
[out]ffflag for error condition
Author
R. J. Purser

Definition at line 116 of file pmat.f90.

◆ sinvu()

subroutine pmat::sinvu ( real(sp), dimension(:,:), intent(inout)  a)

Invert the upper triangular matrix in place by transposing, calling invl, and transposing again.

Single precision version.

Parameters
[in,out]aupper triangular matrix.
Author
R. J. Purser

Definition at line 1117 of file pmat.f90.

◆ sl1lm()

subroutine pmat::sl1lm ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:,:), intent(inout)  b 
)

Cholesky, M -> L*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]bCholesky factor matrix.
Author
R. J. Purser

Definition at line 921 of file pmat.f90.

◆ sl1lmf()

subroutine pmat::sl1lmf ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:,:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Cholesky, M -> L*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]bCholesky factor matrix.
[out]fffailure flag
Author
R. J. Purser

Definition at line 948 of file pmat.f90.

References pietc::f.

◆ sldlm()

subroutine pmat::sldlm ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:,:), intent(inout)  b,
real(sp), dimension(:), intent(out)  d 
)

Modified Cholesky decompose Q –> L*D*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix.
[in,out]boutput modified cholesky factor, L.
[out]ddiagonal matrix, D.
Author
R. J. Purser

Definition at line 1016 of file pmat.f90.

◆ sldlmf()

subroutine pmat::sldlmf ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:,:), intent(inout)  b,
real(sp), dimension(:), intent(out)  d,
logical, intent(out)  ff 
)
private

Modified Cholesky decompose Q –> L*D*U, U(i,j)=L(j,i)

Parameters
[in]asymmetric matrix
[in,out]bmodified cholesky factor, L.
[out]ddiagonal matrix, D.
[out]fferror flag
Author
R. J. Purser

Definition at line 1047 of file pmat.f90.

References pietc::f.

◆ sldum()

subroutine pmat::sldum ( real(sp), dimension(:,:), intent(inout)  a,
integer(spi), dimension(:), intent(out)  ipiv,
real(sp), intent(out)  d 
)
private

Perform L*D*U decomposition, with pivoting, of square matrix.

Single precision version.

Parameters
[in,out]ainput square matrix, output L,D,U factors
[out]ddeterminant sign change indicator (+1 or -1)
[out]ipivvector of pivots
Author
R. J. Purser

Definition at line 477 of file pmat.f90.

◆ sldumf()

subroutine pmat::sldumf ( real(sp), dimension(:,:), intent(inout)  a,
integer(spi), dimension(:), intent(out)  ipiv,
real(sp), intent(out)  d,
logical, intent(out)  ff 
)
private

Perform l-d-u decomposition of square matrix a in place with pivoting.

Single precision version.

Parameters
[in,out]asquare matrix to be factorized
[out]ipivvector encoding the pivoting sequence
[out]dindicator for possible sign change of determinant
[out]fffailure flag, set to .true. when determinant of a vanishes.
Author
R. J. Purser

Definition at line 526 of file pmat.f90.

References pietc::f, and pietc::t.

◆ slinlv()

subroutine pmat::slinlv ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:), intent(inout)  u 
)

Solve linear system involving lower triangular system matrix.

Single precision version.

Parameters
[in]alower triangular matrix.
[in,out]uinput RHS vector, output solution vector.
Author
R. J. Purser

Definition at line 1174 of file pmat.f90.

◆ slinmmt()

subroutine pmat::slinmmt ( real(sp), dimension(:,:), intent(inout)  a,
real(sp), dimension(:,:), intent(inout)  b 
)

Invert linear system with multiple right-hand side vectors.

Single precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vectors, output solution vectors
Author
R. J. Purser

Definition at line 230 of file pmat.f90.

◆ slinmmtf()

subroutine pmat::slinmmtf ( real(sp), dimension(:,:), intent(inout)  a,
real(sp), dimension(:,:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Invert linear system with multiple right-hand side vectors, or flag failure.

Single precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vectors, output solution vectors
[out]fffailure flag
Author
R. J. Purser

Definition at line 270 of file pmat.f90.

◆ slinmvt()

subroutine pmat::slinmvt ( real(sp), dimension(:,:), intent(inout)  a,
real(sp), dimension(:), intent(inout)  b 
)
private

Invert linear system with single right-hand side vector.

Single precision version.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vector, output solution vector
Author
R. J. Purser

Definition at line 344 of file pmat.f90.

◆ slinmvtf()

subroutine pmat::slinmvtf ( real(sp), dimension(:,:), intent(inout)  a,
real(sp), dimension(:), intent(inout)  b,
logical, intent(out)  ff 
)
private

Invert linear system with single right-hand side vector.

Parameters
[in,out]aInvertible system matrix, destroyed on output
[in,out]binput RHS vector, output solution vector
[out]fffailure flag
Author
R. J. Purser

Definition at line 386 of file pmat.f90.

◆ slinuv()

subroutine pmat::slinuv ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:), intent(inout)  u 
)
private

Solve linear system involving upper triangular system matrix.

Single precision version.

Parameters
[in]aupper triangular matrix.
[in,out]uinput RHS vector, output solution vector.
Author
R. J. Purser

Definition at line 1204 of file pmat.f90.

◆ sswpvv()

subroutine pmat::sswpvv ( real(sp), dimension(:), intent(inout)  d,
real(sp), dimension(:), intent(inout)  e 
)
private

Swap a pair of single precision vectors.

Parameters
[in,out]dvector
[in,out]evector
Author
R. J. Purser

Definition at line 50 of file pmat.f90.

◆ sudlmm()

subroutine pmat::sudlmm ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:,:), intent(inout)  b,
integer(spi), dimension(:), intent(in)  ipiv 
)

Use l-u factors in A to back-substitute for several rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition.

Parameters
[in]aL-D-U factorization of linear system matrux
[in,out]brt-hand-sides vectors on input, corresponding solutions on return
[in]ipivvector encoding the pivoting sequence
Author
R. J. Purser

Definition at line 730 of file pmat.f90.

◆ sudlmv()

subroutine pmat::sudlmv ( real(sp), dimension(:,:), intent(in)  a,
real(sp), dimension(:), intent(inout)  b,
integer(spi), dimension(:), intent(in)  ipiv 
)

Use l-u factors in A to back-substitute for 1 rhs in B, using ipiv to define the pivoting permutation used in the l-u decomposition.

Parameters
[in]aL-D-U factorization of linear system matrix
[in,out]bright-hand-side vector on input, corresponding solution on return
[in]ipivvector encoding the pivoting sequence
Author
R. J. Purser

Definition at line 831 of file pmat.f90.