[petsc-users] Allocating the diagonal for MatMPIAIJSetPreallocation

Samuel Estes samuelestes91 at gmail.com
Fri Apr 1 11:26:59 CDT 2022


Hi,

I have a problem in which I know (roughly) the number of non-zero entries
for each row of a matrix but I don't have a convenient way of determining
whether they belong to the diagonal or off-diagonal part of the parallel
matrix. Is there some way I can just allocate the total number of non-zeros
in a row regardless of which part they belong to? I'm assuming that this is
not possible but I just wanted to check. It seems like it should be
possible in principle since the matrix is only split by the rows but the
columns of a row are all on the same processor (at least as I understand
it). Thanks!

Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220401/1b5c937b/attachment.html>


More information about the petsc-users mailing list