<div class="gmail_quote">On Wed, Feb 22, 2012 at 18:15, Patrick Alken <span dir="ltr">&lt;<a href="mailto:patrick.alken@colorado.edu">patrick.alken@colorado.edu</a>&gt;</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>Did you try -pc_type lu? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<div class="im"><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><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&#39;s Theorem, &quot;total variation diminishing&quot;, or &quot;total variation bounded&quot;).</div>