[petsc-users] PetscFV without ghost boundary conditions

Jed Brown jed at jedbrown.org
Mon Jan 17 08:52:47 CST 2022


Thibault Bridel-Bertomeu <thibault.bridelbertomeu at gmail.com> writes:

> Hi everyone,
>
> I was wondering if it was possible to build a solver based on PetscFV
> without using ghost cells for the boundary conditions ?
> Would it be possible to call PetscDSAddBoundary with DM_BC_ESSENTIAL and so
> on instead of DM_BC_NATURAL_RIEMANN ?

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.

> Mostly in the case of an hybrid problem with FVM and FEM (like for instance
> ex18.c from the TS tutorials), it would make sense that the boundaries
> shared by the two discretizations be set at the same locations, i.e. for
> FEM the quadrature points, wouldn't it ?

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).


More information about the petsc-users mailing list