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

Refactor State to use std::any and a more rigorous update pattern #315

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

Conversation

jmikeowen
Copy link
Collaborator

@jmikeowen jmikeowen commented Nov 11, 2024

Summary

  • This PR is a feature improving the way we handle checking in and update state fields in the State objects.
  • It does the following:
    • We have converted the State objects to use std::any rather than boost::any to hold all state fields.
    • The update, equivalence, clone, and zeroing operations now rely on a generic visitor pattern to ensure all data types are handled in those operations.
    • We have eliminated the cascade of try/catch the old objects used for this, which would also silently pass for fields that were not handled.
    • We renamed the getAny and enrollAny methods of StateBase to all be simply overloaded versions of get and enroll. These older names were to simplify Python bindings using disambiguated names, but this simpler overloading of uniform names was always the intended usage. Most of the files touched in this change are due to this interface simplification.

ToDo :

  • Annotate RELEASE_NOTES.md with notable changes.
  • Create LLNLSpheral PR pointing at this branch. (PR#)
  • LLNLSpheral PR has passed all tests.

@jmikeowen jmikeowen self-assigned this Nov 14, 2024
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