[petsc-users] Doubt related to MatSetValues()
Kaushik Kulkarni
kaushikggg at gmail.com
Sat Feb 13 02:19:36 CST 2016
After preallocating a matrix do I have to change the way in which I have to
use the function MatSetValues(). The reason I am asking this is that when I
am executing the code with the line "
*MatMPIAIJSetPreallocation(A,dnz,PETSC_NULL,0,PETSC_NULL);*" in which dnz
is computed for each row and all the off diagonal terms are zero I am
getting an error:
"
*[0]PETSC ERROR:Argument out of range[0]PETSC ERROR: New nonzero at (0,4)
caused a malloc*"
But when I am commenting the line corresponding to the Preallocation, the
code is running fine.
Thank you,
*Kaushik*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160213/8180f70f/attachment-0001.html>
More information about the petsc-users
mailing list