<div class="gmail_quote">On Tue, Nov 1, 2011 at 08:10, Konstantinos Kontzialis <span dir="ltr">&lt;<a href="mailto:ckontzialis@lycos.com">ckontzialis@lycos.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":16i"> 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,</div>
</blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":16i"> but during the Newton solution just from the 1st step I get the following:<br>
<br>
 0 KSP preconditioned resid norm 9.356767598746e+00 true resid norm 9.356767598746e+00 ||Ae||/||Ax|| 1.000000000000e+00<br>
  1 KSP preconditioned resid norm 4.281908138930e-15 true resid norm 3.150842395998e-15 ||Ae||/||Ax|| 3.367447532223e-16<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
<br>
<br>
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<br></div></blockquote><div><br></div><div>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?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":16i">
<br>
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:<br>
<br>
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_<u></u>type rcm -dt 2.e-3 -snes_rtol 1.0e-8 -gl -snes_converged_reason -ksp_converged_reason -ksp_monitor_true_residual<br>
</div></blockquote><div><br></div><div>What version of PETSc are you using? The option is spelled &quot;-ksp_pc_side right&quot; now. That might explain why the preconditioned and true residuals are so different in your convergence logs.</div>
</div>