And then {Vec|Mat}SetValuesLocal (after renaming, perhaps to XXXSetValuesMapped) could be implemented in terms of a general mapping. This seems really nice. What do you think?
PetscMapping seems a good unification for AO and ISLGM. It should be in the Vec package, right? And it should be a very general object, as current implementations of AO and ISLGM are rather different regarding structure and scalability. On 8/27/07, Matthew Knepley <knepley at gmail.com> wrote: > It would probably be better. AOMapping and ISLocaltoGlobal have > about the same interface. > > Matt > > On 8/27/07, Barry Smith <bsmith at mcs.anl.gov> wrote: > > > > Should AO and ISLocalToGlobalMapping be merged into > > a PetscMapping class? > > > > struct _p_ISLocalToGlobalMapping{ > > PETSCHEADER(int); > > PetscInt n; /* number of local indices */ > > PetscInt *indices; /* global index of each local index */ > > PetscInt globalstart; /* first global referenced in indices */ > > PetscInt globalend; /* last + 1 global referenced in indices */ > > PetscInt *globals; /* local index for each global index between > > start and end */ > > }; > > > > typedef struct { > > PetscInt N; > > PetscInt *app; /* app[i] is the partner for petsc[appPerm[i]] */ > > PetscInt *appPerm; > > PetscInt *petsc; /* petsc[j] is the partner for app[petscPerm[j]] */ > > PetscInt *petscPerm; > > } AO_Mapping; > > > > typedef struct { > > PetscInt N; > > PetscInt *app,*petsc; /* app[i] is the partner for the ith PETSc slot */ > > /* petsc[j] is the partner for the jth app slot */ > > } AO_Basic; > > > > > > Barry > > > > > > > > On Mon, 27 Aug 2007, Matthew Knepley wrote: > > > > > On 8/27/07, Barry Smith <bsmith at mcs.anl.gov> wrote: > > > > > > > > Lisandro, > > > > > > > > Sounds fine to me. ISLocalToGlobalMapping -> LGMapping > > > > > > If we are getting picky, I like long names, but I would get rid of IS > > > since it seems > > > more like implementation to me. > > > > > > > BUT, AO is called AO, not AOMapping? Shouldn't it be AOMapping? > > > > (then the AO_Mapping needs to be changed, why it is called > > > > Mapping, Matt?, I do not know). > > > > > > The default AO implementation has the semantic guarantee that it is a > > > permutation. > > > The Mapping implementation allows subsets of the index space. > > > > > > Matt > > > > > > > Barry > > > > > > > > > > > > On Thu, 16 Aug 2007, Lisandro Dalcin wrote: > > > > > > > > > Did you never thinnk about the possibility of renaming > > > > > ISLocalToGlobalMapping to something shorter? IMOH it is painfuly long > > > > > name. > > > > > > > > > > In petsc4py, I call this LGMapping, because ISLocalToGlobalMapping, in > > > > > my view, is not an IS, and its usage is similar to AOMapping. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which > their experiments lead. > -- Norbert Wiener > > -- Lisandro Dalc?n --------------- Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) PTLC - G?emes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594