On Wed, Oct 10, 2012 at 11:38 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> > On Oct 10, 2012, at 8:50 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote: > > > How did you get the MatNest? > > > > What you describe is the right approach, but proper preallocation is > messy in the general case. There is a partial implementation in petsc-dev, > but it needs to be finished/debugged. > > Thomas, > > We should have a reasonable MatConvert_MatNest_MATAIJ. Perhaps you > can look at what Jed has started in petsc-dev and improve it enough to suit > your purpose. > There is this commit from last summer: http://petsc.cs.iit.edu/petsc/petsc-dev/rev/5289fd118d48 It's untested, but I pushed it back then hoping someone could beat it into shape. I also have a patch that eliminates ISAllGather() in favor of PetscSF operations, but that's even less tested (if such a thing is possible). I can clean it up and push, if somebody wants to play with it. Dmitry. > > Barry > > > > > > > > On Oct 10, 2012 8:45 AM, "Thomas Witkowski" < > thomas.witkowski at tu-dresden.de> wrote: > > You are right. But what if a have a MATNEST and i must convert it to > MATAIJ. Any better way than what I wrote in my first mail? > > > > Thomas > > > > Am 10.10.2012 15:33, schrieb Jed Brown: > >> 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. > >> > >> 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/20e53519/attachment.html>
