<div dir="ltr"><div dir="ltr">On Sun, Nov 6, 2022 at 5:31 PM Alexander Lindsay <<a href="mailto:alexlindsay239@gmail.com">alexlindsay239@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>We sometimes overallocate our sparsity pattern. Matrix assembly will squeeze out allocations that we never added into/set. Is there a convenient way to determine the size of the densest row post-assembly? I know that we could iterate over rows and call `MatGetRow` and figure it out that way. But I'm wondering if there is a better way?</div></div></blockquote><div><br></div><div>You could use <a href="https://petsc.org/main/docs/manualpages/Mat/MatGetRowIJ/">https://petsc.org/main/docs/manualpages/Mat/MatGetRowIJ/</a> which gives all the row lengths at once.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Alex<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>