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

Matthew Knepley knepley at gmail.com
Wed Mar 22 11:39:00 CDT 2017


On Wed, Mar 22, 2017 at 4:04 PM, Klaij, Christiaan <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 <+31%20317%20493%20344> | C.Klaij at marin.nl |
> www.marin.nl
>
> [image: LinkedIn] <https://www.linkedin.com/company/marin> [image:
> YouTube] <http://www.youtube.com/marinmultimedia> [image: Twitter]
> <https://twitter.com/MARIN_nieuws> [image: 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>
> 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 | mailto:C.Klaij at marin.nl |
>> http://www.marin.nl
>>
>> MARIN news: http://www.marin.nl/web/News/News-items/H2020-marinergi-proj
>> ect-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/20170322/f52344b1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagef3a480.PNG
Type: image/png
Size: 331 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170322/f52344b1/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image9d5515.PNG
Type: image/png
Size: 333 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170322/f52344b1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image38eecd.PNG
Type: image/png
Size: 293 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170322/f52344b1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagec62fb8.PNG
Type: image/png
Size: 253 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170322/f52344b1/attachment-0003.png>


More information about the petsc-users mailing list