[petsc-users] Convert MatNest to MatAIJ

Dmitry Karpeev karpeev at mcs.anl.gov
Wed Oct 10 12:07:14 CDT 2012


On Wed, Oct 10, 2012 at 8:33 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> The best way, by far, is to assemble the matrix as AIJ if that is what you
> want to use. See MatGetLocalSubMatrix and SNES ex28. Using MATNEST should
> he a run-time choice.
>
The caveat here is that currently there is no good way (that I know of) to
preallocate in a mattype-oblivious way.
And there is no preallocation of matnest matrices.  There are bits a pieces
of experimental code sitting around
petsc-dev that could probably be made into a preallocation mechanism for
matnest, but that's still quite a bit of work.
Dmitry.

> On Oct 10, 2012 8:30 AM, "Thomas Witkowski" <
> thomas.witkowski at tu-dresden.de> wrote:
>
>> Is there a fast way to convert a MatNest to a MatAIJ? I tried to use
>> MatConvert, but it seems that this convert is not yet implemented. As I
>> need this functionality to factorize the nested matrix with MUMPS, is there
>> any better way than to extract the nested matrices, iterate over all rows
>> of these matrices and use MatSetValues to add them again to the final
>> MatAIJ?
>>
>> Thomas
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121010/0e4a23f2/attachment.html>


More information about the petsc-users mailing list