A__x__=B__y__+__c__

α_{i} x_{i}+ β_{i} y_{i}=f_{i} for i=1..n or
__α__^{T}__x__+__β__^{T}__y__=__f__ .

The *gls* algorithm works through rearranging the system to place it in standard form and then calls
the standard method of LU factorisation and hence the solution is an O(n^{3})
operation. A further algorithm *regls* is included, this allows a change in the vectors __f__
and/or __c__ and re-use information from *gls* in order to compute additional solutions
in O(n^{2}) time.

The *gls* algorithm is implemented on three platforms - Matlab, Excel-VBA and Fortran.
In Matlab the same codes can be used for real- or complex-valued problems, in Fortran
different codes are available for real- and complex-valued problems and in Excel-VBA
only real-valued problems are covered. Test codes are also available and these can
be downloaded and run to build confidence in the software. The Matlab codes are also
applied to a simple boundary element problem of solving Laplace's equation interior
to a unit square, demontrating the *gls* algorithm in an application. Further
information on the *gls* algorithm can be found on the following
link.

** Matlab (Freemat/Octave/Scilab)**

In Matlab the routines gls.m and regls.m are able to solve systems with real or complex values. The codes require LUfbsubs.m in order to carry out the forward and backward substitution. The routines gls_real_t.m and gls_complex_t.m test problems, finding solutions with real or complex values.

The
gls.m
and
regls.m
codes are tested in an implementation of the boundary element
method for interior two-dimensional problems with a general Robin boundary
condidtion. The test problem is that
of the unit square with analytic solution φ=2(x^{2}-y^{2}).
The codes required can be downloaded from
www.boundary-element-method.com/mfiles . The codes required are the main test code
interiorSquareTestRobin.m ,
and the functions
lbem2.m ,
lbem2_on.m ,
l2lc.m ,
square_general.m ,
gls.m ,
regls.m ,
gl.m ,
vertices.m ,
dist.m ,
dotproduct.m ,
norm2.m ,
vector.m ,
svecsize.m ,
vecsize.m .
More details on the test problems can be found on this
guide.

** Fortran**

In Fortran the routine GLS in GLS2.FOR and REGLS in REGLS.FOR are for real-valued problems and CGLS in CGLS2.FOR and CREGLS in CREGLS.FOR are for complex-valued problems.

** Excel-VBA**

In Excel-VBA, the codes gls.bas and regls.bas can be found on the Excel spreadsheet GLS.xlsm . The spreadsheet also contains typical test problems and guides are linked to the spreaddsheet.