% Description of the programs for the error estimate in spatial step. 
%
% 1. stiff_mass.m, assembles the mass and stiffness
% matrices for the corresponding parameters p,e,t, which are commented on
% the stiff_mass.m itself. Note that this is only for 1D.
%
% 2. Solver_spde.m  solves the SPDE on the finest grid and on different
% spatial grids. 
%
% 3. L2_ErrorEst.m  finds the L_2 error of the different computed solutions
% for different spatial descritization. The solution on the fine mesh is
% considered as a true solution. Note that the dimension of the vector 
% containing the solutions on the less finer spatial steps are less than
% the dimension of the vector containing the exact solution. So, to find
% the difference between the true and estimated solutions, we first find
% the values corresponding to the omitted spatial points using the solution we 
% got from the less fine spatial descritization, and make vectors
% equal in dimension. Then find the difference between the true and the
% estimated solution.  i.e. suppose the fine spatial descritization is
%p=[1/16,1/8,3/16,1/4,5/16,3/8,7/16,1/2,9/16,5/8,11/16,3/4,13/16,7/8,15/16]
% and the less fine descritization is p1=[1/4,1/2,3/4]. Then the true
% solution u_true is of dimension 15, while the estimated solution u_est is
% of dimension 3. So, we need to find the values at points  
% 1/16,1/8,3/16, 5/16,3/8,7/16, 9/16,5/8,11/16, 13/16,7/8,15/16 of the estimated
% solution we got from the spatial descritization p1=[1/4,1/2,3/4]. 
%
% 4. Experiment.m  does the main experiment for verifying the strong convergence
% rate with respect to space step h. We compute the L_2 error repeatedly
% and then take the average, which is apprximately the L_2(Omega, H) error.
% For the true solution, we compute it on the fine mesh where wa take
% H=2^8 and K=2^8.  Then K=2^8 is fixed and we compute the solutions on
% less fine space mesh. Finally we plot the error againest the corresponding
% number of space steps on a log-log scale.
% 
% 5. integrand_1.m and integrand_2 are the functions needed in
% Assemble_noise.m. One should define them depending on what type of
% covariance operator is being treated. 
% 
% 6. Green.m is the Green's function needed when the covariance operator is
% taken as minus the inverse of the Laplace operator.
%
% Final comment: Assemble_noise computes the Cholesky factor of
% Q_tilda=(Q*phi_i, phi_j), where Q is the covariance operator, on the
% interval (0,1) only. One should change h and P accordingly in the
% Assemble_noise code if the interval is not (0,1).
% 