Skip to content

Node numbers #757

Answered by IvarStefansson
wmboon asked this question in Q&A
Nov 4, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wmboon
Comment options

Answer selected by wmboon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants