[petsc-dev] Fw: DMPLEX cannot support two different edges for the same two vertices, hence DMPLEX cannot?

Zhang, Hong hzhang at mcs.anl.gov
Thu Dec 2 16:31:32 CST 2021

I'm forwarding Aidan's comments on this issue (see below). Aidan has done extensive study on DMPlex and has been working on hyperbolic flow applications.

Please add Aidan to petsc-dev mailing list.

From: Aidan Hamilton <aidan at udel.edu>
Sent: Thursday, December 2, 2021 2:34 PM
To: Zhang, Hong <hzhang at mcs.anl.gov>
Cc: Sundermann, Rylee Edwin - SDSU Student <rylee.sundermann at jacks.sdstate.edu>
Subject: Re: [petsc-dev] DMPLEX cannot support two different edges for the same two vertices, hence DMPLEX cannot?


I am not on petsc-dev, I guess I should be. Also you can push, you’re always free to push changes.

And it doesn’t matter for anything on my end. Each edge is distinct topological entity, so I have the directed graph

V0 ---- E0 -• V1   ----- E1 ----• V0

I don’t need any special identification. And it works in parallel with globaltolocal seemingly working . Now this is not a standard graph, it follows the more general notion of directed graph, see Diestel page 25, that allows for multi-edges.

Now for my case I don’t need to distinguish  between the two edges at all beyond each one having their own unique edge id. In all of our use cases for traffic I don’t think we need to care (and honestly I’m not sure if Shri actually needs to care either).

Now we do have the topological distinction of direction for all of our graphs, which we can use to assign direction to traffic flow. And that will always work. And this notion of direction is the only distinction we need to care about, and we have it.

It’s worth noting that a CW-Complex does support this notion of multiedges, no reason for it not to, so DMPlex should be supporting its topological operations with this case in mind.

If DMplex can’t support this then dmplex isn’t doing what it claims it does.

As long as you as the user know that you are dealing with a multi-edge graph, I don’t see why there would be any issues. Any topological query of a multi-edge graph should behave as you would expect a multi-edge graph to behave, though it may behave differently than single edge graphs, as long as you are aware of the difference when you code your residuals and other functions on dmnetwork it should be fine.



From: Zhang, Hong <hzhang at mcs.anl.gov>
Date: Thursday, December 2, 2021 at 1:56 PM
To: Aidan Hamilton <aidan at udel.edu>
Cc: Sundermann, Rylee Edwin - SDSU Student <rylee.sundermann at jacks.sdstate.edu>
Subject: Fw: [petsc-dev] DMPLEX cannot support two different edges for the same two vertices, hence DMPLEX cannot?


Are you on petsc-dev email list?

How do you distinguish two parallel edges connecting the same junctions in your traffic code? Do you use

offset_vto, offset_vfrom in EdgeFE?

I removed white spaces in dgnet.c and dgnet.h. Can I push the changes?



From: petsc-dev <petsc-dev-bounces at mcs.anl.gov> on behalf of Barry Smith <bsmith at petsc.dev>
Sent: Wednesday, December 1, 2021 7:41 PM
To: Abhyankar, Shrirang G <shrirang.abhyankar at pnnl.gov>
Cc: petsc-dev <petsc-dev at mcs.anl.gov>; Betrie, Getnet <gbetrie at anl.gov>
Subject: Re: [petsc-dev] DMPLEX cannot support two different edges for the same two vertices, hence DMPLEX cannot?


    If you provided your graph in parallel I suspect that the GlobalToLocal and LocalToGlobal would not work as you expect and put everything in the appropriate place.

    I'll set up a simple code that takes exactly Get's configuration and send it out so everyone can run it and see exactly what happens.


On Dec 1, 2021, at 8:00 PM, Abhyankar, Shrirang G via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>> wrote:

From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Date: Wednesday, December 1, 2021 at 5:57 PM
To: "Brown, Jedediah A (VISIT)" <jed at jedbrown.org<mailto:jed at jedbrown.org>>
Cc: "Abhyankar, Shrirang G" <shrirang.abhyankar at pnnl.gov<mailto:shrirang.abhyankar at pnnl.gov>>, PETSc Development <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>>, Getnet Betrie <gbetrie at anl.gov<mailto:gbetrie at anl.gov>>
Subject: Re: [petsc-dev] DMPLEX cannot support two different edges for the same two vertices, hence DMPLEX cannot?

Check twice before you click! This email originated from outside PNNL.

On Wed, Dec 1, 2021 at 6:55 PM Jed Brown <jed at jedbrown.org<mailto:jed at jedbrown.org>> wrote:

Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>> writes:

> On Wed, Dec 1, 2021 at 5:17 PM Abhyankar, Shrirang G <
> shrirang.abhyankar at pnnl.gov<mailto:shrirang.abhyankar at pnnl.gov>> wrote:
>> “You can certainly have many fields on a given edge, but I don't know
>> what it would mean to have two edges since no topological query could tell
>> the difference.”
>> The two edges in a power grid represent two parallel power lines that are
>> connected between two locations (vertices). There are line ids (stored in
>> the component data) to distinguish the two lines.
> Yes, so you can tell the difference in the function space (since difference
> current passes down each one), but _topologically_ you cannot. If you put
> duplicate cells in, then
> some topological queries will give unexpected results, like the join of the
> two vertices.

This could be modeled with some ghost vertices. So instead of

  a ------ b

you would set up

  a ---o---- b

Those ghost vertices don't have to "do" anything, but they make the edges topologically distinct.

Shri, what problems might this cause?

I don’t understand the figure you’ve drawn above. Sorry.

As a user, would I need to add anything to the way I am setting up the network/plex or any additional equations in the residual evaluation?

I do not have any issue right now for the power grid problem since I don’t require DMNetwork or DMPLEX to do the topological distinction between parallel edges. There are unique edge identifiers in my dataset through which I can make this distinction.

Yes, this would work, but it looks like the multiple cells are not causing them problems right now with the questions they are asking the mesh.



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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211202/4b24e880/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DiestelGT.pdf
Type: application/pdf
Size: 2210716 bytes
Desc: DiestelGT.pdf
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211202/4b24e880/attachment-0001.pdf>

More information about the petsc-dev mailing list