Using GRFs, one generates samples $x \sim N(m,K)$ with arbitrary mean $m$ and covariance matrix $K$ using a scalar Gaussian generator as

$x = m + Lu$,

where $L$ is a lower triangular matrix, such that $K =L^TL$ and $u \sim N(0,I)$.

I would like to generate samples, such that the first and last elements of x has a certain value. My goal is to generate random right-hand sides for solving PDE, but such that the boundary conditions are fulfilled (1D).

  • $\begingroup$ Can we just add one desired element at the front and one at the end of the sample? If the statistical ensemble is large then doing that would not affect much the moments of the sample. $\endgroup$ Jan 21, 2023 at 16:24
  • $\begingroup$ If the first and last node are fixed, then the samples you are drawing are clearly not Gaussian any more. So the question becomes: What is the distribution you are trying to draw from? $\endgroup$ Jan 21, 2023 at 16:50
  • $\begingroup$ Thanks! thats good point. Any suggestions regarding choice of distribution to sample random RHSs, which fullfil BC? $\endgroup$ Jan 21, 2023 at 17:15


This site is temporarily in read-only mode and not accepting new answers.

Browse other questions tagged .