[petsc-users] Preconditioning in SNES

Jed Brown jedbrown at mcs.anl.gov
Thu Nov 3 00:44:03 CDT 2011


On Tue, Nov 1, 2011 at 12:01, Konstantinos Kontzialis <ckontzialis at lycos.com
> wrote:

> 1. I use 3.1 version of petsc.
>

please upgrade to 3.2 when you can


> 2. I run the problem with snes_fd and pc_type lu
> 3. I use a nondimensional form of the NS equations
> 4. I do not specify any user defined procedure for applying the
> preconditioner. I leave petsc to deal with this.
>
> With snes_fd I got the following results:
>
> Timestep   0: dt = 0.002, T = 0, Res[rho] = 1.06871e-16, Res[rhou] =
> 0.00215523, Res[rhov] = 1.61374e-08, Res[E] = 6.17917e-07, CFL = 399.998
>
>
> /*********************Stage 1 of SSPIRK (6,4)******************/
>
>  0 SNES Function norm 1.153030915909e-02
>    0 KSP preconditioned resid norm 1.153030915909e-02 true resid norm
> 1.153030915909e-02 ||A||/||Ax|| 1.000000000000e+00
>    1 KSP preconditioned resid norm 1.998438714390e-11 true resid norm
> 1.998438714940e-11 ||Ae||/||Ax|| 1.733204797344e-09
>
> Linear solve converged due to CONVERGED_RTOL iterations 1
>  1 SNES Function norm 1.908346652619e-08
>    0 KSP preconditioned resid norm 1.908346652619e-08 true resid norm
> 1.908346652619e-08 ||Ae||/||Ax|| 1.000000000000e+00
>    1 KSP preconditioned resid norm 1.407495233141e-08 true resid norm
> 2.936727417791e-08 ||Ae||/||Ax|| 1.538885722759e+00
>    2 KSP preconditioned resid norm 1.983096664116e-16 true resid norm
> 4.111894600521e-03 ||Ae||/||Ax|| 2.154689555421e+05
>

This looks like a singular preconditioner. Suggest checking the
implementation of boundary conditions. Also try -ksp_type fgmres.


> My function for computing the residual of the system has the following
> form:
>
> F(u) = Mu + R(u),
>
> where M is the mass matrix of the system and R(u) the residual and u is
> the solution.
>

This does not look right. I would expect

M udot = R_u(u,p)
0 = R_p(u)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111102/fe8a15bd/attachment.htm>


More information about the petsc-users mailing list