On Mon, Feb 6, 2012 at 12:47 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Mon, Feb 6, 2012 at 21:42, Matthew Knepley <knepley at gmail.com> wrote: > >> I don't like this because it would mean calling VecSetUp() all over the >> place. Couldn't the ghosting flag be on the same >> level as the sizes? >> > > Maybe VecSetUp() is wrong because that would imply collective. This memory > allocation is simple and need not be collective. > > Ghosting information is an array, so placing it in VecSetSizes() would > seem unnatural to me. I wouldn't really want > VecSetGhosts(Vec,PetscInt,const PetscInt*) to be order-dependent with > respect to VecSetType(), but maybe the VecSetUp() would be too messy. > I needed to be more specific. I think VecSetSizes(local, global, ghost) would work. Then VecSetGhostIndices() can be called anytime, and even remapped. Matt -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120206/b17f38a8/attachment.html>