[petsc-users] DMPlex filter with Face Sets
Matthew Knepley
knepley at gmail.com
Fri Jan 14 08:52:19 CST 2022
On Fri, Jan 14, 2022 at 9:48 AM Lawrence Mitchell <wencel at gmail.com> wrote:
> > 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..
>
I did the initial implementation for the label filtering. It is here
https://gitlab.com/petsc/petsc/-/merge_requests/4717
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.
Thanks,
Matt
> Lawrence
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220114/5285b104/attachment.html>
More information about the petsc-users
mailing list