On 8/28/07, Barry Smith <bsmith at mcs.anl.gov> wrote:
>   A reason things are they way the are now is that I felt it was
> important that ISLocalToGlobalMappingApply() be inlineable

I completelly agree with you...

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

I think we can develop this incrementally, starting from defining and
implementing a PetscMapping class. I propose the following actions to
be taken:

1 - Barry/Matt/other define the interface of PetscMapping (I am very
bad doing this from scratch).

2- I can take the effort of implementing generic interface and
specific implementations in some spare time, please do not expect me
to finalize it in the very near future.

3- Once PetscMapping is ready, we (perhaps just me, with some advice)
can incrementally change Vec/Mat (and others) to use the new object.

Could any of you to take (1), just syntax and semantics... ?



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


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


Reply via email to