Skip to content

Commit

Permalink
Merge pull request #216 from lanl/jmm/fix-eps-fix
Browse files Browse the repository at this point in the history
Clean up the epsilon fix
  • Loading branch information
jhp-lanl authored Jan 11, 2023
2 parents 3e9eb0b + 45c6530 commit abef378
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Current develop

### Fixed (Repair bugs, etc)
- [[PR215]](https://github.com/lanl/singularity-eos/pull/215) fix duplicate definition of EPS and fix CI
- [[PR215]](https://github.com/lanl/singularity-eos/pull/215) and [[PR216]](https://github.com/lanl/singularity-eos/pull/216) fix duplicate definition of EPS and fix CI

### Added (new features/APIs/variables/...)
- [[PR209]](https://github.com/lanl/singularity-eos/pull/209) added more documentation around how to contribute to the project and also what a contributor can expect from the core team
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ More complete documentation is available [here](https://lanl.github.io/singulari
- `eospac-wrapper` is a wrapper for eospac
- `closure` contains mixed cell closure models. Currently pressure-temperature equilibrium is supported. Requires `eos`.
- `sesame2spiner` converts sesame tables to spiner tables
- `stellarcollaspe2spienr` converts tables found on stellarcollapse.org to spiner tables
- `stellarcollaspe2spiner` converts tables found on stellarcollapse.org to spiner tables

## To Build

Expand Down
5 changes: 5 additions & 0 deletions doc/sphinx/src/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ Some notes on style and code architecture
understand, ask. It may be it can be refactored to be more simple or
better documented.

* As a general rule, to avoid accidental division by zero, use the
``robust::ratio(x, y)`` function provided in
``singularity-eos/base/robust_utils.hpp`` instead of writing ``x /
y``.

Performance portability concerns
`````````````````````````````````

Expand Down
2 changes: 1 addition & 1 deletion singularity-eos/eos/eos_eospac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ inline EOSPAC::EOSPAC(const int matid, bool invert_at_setup) : matid_(matid) {
DPDR = dx[0];
DPDT = dy[0];
DPDE = robust::ratio(DPDT, DEDT);
BMOD = rho_ref_ * DPDR + DPDE * robust::ratio(PRESS, rho_ref_) - rho_ref_ * DEDR);
BMOD = rho_ref_ * DPDR + DPDE * (robust::ratio(PRESS, rho_ref_) - rho_ref_ * DEDR);
bmod_ref_ = bulkModulusFromSesame(std::max(BMOD, 0.0));
dpde_ref_ = pressureFromSesame(sieToSesame(DPDE));
dvdt_ref_ =
Expand Down

0 comments on commit abef378

Please sign in to comment.