rename ISLocalToGlobalMapping?

Barry Smith bsmith at mcs.anl.gov
Tue Aug 28 11:11:22 CDT 2007


  A reason things are they way the are now is that I felt it was
important that ISLocalToGlobalMappingApply() be inlineable (since the
mapping may be applied to very short arrays of integers).

  I think it is important to keep this with any redesign. This could be
done in the same way VecGetArray() is handled allowing the flexibility of
an inlined version but allowing the polymorphic function call approach
when needed.

  Doing this refactorization is a good idea, the PETSc interface will be 
simplier, the code will be simplier (less PETSc code), the question is
do we have the time and energy now to do a proper redesign and implementation
or do we leave it as is? 

  Barry


On Tue, 28 Aug 2007, Lisandro Dalcin wrote:

> 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
> >
> >
> 
> 
> 




More information about the petsc-dev mailing list