PETSc does not provide a parallel SOR, it can only be used on sequential matrices or as the subblock preconditioner when using block Jacobi or ASM preconditioning, see below.
The options for SOR
preconditioning are
ierr = PCSORSetOmega(PC pc,double omega); ierr = PCSORSetIterations(PC pc,int its); ierr = PCSORSetSymmetric(PC pc,MatSORType type);The first of these commands sets the relaxation factor for successive over (under) relaxation. The second command sets the number of inner iterations of SOR, given by its, to use between steps of the Krylov space method. The third command sets the kind of SOR sweep, where the argument type can be one of SOR_FORWARD_SWEEP, SOR_BACKWARD_SWEEP or SOR_SYMMETRIC_SWEEP, the default being SOR_FORWARD_SWEEP. Setting the type to be SOR_SYMMETRIC_SWEEP produces the SSOR method. In addition, each processor can locally and independently perform the specified variant of SOR with the types SOR_LOCAL_FORWARD_SWEEP, SOR_LOCAL_BACKWARD_SWEEP, and SOR_LOCAL_SYMMETRIC_SWEEP. These variants can also be set with the options -pc_sor_omega <omega>, -pc_sor_its <its>, -pc_sor_backward, -pc_sor_symmetric, -pc_sor_local_forward, -pc_sor_local_backward, and -pc_sor_local_symmetric.
The Eisenstat trick [5] for SSOR preconditioning can be employed with the method PCEISENSTAT ( -pc_type eisenstat). By using both left and right preconditioning of the linear system, this variant of SSOR requires about half of the floating-point operations for conventional SSOR. The option -pc_eisenstat_no_diagonal_scaling) (or the routine PCEisenstatNoDiagonalScaling()) turns off diagonal scaling in conjunction with Eisenstat SSOR method, while the option -pc_eisenstat_omega <omega> (or the routine PCEisenstatSetOmega(PC pc,double omega)) sets the SSOR relaxation coefficient, omega, as discussed above.