[petsc-users] Advice Being Sought
Matthew Knepley
knepley at gmail.com
Mon Apr 22 07:12:48 CDT 2013
On Mon, Apr 22, 2013 at 7:56 AM, David Scott <d.scott at ed.ac.uk> wrote:
> Hello,
>
> I am working on a fluid-mechanical code to solve the two-phase
> Navier–Stokes equations with levelset interface capturing. I have been
> asked to replace the pressure calculation which uses the SOR and Jacobi
> iterative schemes with a Krylov subspace method. I have done this and the
> code is working but as I have never used PETSc before I would like to know
> if improvements to my code, or the run time parameters that I am using,
> could be made.
>
> I am using GMRES with a Block Jacobi pre-conditioner. I have tried
> Conjugate Gradient with a Block Jacobi pre-conditioner but it diverges. If
> I use GMRES for the first few thousand time steps and then swap to CG it
> does converge but the speed of execution is somewhat reduced.
>
Krylov methods do not work with preconditioners. You have a Poisson
problem, so as abundantly documented in the literature, you should use
multigrid. The easiest thing to try is
-pc_type gamg -pc_gamg_agg_nsmooths 1
Thanks,
Matt
> I have attached relevant excerpts from the code.
>
> Yours sincerely,
>
> David Scott
> --
> Dr. D. M. Scott
> Applications Consultant
> Edinburgh Parallel Computing Centre
> Tel. 0131 650 5921
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130422/945336bd/attachment-0001.html>
More information about the petsc-users
mailing list