Node numbers #757
-
Hi, We were used to using the One cumbersome way we had thought of was, for given sd and mdg: We were hoping that there is a better solution within PorePy. Your friends in Milano, Alessio and Wietse |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't know exactly what you mean by "index of sd within mdg", so I'll explain the sorting hoping that helps you. Domains are sorted first by (descending) dimension and then by (ascending) subdomain id. This might be a definition of the index. Since mdg.subdomains() returns sorted, you also have the index as mdg.subdomains().index(sd). However, for most purposes I think you could probably just use sd.id directly. Please ask if you need further assistance! Grüße aus Stuttgart, |
Beta Was this translation helpful? Give feedback.
I don't know exactly what you mean by "index of sd within mdg", so I'll explain the sorting hoping that helps you.
Domains are sorted first by (descending) dimension and then by (ascending) subdomain id. This might be a definition of the index. Since mdg.subdomains() returns sorted, you also have the index as mdg.subdomains().index(sd). However, for most purposes I think you could probably just use sd.id directly.
Please ask if you need further assistance!
Grüße aus Stuttgart,
Ivar