<div class="gmail_quote">On Sat, May 14, 2011 at 22:39, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1fs"> and get things like MatGetVecs() to properly pass local to global information to the created vectors.</div></blockquote><div><br></div><div>This currently happens.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1fs"> So for example we could have something like<br>
<br>
typedef struct _n_PetscLayout* PetscLayout;<br>
struct _n_PetscLayout{<br>
MPI_Comm comm;<br>
PetscInt n,N; /* local, global vector size */<br>
PetscInt rstart,rend; /* local start, local end + 1 */<br>
PetscInt *range; /* the offset of each processor */<br>
PetscInt bs; /* number of elements in each block (generally for multi-component problems) Do NOT multiply above numbers by bs */<br>
PetscInt refcnt; /* MPI Vecs obtained with VecDuplicate() and from MatGetVecs() reuse map of input object */<br>
<br>
PetscInt nfields; IS *fields;<br>
IS localtoglobalmapping,blocklocaltoglobalmapping.<br>
USER INFO LIKE boundary condition locations;<br>
};<br></div></blockquote><div><br></div><div>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.</div>
</div>