LFSSF

   more...
Solves a real symmetric system of linear equations given the U DUT factorization of the coefficient matrix.
Required Arguments
FACTN by N matrix containing the factorization of the coefficient matrix A as output from routine LFCSF/DLFCSF or LFTSF/DLFTSF. (Input)
Only the upper triangle of FACT is used.
IPVT — Vector of length N containing the pivoting information for the factorization of A as output from routine LFCSF/DLFCSF or LFTSF/DLFTSF. (Input)
B — Vector of length N containing the right-hand side of the linear system. (Input)
X — Vector of length N containing the solution to the linear system. (Output)
If B is not needed, B and X can share the same storage locations.
Optional Arguments
N — Number of equations. (Input)
Default: N = size (FACT,2).
LDFACT — Leading dimension of FACT exactly as specified in the dimension statement of the calling program. (Input)
Default: LDFACT = size (FACT,1).
FORTRAN 90 Interface
Generic: CALL LFSSF (FACT, IPVT, B, X [, …])
Specific: The specific interface names are S_LFSSF and D_LFSSF.
FORTRAN 77 Interface
Single: CALL LFSSF (N, FACT, LDFACT, IPVT, B, X)
Double: The double precision name is DLFSSF.
Description
Routine LFSSF computes the solution of a system of linear algebraic equations having a real symmetric indefinite coefficient matrix.
To compute the solution, the coefficient matrix must first undergo a U DUT factorization. This may be done by calling either LFCSF or LFTSF.
LFSSF and LFISF both solve a linear system given its U DUT factorization. LFISF generally takes more time and produces a more accurate answer than LFSSF. Each iteration of the iterative refinement algorithm used by LFISF calls LFSSF.
The underlying code is based on either LINPACK or LAPACK code depending upon which supporting libraries are used during linking. For a detailed explanation see “Using ScaLAPACK, LAPACK, LINPACK, and EISPACK” in the Introduction section of this manual.
Example
A set of linear systems is solved successively. LFTSF is called to factor the coefficient matrix. LFSSF is called to compute the four solutions for the four right-hand sides. In this case the coefficient matrix is assumed to be well-conditioned and correctly scaled. Otherwise, it would be better to call LFCSF to perform the factorization, and LFISF to compute the solutions.
 
USE LFSSF_INT
USE LFTSF_INT
USE WRRRN_INT
! Declare variables
PARAMETER (LDA=3, N=3)
INTEGER IPVT(N)
REAL A(LDA,LDA), B(N,4), X(N,4), FACT(LDA,LDA)
!
! Set values for A and B
!
! A = ( 1.0 -2.0 1.0)
! ( -2.0 3.0 -2.0)
! ( 1.0 -2.0 3.0)
!
! B = ( -1.0 3.6 -8.0 -9.4)
! ( -3.0 -4.2 11.0 17.6)
! ( -3.0 -5.2 -6.0 -23.4)
!
DATA A/1.0, -2.0, 1.0, -2.0, 3.0, -2.0, 1.0, -2.0, 3.0/
DATA B/-1.0, -3.0, -3.0, 3.6, -4.2, -5.2, -8.0, 11.0, -6.0,&
-9.4, 17.6, -23.4/
! Factor A
CALL LFTSF (A, FACT, IPVT)
! Solve for the four right-hand sides
DO 10 I=1, 4
CALL LFSSF (FACT, IPVT, B(:,I), X(:,I))
10 CONTINUE
 
! Print results
CALL WRRRN (’X’, X)
END
Output
 
X
1 2 3 4
1 10.00 2.00 1.00 0.00
2 5.00 -3.00 5.00 1.20
3 -1.00 -4.40 1.00 -7.00
Published date: 03/19/2020
Last modified date: 03/19/2020