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

Construct staged integrators via arbitrary name #975

Merged
merged 5 commits into from
Nov 15, 2023

Conversation

pdmullen
Copy link
Collaborator

@pdmullen pdmullen commented Nov 13, 2023

PR Summary

This MR alters the LowStorageIntegrator and ButcherIntegrator constructors such that they are capable of taking an arbitrary string. Previously, both constructors took as argument a ParameterInput *pin parameter and assigned an integrator name pin->GetOrAddString("parthenon/time", "integrator", "rk2"). This inhibited a downstream user from producing two unique instances of a StagedIntegrator that did not share the same stringed name. I attempted to ensure backwards compatibility of instantiating integrators via ParameterInput *pin; I did this by supporting an additional constructor (taking as argument ParameterInput *pin) that calls my newly added constructor (taking as argument std::string &name).

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

@pdmullen pdmullen changed the title Construct Stage Integrators Via Arbitrary Name Construct Staged Integrators Via Arbitrary Name Nov 13, 2023
@pdmullen pdmullen changed the title Construct Staged Integrators Via Arbitrary Name Construct staged integrators via arbitrary name Nov 13, 2023
Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks for adding this. It's my bad this wasn't fixed when I was messing with integrators earlier.

Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pdmullen pdmullen enabled auto-merge November 15, 2023 16:20
@pdmullen pdmullen disabled auto-merge November 15, 2023 22:09
@pdmullen pdmullen enabled auto-merge November 15, 2023 22:10
@pdmullen pdmullen merged commit 15d067b into develop Nov 15, 2023
49 checks passed
@pdmullen pdmullen deleted the pdmullen/integrator-instances branch November 15, 2023 23:04
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.

3 participants