[petsc-users] Oscillations in finite difference solution

Jed Brown jedbrown at mcs.anl.gov
Wed Feb 22 18:24:09 CST 2012


On Wed, Feb 22, 2012 at 18:15, Patrick Alken <patrick.alken at colorado.edu>wrote:

> Yes I mean the direct solver residual is around 10e-15. The PETSc residual
> is 4e00
>

Did you try -pc_type lu?

>  What sort of PDE are you solving?
>
>
> The PDE is:
>
> grad(f) . B = g
>
> 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)
>

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").
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120222/4c25a073/attachment.htm>


More information about the petsc-users mailing list