[petsc-users] Advice Being Sought

Mark F. Adams mark.adams at columbia.edu
Mon Apr 22 07:16:26 CDT 2013


So it look alike your operator is not symmetric but is a scalar Laplacian with constant coefficients (?)

You should using AMG.  '-pc_type hypre' if you are configured with hypre and '-pc_type gamg' if not. 

On 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.
> 
> 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.
> <main_ns_hybrid_trimmed.F90><pressure_solver_trimmed.F90>



More information about the petsc-users mailing list