|Author(s): G.A. Erskine||Library: KERNLIB|
|Language: Fortran||Revised: 27.11.1984|
Subroutine tEQN (where , D or C as described below) solves the matrix equation
which represents a system of N simultaneous linear equations with K right-hand sides:
Subroutine tINV computes the inverse of a square matrix A. Subroutine tEQINV solves the system (*) and also computes the inverse of A, but is appreciably slower than tEQN.
If the determinant of A is also required, or if several systems of the form (*) are to be solved sequentially with the same coefficient matrix A but differing right-hand sides B, the subroutines in RFACT (F011) should be used.
User Entry Names: RINV, REQN, REQINV, DINV, DEQN, DEQINV, CINV, CEQN, CEQINV
Internal Entry Names: F010PR
Files Refeenced: Printer
For (type REAL), (type DOUBLE PRECISION), (type COMPLEX):
CALL tEQN (N,A,IDIM,IR,IFAIL,K,B) CALL tINV (N,A,IDIM,IR,IFAIL) CALL tEQINV(N,A,IDIM,IR,IFAIL,K,B)
Triangular factorization with row interchanges, implemented by in-line code if and by calls to library program RFACT (F011) if . If or or , a message is printed and program execution is terminated by calling ABEND (Z035).
Assume that the matrix A and the matrix B are stored according to the Fortran convention in arrays A and B respectively of a program containing declarations
DIMENSION IR(25) DOUBLE PRECISION A(25,30),B(25,10)To replace B by the solution matrix X of the system of equations and to replace A by , with a jump to label 100 if A is singular:
CALL DEQINV (10,A,25,IR,IFAIL,3,B) IF(IFAIL .NE. 0) GO TO 100