[petsc-dev] field split/schur complement, incompressible flow

Jed Brown jed at 59A2.org
Wed May 12 11:17:28 CDT 2010


On Wed, 12 May 2010 09:32:23 -0500, Chris Kees <christopher.e.kees at usace.army.mil> wrote:
> Thanks a lot. Does PCFieldSplitSetFields() implicitly number the  
> fields it creates or am I missing something more fundamental e.g.
> 
> PCFieldSplitSetFields(pc,isPressure)// field 0 for pressure
> PCFieldSplitSetIS(pc,isVelocity)//field 1 for the 3 velocity components

You use *either* PCFieldSplitSetFields() or PCFieldSplitSetIS().  If
your matrix has a "block size" (e.g. it's BAIJ or you called
MatSetBlockSize) then you can define the split at runtime:

  -pc_fieldsplit_0_fields 0     # pressure is in the first split
  -pc_fieldsplit_1_fields 1,2,3 # velocity in the second split

You can set this programmatically with, e.g.

  PCFieldSplitSetFields(pc,1,(PetscInt[]){0});
  PCFieldSplitSetFields(pc,3,(PetscInt[]){1,2,3});

If your spatial discretization does not have a natural block size, you
should call PCFieldSplitSetIS() for both fields.

Jed



More information about the petsc-dev mailing list