This folder contains the Matlab scripts to generate the data of 
the manuscript ``Preconditioners for optimal control problems under uncertainty"

---- Dependencies

Some experiments rely also on the AMG library hsl_mi20-2.0.0 available at:
https://www.hsl.rl.ac.uk/catalogue/hsl_mi20.html
https://onlinelibrary.wiley.com/doi/abs/10.1002/nme.2758

You may avoid the use of AMG by inverting the stiffness matrix $A$ using backslash (need to modify the code: set invA=@(v) A\v where appropriate)


---- Others

All codes rely on the GDGMatlab library to assemble the finite element matrices.
Part of the library is included in /lib_FEM, so the package is self-contained.
 The whole library is available at
https://github.com/vanzantom/GDGMatlab

---- Structure

The codes are divided into folders:

-lib_FEM: Finite element library.

-lib: contains few general and useful matlab scripts. Examples: the function ``Semi-Cheb'' that performs Semi-Chebychev iteration, 
    the function ``assemble_matrices'' that calls GDGMatlab to generate the stiffness matrices for each realization, 
    the function GaussHermite that returns the Gauss-Hermite nodes and weights, etc...

- Table_Eigenvalues:  codes to generate Tables 1,2,3.

- Num_Section: codes to generate Tables 4,5,6,7..
