function paraheat_pwc_test ( diffusivity_seed )

%*****************************************************************************80
%
%% paraheat_pwc_test tests paraheat_pwc.
%
%  Discussion:
%
%    This program uses the random number seed to choose parameters 
%    vc as input to the paraheat_pwc() program, and 
%    saves the resulting sensor measurements ns, xs, ys, vs.
%
%    For now, the program then simply uses the sensor measurements
%    to try to reconstruct the finite element solution and plot it.  
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    30 April 2019
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer diffusivity_seed, the seed for the random number
%    generator, used to set the diffusivity values.
%
  addpath ( '../paraheat_pwc' );

  timestamp ( );
  fprintf ( 1, 'paraheat_pwc_test\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test paraheat_pwc\n' );
  fprintf ( 1, '  For given piecewise constant diffusivity data,\n' );
  fprintf ( 1, '  use paraheat_pwc() to compute an FEM solution u(x,y),\n' );
  fprintf ( 1, '  and return sample solution values at sensor locations.\n' );
  fprintf ( 1, '\n' );

  fprintf ( 1, '  Diffusivity random seed is %d\n', diffusivity_seed );
%
%  Set the diffusivity.
%
  rng ( diffusivity_seed );
  nxc = 4;
  nyc = 4;
  vc = 0.5 + 5.0 * rand ( nxc, nyc );
%
%  Solve the finite element system, and return samples of the solution.
%
  [ ns, xs, ys, vs ] = paraheat_pwc ( vc );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'paraheat_pwc_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../paraheat_pwc' );

  return
end
