MatStash() use linked list of chunks

Barry Smith bsmith at mcs.anl.gov
Tue Dec 13 15:22:04 CST 2005


  Matt,

    We don't need no stinking computer science ideas in PETSc :-).

  The data use pattern is so specific to this particular use that I
don't see any abstraction smaller then the current abstraction to use
as a building block. (There is no way in hack that this could be
shared with LU symbolic factorization.) Thus the only question is how
to implement it. Currently it uses continguous storage; I am proposing
another implementation that uses large chunks of continquous storage
to eliminate the need for copies when one runs out of space. 

  Ideally we will have some common interfaces for common things, but
I don't see one being useful in this particular circumstance.

  The possible place to eventually share code may be between the
Vec stash and the Mat stash.

   Barry

  Abstract comes AFTER understanding, never before.


On Tue, 13 Dec 2005, Matthew Knepley wrote:

> Hong Zhang <hzhang at mcs.anl.gov> writes:
> 
>      If we are really going to do this, shouldn't we approach it as a
> data structures problem? We need a certain structure, which here appears
> to be "vector", or maybe "list". We make a general interface, and then
> code up some implementation, like a linked list. Then we can use this
> interface/impl other places in the code, like the LU part, rather than
> rely on our old cut&paste strategy.
> 
>      Matt
> 
> > Barry,
> >
> > I can work on this.
> >
> > My understanding is:
> > Using linked list in MatStashExpand_Private() as the way we used
> > in MatLUFactorSymbolic_SeqAIJ().
> >
> > Hong
> >
> > On Mon, 12 Dec 2005, Barry Smith wrote:
> >
> >>
> >>    Someone should change the storage mechanism for
> >> MatStash to keep a linked list of allocated arrays instead of
> >> always allocating a larger one and copying all the values over to
> >> the larger one.
> >>
> >>    Barry
> >>
> >>
> >
> >
> >
> 
> 




More information about the petsc-dev mailing list