Different covariance/correlation kernels are defined in order to illustrate the implementation of three series expansion methods for the representation of 1D random fields: the 'expansion optimal linear estimator (EOLE)', the orthogonal series expansion (OSE)' and the 'Karhunen-Loève (K-L)' methods. The K-L method is particularly implemented using Discrete, Nyström and Galerkin methods (with local and global shape functions). The main references were the report "Stochastic finite element methods and reliability" by Sudret and Der Kiureghian, but also the book "Stochastic finite elements: A spectral approach" by Ghanem and Spanos.
Several references to equations and useful comments are written in order to provide a better understanding of the codes. The programs estimate the corresponding eigenvalues and eigenvectors of the covariance kernel, and plot the variance of the estimators and several random field realizations.
It is worth mentioning that a different implementation of these methods can be found in the FERUM software http://www.ce.berkeley.edu/projects/ferum/Download/download.html
Any suggestions, corrections and/or improvements will be kindly accepted :-)
Thanks very much for your excellent job. I just have two questions about your code.
1st, I think in KL expansion Galekin method, the eigenvectors obtained should be normalized in terms of B matrix, otherwise, your variance error will be out of bound.
2nd, in the KL expansion discrete integration. As mentioned by Kiureghian. D. (in the paper 'The finite element method in structural reliability'), there should be any variance errors for this method. However, the main error in your code comes from the trapezoid integral method. If you change the way to normalize the eigenvector, there should not be any error for the discrete integration method.
do you have any reference for your functions?
Did you compare your EOLE simulation results with FERUM implementation by any chance?