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

Klaij, Christiaan C.Klaij at marin.nl
Wed Mar 22 11:04:42 CDT 2017


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.

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: 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>
Sent: Wednesday, March 22, 2017 4:47 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 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170322/a41777c0/attachment-0001.html>
-------------- 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/20170322/a41777c0/attachment-0004.png>
-------------- 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/20170322/a41777c0/attachment-0005.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/20170322/a41777c0/attachment-0006.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/20170322/a41777c0/attachment-0007.png>


More information about the petsc-users mailing list