Run for one time-step with -ts_view so we can see exactly what solver 
options you are using. 

    Then run with the additional options -ksp_pc_side right 
-ts_max_snes_failures -1


> On Jun 2, 2015, at 12:26 PM, Italo Tasso <[email protected]> wrote:
> 
> I made a code to solve the Navier-Stokes equations, incompressible, 
> non-linear, all coupled, finite differences, staggered grid.
> 
> I am running the code with:
> 
> -ts_monitor -snes_monitor -ksp_monitor_true_residual -snes_converged_reason 
> -ksp_converged_reason -pc_type fieldsplit -pc_fieldsplit_type schur 
> -pc_fieldsplit_detect_saddle_point
> 
> It works very well most of the time. But in some cases, the solver halts for 
> a long time then KSP does not converge. 
> 
> See output1.txt. It seems that the residual is already very small, close to 
> machine zero, but KSP doesn't stop.
> 
> So I added -ksp_atol 1e-10. See output2.txt. Now it fails on a different time 
> step.
> 
> I also tried -ksp_norm_type unpreconditioned. It works for this case (grid 
> size), but fail for other cases.
> 
> I also tried building the Jacobian and including null space. It fixes some 
> cases but causes others that worked before to fail. Seems really random.
> 
> It feels like this is related to the PC, because the code halts for a long 
> time at the first KSP step, then diverges.
> 
> Any suggestions?
> <output1.txt><output2.txt>

Reply via email to