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

Reply via email to