On Dec 7, 2010, at 2:57 PM, Jed Brown wrote: > On Tue, Dec 7, 2010 at 21:45, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote: > I think the idea of a function space is useful. > In the default case it could be essentially a PetscLayout, which, I guess, > could be wrapped up as a DM. > > PetscLayout is just the decomposition,
PetscLayout is like the DMSliced, there is simply no interconnectivity information because it is not needed or not available. It tells enough information to serve as a factory for Flat Euclidean space in the same way that DMDA serves as a factory for slightly more complicated layout. Barry > VecScatter encodes a lot more information. DM normally also has some > VecScatters, but VecScatter is much more general. Flat Euclidean space > requires no information that is not already in the Vec. > > One reason to always have a DM with a Vec is that we could implement > VecView(X,v) as DMVecView(X->dm,X,v) and if you wanted to interpret the Vec > as a member of a different space (e.g. you had a Vec from a DMDA and wanted > to view it "natively"), you would DMVecView(dmflat,X,v) which I find cleaner > than pushing and popping "formats". Maybe dmflat would be a predefined > constant (instead of an object you had to define) or maybe just NULL, but I > think the current viewing model is pretty fragile/confusing and overly > dependent on how the Vec was created. > > Jed
