Skip to content

Commit

Permalink
Fixup 469bb84
Browse files Browse the repository at this point in the history
SWINTEGERS was changed in the referred commit, and
other critical usage of that constant has to be adjusted
accordingly.

There are still other places where SWINTEGERS are used, but as
long as tests pass they should be fine.

Also adjust the lower limit for h in test_slgof_hypo. If h can
become much lower than h_min, hypothesis shrinking in case of
errors becomes very slow.
  • Loading branch information
berland committed Oct 4, 2024
1 parent d6f0bf7 commit 42569b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pyscal/gasoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(

assert isinstance(krgendanchor, str), "krgendanchor must be a string"

h_min = 1.0 / float(SWINTEGERS)
h_min = 10.0 / float(SWINTEGERS)
if h < h_min:
logger.warning(
"Requested saturation step length (%g) too small, reset to %g", h, h_min
Expand Down
2 changes: 1 addition & 1 deletion src/pyscal/wateroil.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(

self.swcomment: str = ""

h_min = 1.0 / float(SWINTEGERS)
h_min = 10.0 / float(SWINTEGERS)
if h < h_min:
logger.warning(
"Requested saturation step length (%g) too small, reset to %g", h, h_min
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slgof.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def test_numerical_problems(swl, sorg, sgcr):
st.floats(min_value=0.0, max_value=0.3),
st.floats(min_value=0.0, max_value=0.3),
st.floats(min_value=0.0, max_value=0.3),
st.floats(min_value=1.0 / float(100 * SWINTEGERS), max_value=0.5),
st.floats(min_value=1.0 / SWINTEGERS, max_value=0.5),
)
def test_slgof_hypo(swl, sorg, sgcr, h):
"""Shotgun-testing of slgof"""
Expand Down

0 comments on commit 42569b6

Please sign in to comment.