<div dir="ltr"><div dir="ltr">On Thu, Apr 22, 2021 at 8:31 AM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com">thibault.bridelbertomeu@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"><div dir="ltr">Dear all, <div><br></div><div>I am working with multi-D DMPlex's coupled with PetscFV and a TS to solve hyperbolic systems of equations. To add boundaries, I use the PetscDSAddBoundary as shown in some examples throughout the documentation.</div><div>I do CFD, meaning I often have an object around which I want to simulate the flow. And I would like to know how some variables (pressure for instance) behave at the wall (literally _at_ the wall, and not only in the first fluid cell above the wall).</div><div><br></div><div>After going through the documentation and the PETSc source code, I think the way to go is to use something like what ex23.c (of plex/tests) does : mark boundary faces that match the _wall_ boundary condition, create a submesh with them and somehow project the PetscFV/TS solution onto those facets based on the order of the spatial discretization (like if it's order 1 then just use the value in the first fluid cell above the boundary condition, if it's order 2 use the gradient and the value to get something at the facet, etc...).</div><div><br></div><div>But I cannot figure out two things :</div><div><br></div><div>1/ how to mark the right boundary faces ? I tried using the DMPlexMarkBoundaryFaces with (what I thought was) the ID of the wall boundary condition (I mean, I DMView'd the DMPlex and I picked the right id in the Face Sets group), but then when I use the label thus created with DMPlexCreateSubmesh, it just returns ... nothing. The "submesh" is empty when I DMView it.</div></div></blockquote><div><br></div><div>I need to understand the question better. It seems like you already have the boundary marked. You just use that FaceSets label. If you want the submesh, you really need</div><div>to mark vertices in addition to faces. To do this, you make a copy of the label you want, and then call DMPlexLabelComplete() on it. Then you can use it to create a submesh.</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"><div dir="ltr"><div>2/ how to project on the facets in a PetscFV paradigm ?</div></div></blockquote><div><br></div><div>I believe that DMPlexProject() will work right now for order 1 projection. For order 2 with FV, we will have to write some new code.</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"><div dir="ltr"><div>Thank you very much in advance for any advice/pointers you could give me !</div><div><br></div><div>Take care and have a good day, </div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><div><div><div>Thibault</div></div></div></div></div></div></div></div></div></div></div></div></div>
</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>