[petsc-dev] attaching field information to PetscLayout?

Jed Brown jed at 59A2.org
Sat May 14 15:51:00 CDT 2011


On Sat, May 14, 2011 at 22:39, Barry Smith <bsmith at mcs.anl.gov> wrote:

>  and get things like MatGetVecs() to properly pass local to global
> information to the created vectors.
>

This currently happens.


> So for example we could have something like
>
> typedef struct _n_PetscLayout* PetscLayout;
> struct _n_PetscLayout{
>  MPI_Comm  comm;
>  PetscInt  n,N;         /* local, global vector size */
>  PetscInt  rstart,rend; /* local start, local end + 1 */
>  PetscInt  *range;      /* the offset of each processor */
>  PetscInt  bs;          /* number of elements in each block (generally for
> multi-component problems) Do NOT multiply above numbers by bs */
>  PetscInt  refcnt;      /* MPI Vecs obtained with VecDuplicate() and from
> MatGetVecs() reuse map of input object */
>
>  PetscInt nfields; IS *fields;
>  IS localtoglobalmapping,blocklocaltoglobalmapping.
>  USER INFO LIKE boundary condition locations;
> };
>

My only concern here is that there is a bit of duplicated information
between the IS (or ISLocalToGlobalMapping?) and the PetscLayout. I would
like to see the local space become a more central property of Mat and Vec
(this would simplify DMComposite and allow fusing the scatters which should
be good for performance), so putting it in PetscLayout makes sense to me.
For (rare) memory reasons, I think it should be possible for the
ISLocalToGlobalMapping to be NULL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110514/3ef9fc00/attachment.html>


More information about the petsc-dev mailing list