[petsc-users] Doubt in MPIPreallocation

John Albequerque johncfdcfd at gmail.com
Fri Feb 19 08:47:31 CST 2016


Thank you very much, I will try it.


Thanks

----
John Albequerque.



On Fri, Feb 19, 2016 at 8:16 PM, Jed Brown <jed at jedbrown.org> wrote:

> John Albequerque <johncfdcfd at gmail.com> writes:
>
> > So Jed, what you are suggesting is that I should set only the non-zero
> > elements while using
> > *  MatSetValues(A,(high-low),**idxm,nc,idxn,values,INSERT_*
> >
> > *VALUES);*
> > And not mention the zero elements and for that I should loop over all
> local
> > rows and then set each of the value.
>
> Yes.  The whole point of a sparse matrix is to spend no time or storage
> on 0.0 entries.  If you allocate a dense matrix and store all the zeros,
> you're just being inefficient relative to a dense format.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160219/5ea2b6d8/attachment.html>


More information about the petsc-users mailing list