Re: [petsc-dev] Nullspace with right preconditioning
Matthew Knepley <[email protected]> writes:
On Wed, Apr 4, 2018 at 3:23 PM, Smith, Barry F. <[email protected]> wrote:
It may not be broken; it may just be misunderstood or incorrect approach.
You'll need to explain why and where exactly you think it is broken.
I am solving Stokes. I will push the example for you to run tonight. Basically, I put in a constant for the pressure as the nullspace. If you run with gmres/left it gives back a pressure with integral 0. If you run with gmres/right, it gives back a pressure with a big integral.
The code makes the Krylov basis orthogonal to the null space. With right preconditioning, the solution is x = P^{-1} y for some y in the Krylov space. I don't know how to easily make x orthogonal to the null space so you probably have to project it out after the solve. Note that discrete pressure has sum 0, but the continuous integral of pressure is generally not 0 (unless on a uniform grid). If you want the latter, you'll to do the explicit projection.
participants (1)
-
Jed Brown