dgtsvx.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 316 行 · 第 1/2 页

HTML
316
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>dgtsvx.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="DGTSVX.1"></a><a href="dgtsvx.f.html#DGTSVX.1">DGTSVX</a>( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
     $                   DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
     $                   WORK, IWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER          FACT, TRANS
      INTEGER            INFO, LDB, LDX, N, NRHS
      DOUBLE PRECISION   RCOND
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            IPIV( * ), IWORK( * )
      DOUBLE PRECISION   B( LDB, * ), BERR( * ), D( * ), DF( * ),
     $                   DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
     $                   FERR( * ), WORK( * ), X( LDX, * )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="DGTSVX.24"></a><a href="dgtsvx.f.html#DGTSVX.1">DGTSVX</a> uses the LU factorization to compute the solution to a real
</span><span class="comment">*</span><span class="comment">  system of linear equations A * X = B or A**T * X = B,
</span><span class="comment">*</span><span class="comment">  where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
</span><span class="comment">*</span><span class="comment">  matrices.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Error bounds on the solution and a condition estimate are also
</span><span class="comment">*</span><span class="comment">  provided.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Description
</span><span class="comment">*</span><span class="comment">  ===========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The following steps are performed:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  1. If FACT = 'N', the LU decomposition is used to factor the matrix A
</span><span class="comment">*</span><span class="comment">     as A = L * U, where L is a product of permutation and unit lower
</span><span class="comment">*</span><span class="comment">     bidiagonal matrices and U is upper triangular with nonzeros in
</span><span class="comment">*</span><span class="comment">     only the main diagonal and first two superdiagonals.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  2. If some U(i,i)=0, so that U is exactly singular, then the routine
</span><span class="comment">*</span><span class="comment">     returns with INFO = i. Otherwise, the factored form of A is used
</span><span class="comment">*</span><span class="comment">     to estimate the condition number of the matrix A.  If the
</span><span class="comment">*</span><span class="comment">     reciprocal of the condition number is less than machine precision,
</span><span class="comment">*</span><span class="comment">     INFO = N+1 is returned as a warning, but the routine still goes on
</span><span class="comment">*</span><span class="comment">     to solve for X and compute error bounds as described below.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  3. The system of equations is solved for X using the factored form
</span><span class="comment">*</span><span class="comment">     of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  4. Iterative refinement is applied to improve the computed solution
</span><span class="comment">*</span><span class="comment">     matrix and calculate error bounds and backward error estimates
</span><span class="comment">*</span><span class="comment">     for it.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  FACT    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Specifies whether or not the factored form of A has been
</span><span class="comment">*</span><span class="comment">          supplied on entry.
</span><span class="comment">*</span><span class="comment">          = 'F':  DLF, DF, DUF, DU2, and IPIV contain the factored
</span><span class="comment">*</span><span class="comment">                  form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV
</span><span class="comment">*</span><span class="comment">                  will not be modified.
</span><span class="comment">*</span><span class="comment">          = 'N':  The matrix will be copied to DLF, DF, and DUF
</span><span class="comment">*</span><span class="comment">                  and factored.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TRANS   (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Specifies the form of the system of equations:
</span><span class="comment">*</span><span class="comment">          = 'N':  A * X = B     (No transpose)
</span><span class="comment">*</span><span class="comment">          = 'T':  A**T * X = B  (Transpose)
</span><span class="comment">*</span><span class="comment">          = 'C':  A**H * X = B  (Conjugate transpose = Transpose)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The order of the matrix A.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NRHS    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of right hand sides, i.e., the number of columns
</span><span class="comment">*</span><span class="comment">          of the matrix B.  NRHS &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DL      (input) DOUBLE PRECISION array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          The (n-1) subdiagonal elements of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  D       (input) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The n diagonal elements of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DU      (input) DOUBLE PRECISION array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          The (n-1) superdiagonal elements of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DLF     (input or output) DOUBLE PRECISION array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then DLF is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the (n-1) multipliers that define the matrix L from
</span><span class="comment">*</span><span class="comment">          the LU factorization of A as computed by <a name="DGTTRF.93"></a><a href="dgttrf.f.html#DGTTRF.1">DGTTRF</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then DLF is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the (n-1) multipliers that define the matrix L from
</span><span class="comment">*</span><span class="comment">          the LU factorization of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DF      (input or output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then DF is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the n diagonal elements of the upper triangular
</span><span class="comment">*</span><span class="comment">          matrix U from the LU factorization of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then DF is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the n diagonal elements of the upper triangular
</span><span class="comment">*</span><span class="comment">          matrix U from the LU factorization of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DUF     (input or output) DOUBLE PRECISION array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then DUF is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the (n-1) elements of the first superdiagonal of U.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then DUF is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the (n-1) elements of the first superdiagonal of U.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DU2     (input or output) DOUBLE PRECISION array, dimension (N-2)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then DU2 is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the (n-2) elements of the second superdiagonal of
</span><span class="comment">*</span><span class="comment">          U.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then DU2 is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the (n-2) elements of the second superdiagonal of
</span><span class="comment">*</span><span class="comment">          U.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  IPIV    (input or output) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then IPIV is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the pivot indices from the LU factorization of A as
</span><span class="comment">*</span><span class="comment">          computed by <a name="DGTTRF.127"></a><a href="dgttrf.f.html#DGTTRF.1">DGTTRF</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then IPIV is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the pivot indices from the LU factorization of A;
</span><span class="comment">*</span><span class="comment">          row i of the matrix was interchanged with row IPIV(i).
</span><span class="comment">*</span><span class="comment">          IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
</span><span class="comment">*</span><span class="comment">          a row interchange was not required.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B       (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
</span><span class="comment">*</span><span class="comment">          The N-by-NRHS right hand side matrix B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDB     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array B.  LDB &gt;= max(1,N).

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?