JOINT   INSTITUTE   FOR   NUCLEAR   RESEARCH
lit
  Program   Library  JINRLIB rus

SOLIPSYST - Gordan method for a linear system solving

F098

Author: A.P.Sapojnikov Language: Fortran

The function SOLIPSYST solves a system of linear equations A * X = B of a general type by Gordan method with a choice of the pivot element in the column.

Structure:

Type: - FUNCTION
User Entry Names: - SOLIPSYST

Usage:

DETERM = SOLIPSYST (A, N, M)

At the input:

A - (REAL*8) matrix dimension (N, N+M+1),
containing in the first N columns the coefficients of A system,
in the next M columns - M sets of the right parts B,
last column - working;
N - (INTEGER) system dimension (2,3...);
M - (INTEGER) number of right parts (0,1,2...).

At the output:

The first N columns of matrix A contains a inverse matrix,
the next M columns - corresponding M system solutions.
At M=0 only the inverse matrix is calculated.

The result given out by the function, is equal to a determinant of the system or 0, if the initial matrix is singular.

Notes:

Inside the program the file A is used as a 1D one!


Example:
       . . .
       IMPLICIT REAL*8 (A-H,O-Z)
       DIMENSION A(3,6)
       DATA A/1.D0,4.D0,0.D0, 2.D0,5.D0,7.D0, 3.D0,6.D0,8.D0,
     *     6.D0,15.D0,15.D0, 12.D0,30.D0,30.D0, 0.D0,0.D0,0.D0/
       WRITE(*,*) ' DETERM=',SOLIPSYST(A,3,2)
       DO J=4,5
         WRITE(*,*) (A(I,J),I=1,3)
       ENDDO
       . . .
Result:
       DETERM=      18.000000000000000
          1.000000000000000        1.000000000000000        1.000000000000000
          2.000000000000000        2.000000000000000        2.000000000000000


home up e-mail