<div dir="ltr">Along the same lines, also have a look at Essentially Non-Oscillatory (ENO) and Weighted ENO schemes which basically constructed oscillation-free, high-order, 'upwind' approximations to grad(f). Any standard text on FD (such as the one by LeVeque or the one by Strikwerda) have chapters on why central finite differences fail and why you would need an upwind-based method.<div>
<br></div><div>Mohammad<br><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 4:24 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Wed, Feb 22, 2012 at 18:15, Patrick Alken <span dir="ltr"><<a href="mailto:patrick.alken@colorado.edu" target="_blank">patrick.alken@colorado.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">Yes I mean the direct solver residual is around 10e-15. The PETSc
residual is 4e00</div></blockquote><div><br></div></div><div>Did you try -pc_type lu? </div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<div><blockquote type="cite"><div class="gmail_quote"><div>
</div>
<div>What sort of PDE are you solving?</div>
</div>
</blockquote>
<br></div>
The PDE is:<br>
<br>
grad(f) . B = g<br>
<br>
where B is a known vector field, g is a known scalar function, and f
is the unknown scalar function to be determined (I am discretizing
this equation for f in spherical coords)</div></blockquote></div></div><br><div>Also known as steady-state advection. This is the most famous test problem in which centered differences fails miserably. If you use an upwind method, it will be stable, but will also be first order. To get higher than first order accuracy, you need a nonlinear spatial discretization (see Godunov's Theorem, "total variation diminishing", or "total variation bounded").</div>
</blockquote></div><br></div></div>