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

Sgerberding adding python eos #402

Merged
merged 13 commits into from
Aug 9, 2024
Merged

Sgerberding adding python eos #402

merged 13 commits into from
Aug 9, 2024

Conversation

Gerbeset
Copy link
Collaborator

@Gerbeset Gerbeset commented Aug 8, 2024

PR Summary

Added StiffGas into module.cpp so that stiff gas can be called in python bindings.

Can be called using (for example):

from singularity_eos import StiffGas
gm1 = 5./3. - 1
Cv = 2

gamma = 5./3.
q = -(gamma/(gamma-1))
P_inf = 1
sing_stiff_gas = StiffGas(gm1, Cv, P_inf, q)

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.
  • Format your changes by using the make format command after configuring with cmake.
  • N/A Document any new features, update documentation for changes made.
  • Make sure the copyright notice on any files you modified is up to date.
  • After creating a pull request, note it in the CHANGELOG.md file.
  • LANL employees: make sure tests pass both on the github CI and on the Darwin CI

Copy link
Collaborator

@jhp-lanl jhp-lanl left a comment

Choose a reason for hiding this comment

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

Can you add a one-line test to make sure the object can be created here:

https://github.com/lanl/singularity-eos/blob/main/test/python_bindings.py#L67

As you can see, there is no thought towards correctness of parameters, so it should be an easy addition

python/module.cpp Outdated Show resolved Hide resolved
…esting for StiffGas in test/python_bindings.py
test/python_bindings.py Outdated Show resolved Hide resolved
test/python_bindings.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jhp-lanl jhp-lanl 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 now. I'll merge when the tests pass

@jhp-lanl jhp-lanl merged commit b3f646e into main Aug 9, 2024
5 checks passed
@jhp-lanl jhp-lanl deleted the sgerberding_adding_python_eos branch August 9, 2024 01:09
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