[petsc-users] Preconditioning in SNES
Jed Brown
jedbrown at mcs.anl.gov
Tue Nov 1 10:21:07 CDT 2011
On Tue, Nov 1, 2011 at 08:10, Konstantinos Kontzialis <ckontzialis at lycos.com
> wrote:
> I use SNES to solve an implicit time marching formulation for the NS
> equations of gas dynamics using the discontinuous Galerkin discretization.
> I use a matrix-free formulation with a preconditioner coreesponding to the
> Jacobian of the system,
>
How are you applying the action of the operator and how are you building
the preconditioner? Finite differencing can be noisy due to rounding error.
> but during the Newton solution just from the 1st step I get the following:
>
> 0 KSP preconditioned resid norm 9.356767598746e+00 true resid norm
> 9.356767598746e+00 ||Ae||/||Ax|| 1.000000000000e+00
> 1 KSP preconditioned resid norm 4.281908138930e-15 true resid norm
> 3.150842395998e-15 ||Ae||/||Ax|| 3.367447532223e-16
> Linear solve converged due to CONVERGED_RTOL iterations 1
>
>
> Timestep 0: dt = 0.002, T = 0, Res[rho] = 1.22465e-16, Res[rhou] =
> 0.00215905, Res[rhov] = 1.61374e-08, Res[E] = 2.78002e-07, CFL = 399.998
>
Looking at the sizes of the residuals here, it looks like the equations are
poorly scaled. You should be shooting for values for each state variable
and residuals for each equation to have similar scales. Are you working in
SI units, perhaps?
>
> As you may see on the 2nd Newton iteration the linear system solution does
> not converge. I use the following arguments to start the computation:
>
> mpiexec -n 8 ./hoac blasius -llf_flux -n_out 1 -end_time 10000.0 -implicit
> -implicit_type 6 -pc_type asm -sub_pc_type ilu -snes_mf_operator
> -snes_max_fail 500 -snes_monitor -snes_stol 1.0e-50 -ksp_right_pc
> -snes_converged_reason -ksp_gmres_restart 30 -snes_max_linear_solve_fail
> 500 -sub_pc_factor_levels 2 -snes_max_it 1000 -sub_pc_factor_mat_ordering_
> **type rcm -dt 2.e-3 -snes_rtol 1.0e-8 -gl -snes_converged_reason
> -ksp_converged_reason -ksp_monitor_true_residual
>
What version of PETSc are you using? The option is spelled "-ksp_pc_side
right" now. That might explain why the preconditioned and true residuals
are so different in your convergence logs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111101/f7942913/attachment.htm>
More information about the petsc-users
mailing list