Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: DataCollection/StateDescriptor niceties #923

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

bprather
Copy link
Collaborator

This basically adds a couple of convenience functions to the interface changes in #921, which I find useful in KHARMA. Not terribly relevant to the real content of that PR so I'm posting it separately.

Depends on #907 (at least as posted here, to prevent merge conflicts later)

Basically this adds a lot of overloads to the DataCollection::Add() function, which allow it to take strings denoting a particular MeshData to copy from, and making it default to copying from "base." I find both conventions much more readable, and I think they might be easier for newcomers to the code to understand given that allocations and Add calls are some of the first things one runs into trying to read/understand KHARMA.

It also adds a function GetPackDimension to StateDescriptor which returns the length of a theoretical pack of variables from that package given a FlagCollection. This is useful for allocating variables of the full pack length (fluxes, boundaries, etc.) before Mesh initialization.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

@bprather bprather changed the title WIP: MeshBlockData niceties WIP: DataCollection/StateDescriptor niceties Aug 16, 2023
@Yurlungur
Copy link
Collaborator

It's going to be a little hard to read this diff until #921 is in. Can you ping reviewers once that happens?

@bprather
Copy link
Collaborator Author

bprather commented Aug 16, 2023

Yep, definitely not worth reviewing now. I also have some changes & fixes still queued up for this, it's still evolving a little as I firm up how I'm using it in KHARMA. I'll remove WIP and ping folks when it's decent.

(May also open a different PR if git weirdness makes this one awkward, I wasn't terribly clean about branching this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants