[petsc-users] ksppreonly question
Jed Brown
jedbrown at mcs.anl.gov
Fri Sep 21 17:26:31 CDT 2012
On Fri, Sep 21, 2012 at 5:21 PM, Shao-Ching Huang <huangsc at gmail.com> wrote:
> In this particular finite volume discretization, the flux normal to a
> face involves the cell-center values on each side of the face (1),
> plus values from neighboring nodes (2) [due to non-orthogonal mesh
> cell shape]. The A1 part include coefficients from (1). A2 includes
> those in (2).
>
1. Call KSPSetOperators(ksp,A,A1,flag)
You can make A in the above a MATSHELL that applies A1 + A2 matrix-free (or
just the A2 part).
2. Use any Krylov method. The specific method -ksp_type richardson will do
the defect-correction version of what you have written, but a real Krylov
method will almost certainly perform much better. Note that A1^{-1} will be
applied using whatever method you choose (via -pc_type). A V-cycle of
algebraic multigrid should work very well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120921/17947dfc/attachment.html>
More information about the petsc-users
mailing list