function r83_gs_sl_test ( )

%*****************************************************************************80
%
%% r83_gs_sl_test() tests r83_gs_sl().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 September 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R83_GS_SL_TEST\n' );
  fprintf ( 1, '  R83_GS_SL applies Gauss-Seidel iteration with an R83 matrix\n' );
  fprintf ( 1, '  to solve a linear system A*x=b.\n' );
%
%  Set A to the second difference matrix.
%
  n = 10;

  a = r83_dif2 ( n, n );
%
%  Choose a random solution.
%
  x1 = r8vec_indicator1 ( n );
%
%  Compute the corresponding right hand side.
%
  b = r83_mv ( n, n, a, x1 );
%
%  Set the starting solution.
%
  x2 = zeros ( n, 1 );
%
%  Call the Gauss-Seidel routine.
%
  it_max = 25;

  for i = 1 : 3

    x2 = r83_gs_sl ( n, a, b, x2, it_max );

    r8vec_print ( n, x2, '  Current solution estimate:' );

  end

  return
end
