<div dir="ltr">Thank you very much, I will try it.<br><br><br>Thanks<br><br>----<br>John Albequerque.<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 19, 2016 at 8:16 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">John Albequerque <<a href="mailto:johncfdcfd@gmail.com">johncfdcfd@gmail.com</a>> writes:<br>
<br>
> So Jed, what you are suggesting is that I should set only the non-zero<br>
> elements while using<br>
</span>> *  MatSetValues(A,(high-low),**idxm,nc,idxn,values,INSERT_*<br>
><br>
> *VALUES);*<br>
<span class="">> And not mention the zero elements and for that I should loop over all local<br>
> rows and then set each of the value.<br>
<br>
</span>Yes.  The whole point of a sparse matrix is to spend no time or storage<br>
on 0.0 entries.  If you allocate a dense matrix and store all the zeros,<br>
you're just being inefficient relative to a dense format.<br>
</blockquote></div><br></div>