Skip to content

Commit

Permalink
Added missing ridge detection refinement type (#137 | GRIDEDIT-874)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed authored Jan 25, 2024
1 parent caae4cc commit 471af94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions meshkernel/py_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class RefinementType(IntEnum):
"""Refinement that refines recursively a fixed number of times."""
REFINEMENT_LEVELS = 2

"""Refinement based on ridge detection."""
RIDGE_DETECTION = 3


@unique
class Mesh2dLocation(IntEnum):
Expand Down
7 changes: 4 additions & 3 deletions tests/test_py_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ def test_projecttolandboundaryoption_values(
assert enum_val == exp_int


cases_refinementtype_values = [
cases_refinement_type_values = [
(RefinementType.WAVE_COURANT, 1),
(RefinementType.REFINEMENT_LEVELS, 2),
(RefinementType.RIDGE_DETECTION, 3),
]


@pytest.mark.parametrize("enum_val, exp_int", cases_refinementtype_values)
def test_refinementtype_values(enum_val: RefinementType, exp_int: int):
@pytest.mark.parametrize("enum_val, exp_int", cases_refinement_type_values)
def test_refinement_type_values(enum_val: RefinementType, exp_int: int):
"""Tests the integer values of the `RefinementType` enum."""

assert enum_val == exp_int
Expand Down

0 comments on commit 471af94

Please sign in to comment.