[petsc-dev] Note about CPR preconditioner in PCFIELDSPLIT man page?
Mills, Richard Tran
rtmills at anl.gov
Wed Feb 20 13:21:43 CST 2019
Folks,
There is a note in the PCFIELDSPLIT manual page about implementing a so-called "Constrained Pressure Residual" (CPR) preconditioner:
"The Constrained Pressure Preconditioner (CPR) can be implemented using PCCOMPOSITE<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCCOMPOSITE.html#PCCOMPOSITE> with PCGALERKIN<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGALERKIN.html#PCGALERKIN>. CPR first solves an R A P subsystem, updates the residual on all variables (PCCompositeSetType<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCCompositeSetType.html#PCCompositeSetType>(pc,PC_COMPOSITE_MULTIPLICATIVE<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCCompositeType.html#PCCompositeType>)), and then applies a simple ILU like preconditioner on all the variables."
I'm not sure why there is a reference to PCGALERKIN in there. Although CPR *is* using a Galerkin-type projection, I believe that this can all be set up on the command line by using PCFIELDSPLIT and PCCOMPOSITE. It seems that CPR preconditioners are defined in a few different ways, but I believe I can set up something like this in PFLOTRAN (where field 0 is pressure, 1 saturation, and 2 is temperature) by doing something like this:
-flow_ksp_type fgmres -flow_pc_type composite \
-flow_pc_composite_type multiplicative -flow_pc_composite_pcs fieldsplit,bjacobi \
-flow_sub_0_ksp_type fgmres -flow_sub_0_pc_fieldsplit_type additive \
-flow_sub_0_pc_fieldsplit_0_fields 0 -flow_sub_0_pc_fieldsplit_1_fields 1,2 \
-flow_sub_0_fieldsplit_0_ksp_type richardson -flow_sub_0_fieldsplit_1_ksp_type preonly \
-flow_sub_0_fieldsplit_0_pc_type hypre -flow_sub_0_fieldsplit_0_pc_hypre_type boomeramg \
-flow_sub_0_fieldsplit_1_pc_type none -flow_sub_0_fieldsplit_1_sub_pc_type none \
-flow_sub_0_fieldsplit_1_ksp_max_it 10 -flow_sub_1_sub_pc_type ilu
Am I missing something? If the above setup is correct, it seems like the mention of PCGALERKIN is a bit confusing, since this is the PCFIELDSPLIT man page.
--Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190220/3b09e643/attachment.html>
More information about the petsc-dev
mailing list