Sudden random deviation of results

Matthew Knepley knepley at
Thu Dec 7 08:04:25 CST 2006

No, this sounds like a bug in the code. You probably are overwriting
memory somewhere.


On 12/7/06, Ben Tay <zonexo at> wrote:
> Hi,
> I have been using a few different Krylov linear solver package such as
> nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver
> momentum and poisson eqn. For moving bodies simulation, while solving the
> poisson eqn, sometimes the result suddenly changes drastically, although the
> iterations seems to have converged  e.g. at the previous time step,
> everything is fine, but at the next time step, the velocity suddenly
> explodes from 2-3 to 20-30+.
> The strange thing is that this deviation happens at different time step for
> different linear solver package ie for nspcg, it happens at time=20 but for
> petsc, it happens at time=40. It seems "random" in this sense. Changing the
> type of solver such as gmres or bcgs does not change the time of deviation.
> Does anyone know why this is happening? Is it a characteristic of krylov
> solver to happen once in a while? It does not happen in the stationary body
> simulation though.

"Failure has a thousand explanations. Success doesn't need one" -- Sir
Alec Guiness

More information about the petsc-users mailing list