[petsc-users] DMPlex filter with Face Sets

Lawrence Mitchell wencel at gmail.com
Fri Jan 14 08:48:30 CST 2022



> On 14 Jan 2022, at 14:12, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Fri, Jan 14, 2022 at 9:07 AM Thibault Bridel-Bertomeu <thibault.bridelbertomeu at gmail.com> wrote:
> 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.
> 
> 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.
> 
> Can I extract data at the Wall label from the solidDM and transfer it to the Wall label of the fluidDM ?
> 
> Yes, conceptually here is how that would work. You iterate over the label, extracting the values you want. You map those points
> to points in the original mesh using the subpointMap, and then map them again using the subpointMap from the fluidDM down to it.
> 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)
> from one boundary to the other. Then you would just stick in the two vectors and call VecScatterBegin/End()
> 
> If this turns out to be useful, this construction is something we could easily automate in the library.


I've needed this too, I think I have some code lying around, let me see if I can port it into DMPlexFilter..


Lawrence


More information about the petsc-users mailing list