<div dir="ltr"><div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Hello everyone, </div><div><br></div><div>Thank you for your answer Jed.</div><div><br></div></div></div></div></div></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 17 janv. 2022 à 15:52, Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a>> writes:<br>
<br>
> Hi everyone,<br>
><br>
> I was wondering if it was possible to build a solver based on PetscFV<br>
> without using ghost cells for the boundary conditions ?<br>
> Would it be possible to call PetscDSAddBoundary with DM_BC_ESSENTIAL and so<br>
> on instead of DM_BC_NATURAL_RIEMANN ?<br>
<br>
Are you thinking this sets the value in a ghost cell or the value in a cell adjacent to the domain? For the former, the value in a ghost cell must typically be set to a (nonlinear for nonlinear PDE) function of the value in the adjacent cell to implement desired BCs.<br></blockquote><div><br></div><div>Sorry I wasn't clear I think.</div><div>I was thinking that for finite volume codes, you have two options: either you use ghost cells that you fill up with the appropriate primitive state for the boundary condition, or you directly enforce the boundary condition at the face.</div><div>In the PetscFV examples, the DM_BC_NATURAL_RIEMANN type of boundary condition with ghost cells is always used, but what about _not_ generating the ghost cells and using a DM_BC_ESSENTIAL to enforce the boundary condition directly at the face (or at the quadrature points on the face if you will) ?</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">
<br>
> Mostly in the case of an hybrid problem with FVM and FEM (like for instance<br>
> ex18.c from the TS tutorials), it would make sense that the boundaries<br>
> shared by the two discretizations be set at the same locations, i.e. for<br>
> FEM the quadrature points, wouldn't it ?<br>
<br>
You either have a surface integral (NATURAL boundary condition, with the integrand specified at quadrature points) or an ESSENTIAL condition, which is implemented nodally (with some lifting for non-Lagrange bases).<br>
</blockquote></div></div>