On Sun, Nov 6, 2022 at 5:31 PM Alexander Lindsay <alexlindsay...@gmail.com>
wrote:

> 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?
>

You could use https://petsc.org/main/docs/manualpages/Mat/MatGetRowIJ/
which gives all the row lengths at once.

  Thanks,

     Matt


> Alex
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>

Reply via email to