parthenon-hpc-lab / parthenon

Parthenon AMR infrastructure
https://parthenon-hpc-lab.github.io/parthenon/
Other
112 stars 33 forks source link

Thread UIDs through `data_collection` #1060

Closed Yurlungur closed 5 months ago

Yurlungur commented 5 months ago

PR Summary

This PR adds the ability to request a new MeshData or MeshBlockData object by requesting a subset of unique IDs of variables from the parent object, rather than by using only variable names. This should make UID-based operations more usable and thus unlock a bit of performance by minimizing string comparisons. Needed in riot and I suspect also KHARMA.

PR Checklist

Yurlungur commented 5 months ago

Thanks for the review @pgrete I think I've addressed your comments now.

Yurlungur commented 5 months ago

@lroberts36 thanks for the review. I think I've addressed all your comments.

pgrete commented 5 months ago

With the latest changes the distinction between if (grid.type == GridType::two_level_composite) { and using pmy_mesh_->gmg_block_lists[src->grid.logical_level][i] is gone. Is that not required any more?

lroberts36 commented 5 months ago

@pgrete: Yeah, that is no longer required since the src MeshData already should point to internal/multigrid blocks.