You are on page 1of 2

GLS.

FOR

www.boundary-element-method.com

Boundary Element Method Open Source Software in FORTRAN


File / Module(s)
Title
Version(Date) and
History
Description

GLS2.FOR / GLS
Carries out the solution of a general linear system of equations that arise in the direct boundary element method.
2. (June 2015). Replaces version 1 (2000), which can be found on this link: GLS_1. The new version clarifies the re-use of
the code to apply new boundary data to the same system within a boundary element model.
This is a FORTRAN source file for solving a general linear system of equations
= + ,

(1a)

where A and B are known matrices and is a known -vector with


+ = for = 1

Interface

(1b)

where the , and are constants with and are never both zero for each i. The evaluation of vectors and is the
solution of the process.
SUBROUTINE GLS(MAXN,N,A,B,C,ALPHA,BETA,F,X,Y,LFAIL, PERM, XORY, WKSPC1, WKSPC2, WKSPC3, WKSPC4)
INTEGER MAXN The limit on the dimension of the matrices A and B
INTEGER N The dimension of the matrices and vectors
Input Parameters
REAL*8 A(MAXN,MAXN) The matrix A
REAL*8 B(MAXN,MAXN) The matrix B
REAL*8 C(MAXN) The vector c
REAL*8 ALPHA(MAXN) The i = 1
REAL*8 BETA(MAXN) The i = 1
REAL*8 F(MAXN) The fi = 1
Output Parameters
REAL*8 X(MAXN) The solution vector x
REAL*8 Y(MAXN) The solution vector y
The following parameters are 'output', but only needed if new boundary conditions are to be applied to the system
The matrix A is overwritten by the LU factorisation and B is altered by row swaps with A
INTEGER PERM(MAXN) The permutation matrix (resulting from the LU factorisation)
LOGICAL XORY(MAXN) The record of column exchanges.
REAL*8 WKSPC1(MAXN) , WKSPC2(MAXN), WKSPC3(MAXN), WKSPC4(MAXN) Workspace

GLS.FOR

www.boundary-element-method.com

Web source of code.


Web source of this guide

www.boundary-element-method.com/fortran/GLS2.FOR
www.boundary-element-method.com/fortran/GLS_FOR.pdf

Web source of the


algorithm
Dependent routines

www.boundary-element-methods.com/tutorials/Numerical Solution of a General Linear System of Equations.pdf

Test problems or
modules tested
Licence
Codes that this may be
used alongside this one
Similar codes that may be
of interest
Applications
Alternative Platforms
Author
References

LUFAC : www.numerical-methods.com/fortran/LUFAC.FOR
LUFBSUB : www.numerical-methods.com/fortran/LUFBSUB.FOR
GLS_T : www.boundary-element-method.com/fortran/GLS2_T.FOR
This is open source; the software may be used and applied within other systems as long as its provenance is appropriately
acknowledged. See the GNU Licence for more information or contact webmaster@boundary-element-method.com .
REGLS reuses the results of GLS so that solutions of problems with different boundary conditions can be found more
quickly : www.boundary-element-method.com/fortran/REGLS.FOR
A similar m-file code is available (Matlab/Freemat/Octave/Scilab) is available on
www.boundary-elmenet-method.com/mfiles/gls.m
and a similar code in Excel-VBA is available on
www.boundary-element-method.com/Excel_VBA/GLS.xlsm
LIBEM2, LIBEM3,LIBEMA, LEBEM3, LABEM3, LSEM3
Fortran-Complex System CGLS2
Matlab/Freemat/Octave/Scilab gls
VBA/Visual Basic GLS.xlsm
Stephen Kirkup
1. Numerical Solution of General Linear Systems of Equations
2. The Boundary Element Method in Acoustics
3. www.boundary-element-method.com
4. Fortran 77 tutorials

You might also like