[petsc-users] HYPRE hanging or slow? from observation

Mark Adams mfadams at lbl.gov
Mon Oct 23 09:23:36 CDT 2017


On Mon, Oct 23, 2017 at 10:04 AM, Hao Zhang <hbcbh1999 at gmail.com> wrote:

> The big picture is I'm solving 3d incompressible Navier-Stokes Equations
> using staggered/MAC grid with Finite Difference Method. The particular
> function is poisson pressure solver or Laplacian Mark Adam mentioned. The
> simulation runs fine for medium size mesh grid. When I try harder to go
> very fine grid, not DNS level, I'm having some difficulties to have meaning
> physical results.
>

I assume that you are getting good solutions when the solver is converging
well.

I would not trust that your solution is ever accurate (converged) when you
see this (stagnation), unless you get the true residual way, way down. How
low do you get the true residual?

  0 KSP preconditioned resid norm 1.630377897956e+01 true resid norm
7.365742695123e+00 ||r(i)||/||b|| 1.000000000000e+00
  1 KSP preconditioned resid norm 3.815819909205e-02 true resid norm
7.592300567353e-01 ||r(i)||/||b|| 1.030758320187e-01
  2 KSP preconditioned resid norm 4.312671277701e-04 true resid norm
2.553060965521e-02 ||r(i)||/||b|| 3.466128360975e-03
  3 KSP preconditioned resid norm 3.011875330569e-04 true resid norm
6.836208627386e-04 ||r(i)||/||b|| 9.281085303065e-05
  4 KSP preconditioned resid norm 3.011783821295e-04 true resid norm
2.504661140204e-04 ||r(i)||/||b|| 3.400418998972e-05
  5 KSP preconditioned resid norm 3.011783818372e-04 true resid norm
2.504053673004e-04 ||r(i)||/||b|| 3.399594279422e-05
  6 KSP preconditioned resid norm 3.011783818375e-04 true resid norm
2.503984078890e-04 ||r(i)||/||b|| 3.399499795925e-05

I would take the first test case (smallest) in which you can see
"nonphysical results", use GMRES and ILU with lots of iterations, or a
direct solver ideally, and get a good solution. If you can not get a good
solution then do not worry about multigrid convergence.

One possibility is that you solution is going crazy and your density is
getting non-smooth and thus the coefficients in the pressure solve are
getting large and non-smooth (I assume you have the density term in the
pressure solve). This would cause a problem for multigrid.



> All PETSc solvers converge but come with huge iterations. That's when/how
> I started using HYPRE.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171023/f4714db9/attachment.html>


More information about the petsc-users mailing list