[petsc-users] Allocating for existing space on Mat

Ali Reza Khaz'ali arkhazali at cc.iut.ac.ir
Thu Jan 24 03:53:12 CST 2019


Hi all,

 

As far as I understand, using MatSetValues for new non-zero entries will
cause an error if MAT_NEW_NONZERO_LOCATION_ERR== PETSC_TRUE.  Setting
MAT_NEW_NONZERO_LOCATION_ERR to PETSC_FALSE is also undesirable since it
will slow down the code, and in some cases, the performance loss will be
extreme. However, is there any solution for a matrix that the number of
non-zeros on each of its rows is fixed in both diagonal and off-diagonal
parts, but the location (the column number) of the non-zero entries may vary
during the procedures? I can use MAT_NEW_NONZERO_LOCATION_ERR== PETSC_TRUE,
but it is important to me that the code runs as fast as possible.

Any help is much appreciated.

 

Best wishes,

Ali

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190124/9b32a0d8/attachment.html>


More information about the petsc-users mailing list