[petsc-users] How to use the matrix format of block compressed row (MATBAIJ)

Jed Brown jed at 59A2.org
Mon Jun 28 12:42:19 CDT 2010


On Mon, 28 Jun 2010 17:14:02 +0000, "Li, Zhisong (lizs)" <lizs at mail.uc.edu> wrote:
>  Hi, Petsc Team,
> 
> The PETSC user manual says that the matrix format of block compressed
> row (BAIJ) will be more efficient than the default AIJ format for
> problems with multiple DOF. But the description of using BAIJ matrix
> is very limited in the manual. When trying to replace AIJ with BAIJ in
> the code of iterative solver, I often meet the errors " No support for
> this operation for this object type!", " Matrix format mpibaij does
> not have a built-in PETSc direct solver! ". I think something must be
> missing here when we change the format.

This is the fault of the "MPI" not the "B", PETSc does not have a native
parallel direct solver, you can use PCREDUNDANT or external packages
(like MUMPS or SuperLU_Dist).  Note that most external packages don't
support block formats at all, so you should just use AIJ (or perhaps
SBAIJ(1) for symmetric problems) if you need to use parallel direct
solvers.

Note that you can use MatSetBlockSize to set a block size for AIJ and
use MatSetValuesBlocked, then you can change the matrix format at
runtime (depending on which solver you are trying).  DAGetMatrix does
this, you should definitely use it if you are using a DA in a
conventional way.

Jed


More information about the petsc-users mailing list