OpenPNM forces manually-passed conns to be in ascending order #2205
-
Just discovered a weird issue/feature: I am generating Conns and Coords separatey as Numpy arrays and then passing them to GenericNetwork to work in OpenPNM. For example, if my generator has a certain throat connecting pores [385 291], As far as I can see that does not affect any results downstream, but I am just curious as to why it works that way? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Georgy, As you have guessed, that's a feature :) Since in Finally, like you said, that doesn't (shouldn't) affect any results downstream, it's just more optimized this way. Best, |
Beta Was this translation helpful? Give feedback.
-
Hi Amin, Thanks for your reply - that makes sense! Georgy |
Beta Was this translation helpful? Give feedback.
Hi Georgy,
As you have guessed, that's a feature :) Since in
openpnm
(at least as of now), we don't support bidirectional throats, sorting network conns in an ascending order ensures that the adjacency matrix is always upper triangular, which can later be leveraged to speed up certain topological queries/manipulations.Finally, like you said, that doesn't (shouldn't) affect any results downstream, it's just more optimized this way.
Best,
Amin