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

Clean up the epsilon fix #216

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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