[petsc-users] Is it possible to create a BAIJ matrix with non-square blocks?

Jed Brown jed at jedbrown.org
Fri May 23 00:14:32 CDT 2014


"Robinson-Mosher, Avram Lev" <avi.mosher at wyss.harvard.edu> writes:

> Hi all, I'm interested in using PETSc's sparse matrices with block
> elements, but I would like the elements to be small non-square
> matrices (e.g., 4 by 3).  Is this possible?  I see that the general
> construction functions assume that the elements will be square.

The constant block-size matrices are only for square blocks.  But you
can often get some benefits by using AIJ matrices with Inodes (default).
So just create an AIJ matrix with fields interlaced so that 4x3 blocks
exist, then PETSc will coalesce the consecutive rows with identical
sparsity pattern, making the result similar to 4x1 blocks.  This already
provides most of the bandwidth benefit of blocked matrices.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140522/cbc32ae2/attachment.pgp>


More information about the petsc-users mailing list