Rakesh,

   LSQR takes a square matrix from which to build a preconditioner.  When you 
call KSPSetOperators( ...   Rectangular, Square...) where Square is generally 
Rectangular transpose  * Rectangular.  LSQR essentially solves the normal 
equations so it makes sense to use for a preconditioner the normal equations 
matrix. Note that Square is a small matrix compared to Rectangular.

   You can use with this KSP now any preconditioner which is applied to the 
Square matrix, -pc_type lu, jacobi, gamg, ... 

  Barry


> On Nov 1, 2020, at 10:20 PM, Rakesh Halder <[email protected]> wrote:
> 
> Hi all,
> 
> I'm implementing an algorithm using PETSc that involves solving a linear 
> system Ax=b where A is a rectangular (non-square) matrix. I'm currently using 
> KSP to solve this system using the CGLS method, but want to improve the 
> performance. I've tried using a direct solver (PCLU with KSPPREONLY), but 
> this seems to only work for square matrices. I'm wondering what methods are 
> available in PETSc for preconditioning rectangular matrices so they can be 
> solved directly through some factorization or with an iterative method like 
> LSQR.
> 
> Thanks,
> 
> Rakesh

Reply via email to