I'm following Paul Constantine's Primer on Stochastic Galerkin Method, Section 3.1 (2D Poisson Example). In this matlab code, the example attempts to solve the PDE $$\alpha(w)(u_{xx}+u_{yy})=1 \text{ in } \Omega=[-1,1]^2$$ $$u=0 \text{ on } \partial\Omega$$ with $\alpha(w)$ a uniformly randomly distributed variable whose values lie in $[1,3]$.
I was able to follow the derivation of the method and its implementation into the matlab available here. Except for one small detail...
In the matlab code, the linear operator $Lu=u_{xx}+u_{yy}$ was discretized by finite difference method using $n=16$ equispaced intervals. In my understanding of the problem, this would mean that $$\Delta x=\frac{2}{n}$$. However, the main program file *poisson_2d.m*, (line 38), he used
$$dx=1/n$$
I'm almost certain that this is a typo. Even though the stochastic galerkin code is supposedly verified by monte-carlo simulations, even the monte-carlo simulations use a finite difference discretization of $dx=1/n$.
I can't find any other reason to suspect that the spatial discretization of the laplacian for this problem should be $\frac{1}{n}$.
Can anyone, with some experience with this sort of thing, confirm/refute my suspicions?