[petsc-users] How to build compatible MPI matrix for dmplex

Duan Junming junming.duan at epfl.ch
Tue Jun 27 13:19:23 CDT 2023


Dear all,


I try to create a compatible sparse MPI matrix A with dmplex global vector x, so I can do matrix-vector multiplication y = A*x.

I think I can first get the local and global sizes of x on comm, say n and N, also sizes of y, m, M,

then create A by using MatCreate(comm, &A), set the sizes using MatSetSizes(A, m, n, M, N), set the type using MatSetType(A, MATMPIAIJ). Is this process correct?


Another question is: Do the entries not filled automatically compressed out?


Thanks!

Junming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230627/12e485dd/attachment.html>


More information about the petsc-users mailing list