# Calculating theoretical order of accuracy of least squares fit advection scheme

I'm familiar with finding the order of accuracy using von Neumann analysis for finite difference schemes formulated using Taylor series expansions.

But is there a similar technique for finding the order of accuracy for schemes that use a least squares fit for approximating gradients?

Currently, I am solving a 1D advection equation in advective form. I'm using Forward Euler timestepping and an upwind quadratic least squares fit with a three-point stencil. My experiments suggest an order of accuracy of ~0.7 which suggests that I've either got bugs in my implementation or the scheme is inherently slow to converge.

• Can you give an example of the kind of gradient you are calculating? – Bill Barth Jul 28 '15 at 16:13
• I'm not sure how to answer, but given that I'm fitting the polynomial $\phi = ax^3 + bx^2 + cx + d$ and I set up the least squares stencil so that I always want to find $\frac{\mathrm{d} \phi(0)}{\mathrm{d}x} = c$. – hertzsprung Jul 31 '15 at 9:24