[petsc-users] Null spaces with fieldsplit preconditioning

Matthew Knepley knepley at gmail.com
Wed Mar 12 07:10:08 CDT 2014

On Wed, Mar 12, 2014 at 6:44 AM, Lawrence Mitchell <
lawrence.mitchell at imperial.ac.uk> wrote:

> Hello,
> I have a mixed FEM system, for which the null space is constant
> functions in one of the sub spaces.  That is, I have W = V * Q and the
> null space is a constant function in Q (and zero in V).  If I assemble
> the operator, I get a block structure:
> X = [A B,
>      C D]
> When I solve this monolithically, I project the null space out by
> attaching it to X.  However, if I use Schur complement preconditioning,
> then S = D - C Ainv B has a null space of the constant functions as
> well.  Do I therefore need to attach null spaces to both X and S in this
> case, or will attaching it to X be enough?  If I do need to hang
> something on S, is there an easy way to do it?

Here are two ways to do this, depending on how you manage your fields. At
lowest level, an IS defines the field in PCFIELDSPLIT. So you can attach
MatNullSpace that way

  PetscObjectCompose(isD, "nullspace", nullspace)

of if you use a DM, you can say

  DMGetField(dm, 1, &obj);
  PetscObjectCompose(obj, "nullspace", nullspace)

This is also how we pass in "nearsullspace" for AMG, and "pmat" for a
preconditioning operator.



> Lawrence

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/20140312/fb43fff6/attachment.html>

More information about the petsc-users mailing list