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

Klaij, Christiaan C.Klaij at marin.nl
Thu Mar 23 10:37:01 CDT 2017


Lawrence,

Yes, that's clearer, thanks! I do have is0 and is1 so I can try
PetscObjectCompose and let you know.

Note though that the viewer reports that both S and A11 have a
null space attached... My matrix is a matnest and I've attached a
null space to A11, so the latter works as expected. But is the viewer
wrong for S?

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/Project-Manager-Veiligheids-en-Verkeersstudies-en-Specialist-Human-Performance.htm

________________________________________
From: Lawrence Mitchell <lawrence.mitchell at imperial.ac.uk>
Sent: Thursday, March 23, 2017 11:57 AM
To: Klaij, Christiaan; Matthew Knepley
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] left and right preconditioning with a constant null space

On 23/03/17 08:42, Klaij, Christiaan wrote:
> 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)?

I think I misread the code.

Because you can only attach nullspaces to either Amat or Pmat, you
can't control the nullspace for (say) Amat[1,1] or Pmat[1,1] because
MatCreateSubMatrix doesn't know anything about nullspaces.

So the steps inside pcfieldsplit are:

createsubmatrices(Amat) -> A, B, C, D

setup schur matrix S <= D - C A^{-1} B

Transfer nullspaces onto S.

How to transfer the nullspaces?  Well, as mentioned, I can't put
anything on the submatrices (because I have no way of accessing them).
 So instead, I need to hang the nullspace on the IS that defines the S
block:

So if you have:

is0, is1

You do:

PetscObjectCompose((PetscObject)is1, "nullspace", nullspace);

Before going into the preconditioner.

If you're doing this through a DM, then DMCreateSubDM controls the
transfer of nullspaces, the default implementation DTRT in the case of
sections.  See DMCreateSubDM_Section_Private.

Clearer?

Lawrence



More information about the petsc-users mailing list