<div dir="ltr"><div dir="ltr">On Fri, Jan 14, 2022 at 9:48 AM Lawrence Mitchell <<a href="mailto:wencel@gmail.com">wencel@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> On 14 Jan 2022, at 14:12, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
> <br>
> On Fri, Jan 14, 2022 at 9:07 AM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a>> wrote:<br>
> Also, if we still consider my example with Solid and Fluid, let's image we call DMPlexFilter twice. We then get two new DMs with Solid in one and Fluid in the other one.<br>
> <br>
> The labels will be communicated, so fluidDM will still know Wall, Inlet, Freestream and Outlet and on the other hand, solidDM will still know Wall and Insulation : those two domain share the Wall stratum of the Face Sets.<br>
> <br>
> Can I extract data at the Wall label from the solidDM and transfer it to the Wall label of the fluidDM ?<br>
> <br>
> Yes, conceptually here is how that would work. You iterate over the label, extracting the values you want. You map those points<br>
> to points in the original mesh using the subpointMap, and then map them again using the subpointMap from the fluidDM down to it.<br>
> Now you can insert the values using the section in the fluidDM. I think the easiest way to do this is to setup a VecScatter (or PetscSF)<br>
> from one boundary to the other. Then you would just stick in the two vectors and call VecScatterBegin/End()<br>
> <br>
> If this turns out to be useful, this construction is something we could easily automate in the library.<br><br>
I've needed this too, I think I have some code lying around, let me see if I can port it into DMPlexFilter..<br></blockquote><div><br></div><div>I did the initial implementation for the label filtering. It is here</div><div><br></div><div>  <a href="https://gitlab.com/petsc/petsc/-/merge_requests/4717">https://gitlab.com/petsc/petsc/-/merge_requests/4717</a></div><div><br></div><div>Thibault, can you try it on your example? I will not have time to code up a nice test until I get home from this conference.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Lawrence</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>