parthenon-hpc-lab / parthenon

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

Updates to `DataCollection` #1092

Closed lroberts36 closed 3 weeks ago

lroberts36 commented 1 month ago

PR Summary

This PR makes some changes to DataCollection so that calling pmesh->mesh_data.GetOrAdd(some_label, partition) works whether or not some_label has been previously added to the MeshBlockData container. Additionally, it makes it so that Add will now work correctly for MeshData (previously it didn't use the correct labeling and containers could be overwritten).

Possible other things to do:

PR Checklist

pdmullen commented 1 month ago

w.r.t. swarms, I tested this downstream and all looks good. I noticed that this PR is targeting lroberts36/add-fine-variables instead of develop... intentional?

lroberts36 commented 1 month ago

I noticed that this PR is targeting lroberts36/add-fine-variables instead of develop... intentional?

@pdmullen: yeah, but only because I was using the new test I added there to check that removing the MeshBlockData boiler plate worked.

Yurlungur commented 3 weeks ago

@lroberts36 are we waiting for someone to review this?

lroberts36 commented 3 weeks ago

@lroberts36 are we waiting for someone to review this?

@Yurlungur: @pgrete said he would on Thursday, but I think he has been under the weather the last few days.

lroberts36 commented 3 weeks ago

"Remove Initialize methods and replace them with constructors since they break RAII" is possibly meant for a future PR, isn't it? In that case -> new issue?

@pgrete: I think I was just annoyed when I wrote this comment. It is probably not worth the effort to remove the initialization methods and replace them with constructors.