[petsc-users] [petsc-maint] A question on Schur complement

Smith, Barry F. bsmith at mcs.anl.gov
Fri Jan 26 13:25:06 CST 2018



> On Jan 26, 2018, at 1:18 PM, saturday luis <luis.saturday at gmail.com> wrote:
> 
> Hi PETSc team:
> 
> I want to consult for a good way of doing an approximated Schur complement matrix. So I just want to handle a matrix in the format C + B^t B, or sometimes B^t B.
> 
> An easy way is to run with the MatCreateSchurComplement to create C + B^t inv A B, wherein A is an identity matrix. The downside is that the matrix free style does not allow for algebraic preconditioners.
> 
> Another way is to generate the matrix B^t B. For my case, I checked the sparsity of the resulting matrix from MatMatMult and it is pretty sparse still. I found a similar approach in 
> http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex70.c.html
> where the B^t B matrix is created explicitly (line 367-388). However, there is a line of comment saying  " in real life this matrix would be build directly without MatMatMult". So I just want to ask the best way of assemblying and solving the B^t B matrix.

   Using the product is best.  You can ignore the comment.

   The comment is attempting to indicate that one can build the matrix from which the preconditioner is to be constructed by explicitly forming a matrix based on the specific problem at hand.

   Barry


> 
> Thanks,
> 
> Luis 



More information about the petsc-users mailing list