<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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.</blockquote><div> I also don't like the name for this one as it doesn't have any DM in its arguments, while VecGetSubVectorDM(vec,subdm,&<wbr>subvec) or DMCreateSubDM() do.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 November 2016 at 17:56, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">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"><br>
So something like VecGetSubVectorDM(vec,subdm,&<wbr>subvec)? I hate having so many functions but don't see how to avoid it. Or<br>
<br>
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.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
> On Nov 7, 2016, at 6:17 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
><br>
> 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().<br>
><br>
> 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.<br>
><br>
> How about we supplement DMCreateSubDM() with VecGetSubvectorDM(), which calls it underneath and sets up the vector correctly?<br>
><br>
> Matt<br>
><br>
> --<br>
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
> -- Norbert Wiener<br>
<br>
</div></div></blockquote></div><br></div>