[petsc-users] Block size

Barry Smith bsmith at mcs.anl.gov
Thu Oct 9 03:19:16 CDT 2014


On Oct 9, 2014, at 3:12 AM, Natacha BEREUX <natacha.bereux at gmail.com> wrote:

> Dear PETSc users, 
> 
> I am a bit confused  about blocksizes in MPI matrices. 
> 
> I define a MPI matrix A with a certain blocksize, let say bs = 3. 
> As far as I understand, the sparse pattern of the matrix A is made of square blocks of size 3x3, regardless of the actual values of the terms of  A.  
> Am I right ? 

   Only if you use the BAIJ or SBAIJ matrix format. If you use AIJ then it still stores the values without regard to the block size but it carries knowledge of the block size around and that gets used in some places such as the GAMG solver.
> 
> The matrix A is distributed among several processors: does the local number of rows of A on each processor have to be a multiple of bs   ? 

  Correct
> 
> I want to use a multigrid preconditionner to  solve the linear system of matrix A : A x = b
> Is it mandatory to define the right hand side b as a vector with the same blocksize bs=3 ? 

  It probably doesn’t matter, but if you know something has an associated block size it is generally best to capture it as soon as you can in the problem.

   Barry

> 
> Thank you very much of your help, 
> Best regards, 
> Natacha 



More information about the petsc-users mailing list