You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
The sum of calculated stencil doesn't come out to be exactly 0 with the error increasing as we increase the order of approximation.
For a stencil for 4th order derivative and 10th order approximation, we have
Good catch. In general, I've never seen a practical case (like a PDE discretization) where this numerical issue would matter (say, by significantly impacting the numerical stability), but the fix is cheap and there's no reason not to do it.
The sum of calculated stencil doesn't come out to be exactly 0 with the error increasing as we increase the order of approximation.
For a stencil for 4th order derivative and 10th order approximation, we have
This is not a problem with Float64 as tested with BigFloat also.
So the solution is to adjust the middle coefficient of the stencil to set the overall sum = 0.
Reference:
SO Post: https://scicomp.stackexchange.com/questions/11249/numerical-derivative-and-finite-difference-coefficients-any-update-of-the-fornb
Improved Foenberg paper: http://epubs.siam.org/doi/pdf/10.1137/S0036144596322507
which is what we want.
The text was updated successfully, but these errors were encountered: