[petsc-dev] VecGetSubVector() outupt
Sander Arens
Sander.Arens at ugent.be
Mon Nov 7 13:22:08 CST 2016
>
> Or VecGetSubVectorDM(vec,PetscInt numfields,PetscInt *fields,&subvec)? The
> problem with this one is each new call has to create a new subdm unless we
> stash it in the DM.
I also don't like the name for this one as it doesn't have any DM in its
arguments, while VecGetSubVectorDM(vec,subdm,&subvec) or DMCreateSubDM() do.
On 7 November 2016 at 17:56, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> So something like VecGetSubVectorDM(vec,subdm,&subvec)? I hate having
> so many functions but don't see how to avoid it. Or
>
> VecGetSubVectorDM(vec,PetscInt numfields,PetscInt *fields,&subvec)? The
> problem with this one is each new call has to create a new subdm unless we
> stash it in the DM.
>
>
>
>
> > On Nov 7, 2016, at 6:17 AM, Matthew Knepley <knepley at gmail.com> wrote:
> >
> > The way we have chosen to manage Vec output is to override the VecView
> function with DM-specific output functions. This strategy is currently
> broken for VecGetSubVector().
> >
> > Really what we want is for the Vec to have the correct subdm if indeed
> it is a subfield. However, its possible that the IS is some random thing,
> like points intersecting some surface, so we don't want it to blindly copy
> over the function pointers.
> >
> > How about we supplement DMCreateSubDM() with VecGetSubvectorDM(), which
> calls it underneath and sets up the vector correctly?
> >
> > 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/20161107/6971553b/attachment.html>
More information about the petsc-dev
mailing list