[petsc-users] MAT_NEW_NONZERO_LOCATION_ERR
Thibaut Appel
t.appel17 at imperial.ac.uk
Tue Oct 8 09:37:42 CDT 2019
Well, try and create a small SEQAIJ/MPIAIJ matrix and preallocate memory
for the diagonal.
When I try to call MatSetValues to fill the diagonal, on the first row I
get
[0]PETSC ERROR: Argument out of range
[0]PETSC ERROR: Inserting a new nonzero at (0,0) in the matrix
Which is within my preallocated non-zero structure.
This is why I'm confused.
Thibaut
On 08/10/2019 15:31, Zhang, Hong wrote:
> Thibaut:
>
> Hi,
>
> Just out of curiosity, I'm a bit confused by the parameter option
> MAT_NEW_NONZERO_LOCATION_ERR.
>
> It triggers an error if you try to insert/add a value in the non-zero
> structure, regardless of the matrix preallocation status. In what
> case
>
> would such an option be useful?
>
> It triggers an error if you try to insert/add a NEW value outside of
> your preallocated non-zero structure.
> Hong
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191008/7d399342/attachment.html>
More information about the petsc-users
mailing list