Skip to content

Commit

Permalink
Merge pull request #402 from lanl/sgerberding_adding_python_eos
Browse files Browse the repository at this point in the history
Sgerberding adding python eos
  • Loading branch information
jhp-lanl authored Aug 9, 2024
2 parents 12a6fc3 + b4caf67 commit b3f646e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Changed (changing behavior/API/variables/...)

### Infrastructure (changes irrelevant to downstream codes)
- [[PR402]](https://github.com/lanl/singularity-eos/pull/402) Added stiff gas to python interface

### Removed (removing behavior/API/varaibles/...)

Expand Down
4 changes: 4 additions & 0 deletions python/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ PYBIND11_MODULE(singularity_eos, m) {
py::arg("gm1"), py::arg("Cv")
);

eos_class<StiffGas>(m, "StiffGas")
.def(py::init())
.def(py::init<Real, Real, Real, Real>(), py::arg("gm1"), py::arg("Cv"), py::arg("Pinf"), py::arg("q"));

eos_class<Gruneisen>(m, "Gruneisen")
.def(py::init())
.def(
Expand Down
5 changes: 4 additions & 1 deletion test/python_bindings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
# © 2021-2023. Triad National Security, LLC. All rights reserved. This
# © 2021-2024. Triad National Security, LLC. All rights reserved. This
# program was produced under U.S. Government contract 89233218CNA000001
# for Los Alamos National Laboratory (LANL), which is operated by Triad
# National Security, LLC for the U.S. Department of Energy/National
Expand Down Expand Up @@ -67,6 +67,9 @@ def testConstants(self):
def testIdealGas(self):
eos = singularity_eos.IdealGas(1,1)

def testStiffGas(self):
eos = singularity_eos.StiffGas(1,1,1,1)

def testShiftedIdealGas(self):
eos = singularity_eos.Shifted(singularity_eos.IdealGas(1,1),1)

Expand Down

0 comments on commit b3f646e

Please sign in to comment.