[petsc-users] PetscFV without ghost boundary conditions
Thibault Bridel-Bertomeu
thibault.bridelbertomeu at gmail.com
Mon Jan 17 08:58:53 CST 2022
Hello everyone,
Thank you for your answer Jed.
Le lun. 17 janv. 2022 à 15:52, Jed Brown <jed at jedbrown.org> a écrit :
> 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.
>
Sorry I wasn't clear I think.
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.
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) ?
>
> > 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).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220117/8d980ddb/attachment-0001.html>
More information about the petsc-users
mailing list