petsc-3.7.7 2017-09-25
Report Typos and Errors


Sets the fields for one particular split in the field split preconditioner


#include "petscpc.h" 
PetscErrorCode  PCFieldSplitSetFields(PC pc,const char splitname[],PetscInt n,const PetscInt *fields,const PetscInt *fields_col)
Logically Collective on PC

Input Parameters

pc - the preconditioner context
splitname - name of this split, if NULL the number of the split is used
n - the number of fields in this split
fields - the fields in this split

Notes: Use PCFieldSplitSetIS() to set a completely general set of indices as a field.

The PCFieldSplitSetFields() is for defining fields as strided blocks. For example, if the block size is three then one can define a field as 0, or 1 or 2 or 0,1 or 0,2 or 1,2 which mean 0xx3xx6xx9xx12 ... x1xx4xx7xx ... xx2xx5xx8xx.. 01x34x67x... 0x1x3x5x7.. x12x45x78x.... where the numbered entries indicate what is in the field.

This function is called once per split (it creates a new split each time). Solve options for this split will be available under the prefix -fieldsplit_SPLITNAME_.

Developer Note: This routine does not actually create the IS representing the split, that is delayed until PCSetUp_FieldSplit(), because information about the vector/matrix layouts may not be available when this routine is called.

See Also

PCFieldSplitGetSubKSP(), PCFIELDSPLIT, PCFieldSplitSetBlockSize(), PCFieldSplitSetIS()

Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages