Skip to content

Commit

Permalink
Rename metric to property
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacarniato committed Sep 2, 2024
1 parent d07a26e commit c2f355d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions meshkernel/meshkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,13 @@ def mesh2d_get_face_polygons(self, num_edges: int) -> GeometryList:
return face_polygons

def mesh2d_get_filtered_face_polygons(
self, filter: Mesh2d.Metric, min_value: float, max_value: float
self, filter: Mesh2d.Property, min_value: float, max_value: float
) -> GeometryList:
"""Gets the polygons matching the metric value within the minimum and maximum value.
Args:
filter (Mesh2d.Metric): The metric used to filter the locations
filter (Mesh2d.Property): The metric used to filter the locations
min_value(float): The minimum value of the metric.
max_value(float): The maximum value of the metric.
Expand Down
4 changes: 2 additions & 2 deletions meshkernel/py_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class Mesh2d:
"""

@unique
class Metric(IntEnum):
"""Different filtering metrics on a 2D mesh."""
class Property(IntEnum):
"""Different properties on a 2D mesh."""

ORTHOGONALITY = 0

Expand Down
2 changes: 1 addition & 1 deletion tests/test_mesh2d_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2334,7 +2334,7 @@ def test_mesh2d_get_filtered_face_polygons():
input_mesh2d = Mesh2d(node_x, node_y, edge_nodes)
mk.mesh2d_set(input_mesh2d)

face_polygons = mk.mesh2d_get_filtered_face_polygons(Mesh2d.Metric.ORTHOGONALITY, 0.04, 1.0)
face_polygons = mk.mesh2d_get_filtered_face_polygons(Mesh2d.Property.ORTHOGONALITY, 0.04, 1.0)

expected_coordinates_x = np.array([57.0, 49.1, 58.9, 66.7, 57.0], dtype=np.double)
expected_coordinates_y = np.array([23.6, 14.0, 6.9, 16.2, 23.6], dtype=np.double)
Expand Down

0 comments on commit c2f355d

Please sign in to comment.