[petsc-users] Using MATAIJ and MATSBAIJ
Smith, Barry F.
bsmith at mcs.anl.gov
Tue Jun 11 11:00:39 CDT 2019
Do you mean A * X where A is sparse and X is dense where the result is dense or X * A where the result is dense?
We have code for A * X that is reasonably efficient. The second case I don't know how to do efficient.
> On Jun 11, 2019, at 9:03 AM, Chih-Chuen Lin via petsc-users <petsc-users at mcs.anl.gov> wrote:
>
> Dear PETSc users,
>
> I am Ian. I trying to implement a solver which involves a sparse symmetric matrix A multiplied by a dense matrix X. And because of the nature of the problem, the bandwidth of the matrix A would be kind of large.For A*X, I am thinking using reverse Cuthill-Mckee algorithm to reduce the bandwidth.
>
> Are the following approach reasonable, or do you have a better advice?
>
> 1. Use MatGetOrdering to get a MATORDERINGRCM ordering, and MatPermute to create a new with it.
>
> 2. What’s the difference by using MATAIJ and MATBAIJ in terms of the entry insertion and computation and MPI efficiency for a sparse-dense matrix multiplication? Would it be better to use MATSBAIJ in terms of the computational efficiency?
>
> Thanks,
> Ian
More information about the petsc-users
mailing list