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

Bugfix/initialize problem startup dependencies #261

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

jmikeowen
Copy link
Collaborator

@jmikeowen jmikeowen commented Feb 2, 2024

Summary

  • This PR is a bugfix (via an interface improvement)
  • It does the following:
    • We have added a new optional initialization method for Physics packages:
      Physics::initializeProblemStartupDependencies.
    • This optional hook is called once after Physics::initializeProblemStartup.
    • initializeProblemStartupDependencies is called with fully constructed State and StateDerivative objects, unlike initializeProblemStartup which is only called with a DataBase.
    • initializeProblemStartupDependencies is intended to be used to properly initialize dependent state (such as pressures and temperatures), which may depend on multiple physics packages and be non-trivial to update.
    • This corrects a bug whereby the ConstantBoundary could take a snapshot of incorrect initial state, freezing that incorrect state for all times thereafter.

ToDo :

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

package interface: Physics::initializeProblemStartupDependencies.  The
idea is to keep basic sizing of arrays and such in the first
stage (Physics::initializeProblemStartup), while this new hook is used
for updating any initial Physics state (and therefore provides a State
and StateDerivatives object).
src/Physics/Physics.hh Outdated Show resolved Hide resolved
…nd Physics::initializeProblemStartupDependencies suggested by Brody.
Copy link
Collaborator

@jmpearl jmpearl left a comment

Choose a reason for hiding this comment

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

looks good

@jmikeowen jmikeowen merged commit d3c5737 into develop Feb 6, 2024
1 check passed
@jmikeowen jmikeowen deleted the bugfix/initializeProblemStartupDependencies branch February 6, 2024 21:48
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.

4 participants