On Sat, Aug 02, 2008 at 11:04:06AM +0100, Stephan Kramer wrote: >> I am trying to use CG to solve a singular systems (i.e. Poisson >> equation with periodic conditions on all boundaries). >> >> The code works when I use GMRES, but it diverges when I switch CG. >> >> Since the null space is a constant vector, in the code I have: >> > I might be missing something here, but aren't linearly varying vectors > in your null space as well?
By 'constant vector', I meant that the null space vector has the form: c * [ 1 1 ... 1 ]^T where c is an arbitray real number (^T = transpose). Linearly varying (in space) vectors do not satisfy the periodic boundary condition -- so they are not part of the solutions. Thanks, Shao-Ching
