[petsc-dev] DMGetMatrix --> DMGetMatrices?
Dmitry Karpeev
karpeev at mcs.anl.gov
Fri Feb 10 16:49:48 CST 2012
On Fri, Feb 10, 2012 at 4:26 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Fri, Feb 10, 2012 at 16:06, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:
>
>> I'm not sure I follow. If a matrix has been created, its type has been
>> set and it has been preallocated (e.g., MATMPIAIJ in
>> ksp/ksp/examples/tutorials/ex2), it is not marked as assembled until after
>> MatAssemblyEnd. Does it still make sense to duplicate it? In my opinion,
>> it does.
>>
>
> MatDuplicateOption specifies what to copy, but all cases are supposed to
> provide a correct nonzero pattern.
>
My question is whether a preallocated matrix should be considered assembled?
Or should MatDuplicate work for unassembled matrices that result from
MatCreate()
MatSetType()
MatSetSizes()
MatXXXSetPreallocation() or MatSetUpPreallocation()?
Right now a matrix resulting from this sequence of calls is considered
"unassembled".
Maybe that's fine, but MatDuplicate() will refuse to act on such an
"unassembled" matrix irrespective of the MatDuplicatedOption passed in,
while it seems completely natural to be able to duplicate the built-up
sparsity pattern.
Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120210/01b6d884/attachment.html>
More information about the petsc-dev
mailing list