To set options on the solvers for each block append -fieldsplit_ to all the PC options database keys. For example, -fieldsplit_pc_type ilu -fieldsplit_pc_factor_levels 1
To set the options on the solvers separate for each block call PCFieldSplitGetSubKSP() and set the options directly on the resulting KSP object
-pc_fieldsplit_%d_fields <a,b,..> | - indicates the fields to be used in the %d'th split | |
-pc_fieldsplit_default | - automatically add any fields to additional splits that have not been supplied explicitly by -pc_fieldsplit_%d_fields | |
-pc_fieldsplit_block_size <bs> | - size of block that defines fields (i.e. there are bs fields) | |
-pc_fieldsplit_type <additive,multiplicative,schur,symmetric_multiplicative> | - . -pc_fieldsplit_schur_precondition <true,false> default is true | |
Options prefix for inner solvers when using Schur complement preconditioner are | - fieldsplit_0_ and -fieldsplit_1_ for all other solvers they are -fieldsplit_%d_ for the dth field, use -fieldsplit_ for all fields |
Notes: use PCFieldSplitSetFields() to set fields defined by "strided" entries and PCFieldSplitSetIS() to define a field by an arbitrary collection of entries.
If no fields are set the default is used. The fields are defined by entries strided by bs, beginning at 0 then 1, etc to bs-1. The block size can be set with PCFieldSplitSetBlockSize(), if this is not called the block size defaults to the blocksize of the second matrix passed to KSPSetOperators()/PCSetOperators().
Currently for the multiplicative version, the updated residual needed for the next field solve is computed via a matrix vector product over the entire array. An optimization would be to update the residual only for the part of the right hand side associated with the next field solve. (This would involve more MatGetSubMatrix() calls or some other mechanism to compute the part of the matrix needed to just update part of the residual).
For the Schur complement preconditioner if J = ( A B ) ( C D ) the preconditioner is (I -B inv(A)) ( inv(A) 0 ) (I 0 ) (0 I ) ( 0 inv(S) ) (-C inv(A) I ) where the action of inv(A) is applied using the KSP solver with prefix -fieldsplit_0_. The action of inv(S) is computed using the KSP solver with prefix -schur_. For PCFieldSplitGetKSP() when field number is 0 it returns the KSP associated with -fieldsplit_0_ while field number 1 gives -fieldsplit_1_ KSP. By default D is used to construct a preconditioner for S, use PCFieldSplitSchurPrecondition() to turn on or off this option.
If only one set of indices (one IS) is provided with PCFieldSplitSetIS() then the complement of that IS is used automatically for a second block.
Level:intermediate
Location:src/ksp/pc/impls/fieldsplit/fieldsplit.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages