[petsc-dev] MatCopy to zero preallocated matrix

Jed Brown jedbrown at mcs.anl.gov
Thu Mar 1 17:43:15 CST 2012


On Thu, Mar 1, 2012 at 17:39, Vaclav Hapla <vaclav.hapla at vsb.cz> wrote:

> OK, but:
> 1. I don't understand what's the use case for MatCopy.
>

Copy to a complete matrix with same or different preallocation.


> 2. I think it's not good that I can't do the thing without reallocations
> though I have an apriori information where the new nonzeros will lie.
> 3. Documentation of MatAssemblyBegin/End should definitely contain the
> information about the zero filter.
>

There is no "zero filter". If you preallocate and set columns (inserting
explicit zeros or whatever), they will not get filtered out.


>
> But OK, 2. is not a problem in my case :-)
> Thank you,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120301/1dda3ff4/attachment.html>


More information about the petsc-dev mailing list