[petsc-users] Ghost edges in DMPlex

Matthew Knepley knepley at gmail.com
Fri Jun 9 13:42:56 CDT 2017


On Fri, Jun 9, 2017 at 9:41 AM, Xavier Garnaud <xgarnaud at gmail.com> wrote:

> Dear all,
>
> I am working on a vertex-centered Finite Volume CFD solver (with only
> tetrahedral or triangular cells). I'd like to be able to use DMPlex, but
> I have a couple of questions:
>
> For me, the most convenient way to store the mesh is to have, in addition
> to the standard DMPlex built from a cell to node connectivity is to also
> have 2 types of fictitious edges:
>    1- for periodic surfaces, I build ghost cells and ghost nodes prior to
> building the DMPlex, and I'd like to add "edges" that will give the
> matching between the ghost nodes and the corresponding nodes. These edges
> will not belong to any face or cell --> what would be the most convenient
> way to add such edges ?
>

I do not understand doing it that way, although I think you could do it.
You can build any kind of adjacency just by adding a point and its cone.

I manage periodic surfaces just by discretizing the periodic topology
directly, since topology and geometry are decoupled. For example, on
the circle, we just directly have the edges of the circle.


>     2- for each node on each boundary surface, I'd like to add a
> fictitious edge to easily compute the Finite Volume operators. --> can I
> have edges that link a node to itself (possible several times if the node
> belongs to several surfaces)? alternatively, should I add a fictitious node
> for each surface, and link all the nodes in the surface to this fictitious
> node?
>

I think I understand this one. This would be the analogue of my "ghost
cells". Then you put the boundary concentration in the ghost cell and
compute
the relevant boundary flux along the boundary face. You are talking about
the topology as the dual to what I am used to, so you have ghost nodes
instead of cells and ghost edges instead of faces.


> For the mesh partition, which option should I use in
>
>     ierr = DMPlexSetAdjacencyUseCone(_dm,PETSC_TRUE);
>     ierr = DMPlexSetAdjacencyUseClosure(_dm,PETSC_TRUE);
>
> knowing that the unknowns are stores at the vertices and that two vertices
> are connected if there is an edge between them?
>

For the topology I use, I believe you want PETSC_TRUE and PETSC_FALSE, as I
show on this page


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexGetAdjacencyUseClosure.html

but if you are using the dual, as you do above, then it would be

  PETSC_FALSE and PETSC_FALSE

I realize that the FV support is not as developed as the FEM support, so
feel free to mail when you have problems.

  Thanks,

    Matt


> Thank you very much for your library, and for your help.
>
> Best regards,
>
> Xavier
>



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

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170609/f5eb087e/attachment.html>


More information about the petsc-users mailing list