[petsc-users] left and right preconditioning with a constant null space

Klaij, Christiaan C.Klaij at marin.nl
Thu Mar 23 03:42:48 CDT 2017


Matt, Lawrence

The same problem happens when using gmres with rtol 1e-6 in the
schur complement (attachment "left_schur"). I'm not sure what
this tells us. If I understand Lawrence correctly, the null space
may be attached to the wrong matrix (A11 instead of Sp)?

Chris

dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44 | C.Klaij at marin.nl<mailto:C.Klaij at marin.nl> | www.marin.nl<http://www.marin.nl>

[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia>  [Twitter] <https://twitter.com/MARIN_nieuws>  [Facebook] <https://www.facebook.com/marin.wageningen>
MARIN news: Project Manager Veiligheids- en Verkeersstudies en Specialist Human Performance<http://www.marin.nl/web/News/News-items/Project-Manager-Veiligheids-en-Verkeersstudies-en-Specialist-Human-Performance.htm>

________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: Wednesday, March 22, 2017 5:39 PM
To: Klaij, Christiaan
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] left and right preconditioning with a constant null space

On Wed, Mar 22, 2017 at 4:04 PM, Klaij, Christiaan <C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>> wrote:

Thanks Matt, I will try your suggestion and let you know. In the
meantime this is what I did to set the constant null space:

call MatNullSpaceCreate(MPI_COMM_WORLD,PETSC_TRUE,0,PETSC_NULL_OBJECT,nullsp,ierr); CHKERRQ(ierr)
call MatSetNullSpace(aa_sub(4),nullsp,ierr); CHKERRQ(ierr)
call MatNullSpaceDestroy(nullsp,ierr); CHKERRQ(ierr)

where aa_sub(4) corresponds to A11. This is called before
begin/end mat assembly.

Hmm, I wonder if the problem is that A11 has the nullspace, but the PC pmat is actually B^T diag(A)^{-1} B. I have
to look where the solver is actually taking the nullspace from. We need to improve the -ksp_view output to make this
stuff much easier to see.

   Matt


Chris


dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44<tel:+31%20317%20493%20344> | C.Klaij at marin.nl<mailto:C.Klaij at marin.nl> | www.marin.nl<http://www.marin.nl>

[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia>  [Twitter] <https://twitter.com/MARIN_nieuws>  [Facebook] <https://www.facebook.com/marin.wageningen>
MARIN news: Software seminar in Shanghai for the first time, March 28<http://www.marin.nl/web/News/News-items/Software-seminar-in-Shanghai-for-the-first-time-March-28.htm>

________________________________
From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Sent: Wednesday, March 22, 2017 4:47 PM
To: Klaij, Christiaan
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] left and right preconditioning with a constant null space

On Wed, Mar 22, 2017 at 2:58 PM, Klaij, Christiaan <C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>> wrote:
I'm solving the Navier-Stokes equations using PCFieldSplit type
Schur and Selfp. This particular case has only Neumann conditions
for the pressure field.

With left preconditioning and no nullspace, I see that the KSP
solver for S does not converge (attachment "left_nonullsp") in
either norm.

When I attach the constant null space to A11, it gets passed on
to S and the KSP solver for S does converge in the preconditioned
norm only (attachment "left").

However, right preconditioning uses the unpreconditioned norm and
therefore doesn't converge (attachment "right"), regardless of
whether the nullspace is attached or not. Should I conclude that
right preconditioning cannot be used in combination with a null
space?

No, neither of your solves is working. The left preconditioned version is just hiding that fact.

You should start by checking that the exact solve works. Namely full Schur factorization
with exact solves for A and S. Since you do not have a matrix for S (unless you tell it do
use "full"), just use a very low (1e-10) tolerance. My guess is that something is off with
your null space specification.

  Thanks,

     Matt

Chris


dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44<tel:%2B31%20317%2049%2033%2044> | mailto:C.Klaij at marin.nl<mailto:C.Klaij at marin.nl> | http://www.marin.nl

MARIN news: http://www.marin.nl/web/News/News-items/H2020-marinergi-project-launched.htm




--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagef3a480.PNG
Type: image/png
Size: 331 bytes
Desc: imagef3a480.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image9d5515.PNG
Type: image/png
Size: 333 bytes
Desc: image9d5515.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image38eecd.PNG
Type: image/png
Size: 293 bytes
Desc: image38eecd.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagec62fb8.PNG
Type: image/png
Size: 253 bytes
Desc: imagec62fb8.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagebda5f2.PNG
Type: image/png
Size: 293 bytes
Desc: imagebda5f2.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image41c9af.PNG
Type: image/png
Size: 331 bytes
Desc: image41c9af.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagec69863.PNG
Type: image/png
Size: 333 bytes
Desc: imagec69863.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagefefa51.PNG
Type: image/png
Size: 253 bytes
Desc: imagefefa51.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: left_schur
Type: application/octet-stream
Size: 13478 bytes
Desc: left_schur
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170323/acdae728/attachment-0001.obj>


More information about the petsc-users mailing list