Sajid,
In the branch barry/2020-08-13/matsetvalues-nopreallocation-seqaij I have
provided a new function
MatSeqAIJSetTotalPreallocation() that requires only a single estimate for the
entire number of nonzeros
in the matrix (not row by row). If you provide the rows in order with sorted
column indices for each
row the assembly process will be super fast and you won't need to compute
anything twice.
Barry
> On Aug 14, 2020, at 2:59 PM, Sajid Ali <[email protected]>
> wrote:
>
> Hi Barry,
>
> All entries for a row are available together, but there is no requirement to
> compute them in order.
>
> Thank You,
> Sajid Ali | PhD Candidate
> Applied Physics
> Northwestern University
> s-sajid-ali.github.io <http://s-sajid-ali.github.io/>