Skip to content
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 meshkernel/meshkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def polygon_get_included_points(

Args:
selecting_polygon (GeometryList): The selection polygon.
selected_polygon (GeometryList): The polygon of which to get the selected points.
selected_polygon (GeometryList): The polygon from which to get the selected points.

Returns:
GeometryList: The selection result. The selected points are contained in the values array of the returned
Expand Down
2 changes: 1 addition & 1 deletion tests/test_curvilinear_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_curvilinear_compute_rectangular_grid_defined_extension_spherical_coordi

# Test the number of m and n
assert curvilinear_grid.num_m == 81
assert curvilinear_grid.num_n == 103
assert curvilinear_grid.num_n == 78


def test_curvilinear_compute_rectangular_grid_with_polygon():
Expand Down
212 changes: 106 additions & 106 deletions tests/test_mesh2d_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,9 @@ def test_mesh2d_make_rectangular_mesh_on_extension():
mk_2.curvilinear_convert_to_mesh2d()
mesh2d_2 = mk_2.mesh2d_get()

assert mesh2d_1.node_x.size == 8343
assert mesh2d_1.edge_x.size == 16502
assert mesh2d_1.face_x.size == 8160
assert mesh2d_1.node_x.size == 6318
assert mesh2d_1.edge_x.size == 12477
assert mesh2d_1.face_x.size == 6160

assert mesh2d_1 == mesh2d_2

Expand Down Expand Up @@ -1957,119 +1957,119 @@ def test_mesh2d_refine_based_on_gridded_samples_coastline(

node_x_expected = np.array(
[
-68.23749931,
-68.23124931,
-68.23749965,
-68.23749969,
-68.23124936,
-68.24374969,
-68.21874931,
-68.21249964,
-68.21249969,
-68.21874936,
-68.21249936,
-68.20624969,
-68.19374965,
-68.18749931,
-68.32499934,
-68.31249934,
-68.32499934,
-68.33749934,
-68.27499934,
-68.26249934,
-68.28749934,
-68.25,
-68.2,
-68.35,
-68.3,
-68.25,
-68.2,
-68.3,
-68.23125,
-68.18125,
-68.3625,
-68.28125,
-68.23125,
-68.3625,
-68.3125,
-68.28125,
-68.23125,
-68.3125,
-68.21874901,
-68.22499901,
-68.23124901,
-68.26874901,
-68.27499901,
-68.28124901,
-68.22499901,
-68.21874901,
-68.22499901,
-68.23124901,
-68.17499901,
-68.18124901,
-68.24374968893065,
-68.20624964102088,
-68.21249930585395,
-68.21874930585395,
-68.21249964102088,
-68.21249968980126,
-68.21874935596158,
-68.21249935596158,
-68.20624968980127,
-68.18749968893064,
-68.18124935376372,
-68.18749935376371,
-68.19374968893065,
-68.42499932701261,
-68.4124993270126,
-68.42499932701261,
-68.34374964064742,
-68.3312493054805,
-68.33749964064742,
-68.33749968769865,
-68.33124935120495,
-68.33749935120497,
-68.34374968769865,
-68.30624963959941,
-68.31249930310571,
-68.3187493031057,
-68.31249963959942,
-68.3124996885687,
-68.31874935340177,
-68.31249935340178,
-68.3062496885687,
-68.29374964064743,
-68.2874993054805,
-68.2812493054805,
-68.28749964064743,
-68.28749968769867,
-68.28124935120496,
-68.28749935120496,
-68.29374968769866,
-68.25624963959942,
-68.26249930310573,
-68.26874930310572,
-68.26249963959943,
-68.26249968856871,
-68.26874935340177,
-68.26249935340178,
-68.25624968856872,
-68.24374964064742,
-68.2374993054805,
-68.2312493054805,
]
)

node_y_expected = np.array(
[
12.21541261,
12.22142544,
12.22743842,
12.23946235,
12.2454732,
12.24547334,
12.24547309,
12.23946224,
12.22743853,
12.22142555,
12.21541271,
12.22142569,
12.22142558,
12.21541261,
12.1973741,
12.20939978,
12.22142545,
12.20939978,
12.2454731,
12.25749508,
12.25749508,
12.15527532,
12.15527532,
12.22142577,
12.20338726,
12.20338726,
12.20338726,
12.26951737,
12.13723127,
12.13723127,
12.18534874,
12.18534874,
12.18534874,
12.23345145,
12.23345145,
12.23345145,
12.23345145,
12.28153934,
12.11316478,
12.1191813,
12.11316478,
12.1612896,
12.16730428,
12.1612896,
12.15527491,
12.1612896,
12.16730428,
12.1612896,
12.15527491,
12.1612896,
12.15463885899173,
12.15463874976997,
12.16074878284255,
12.15463860923287,
12.14852857616029,
12.13630721878710,
12.13019578561624,
12.12408449245206,
12.13019592562292,
12.14852868538205,
12.15463871845462,
12.16074889206430,
12.15463885899173,
12.20351780398160,
12.21573590360675,
12.22795400323190,
12.17907944406348,
12.17907930352637,
12.18518961767316,
12.19740895013853,
12.20351785888409,
12.20962690869666,
12.20351799995111,
12.20351789031717,
12.20962679906272,
12.20351774925015,
12.19740884050459,
12.18518972689491,
12.17907941274813,
12.17296923913845,
12.17907955328523,
12.17907944406348,
12.17296912991670,
12.17907930352637,
12.18518961767316,
12.19740895013853,
12.20351785888409,
12.20962690869666,
12.20351799995111,
12.20351789031716,
12.20962679906272,
12.20351774925015,
12.19740884050459,
12.18518972689491,
12.17907941274813,
12.17296923913845,
12.17907955328523,
12.17907944406348,
12.17296912991670,
12.17907930352637,
]
)

assert mesh2d.node_x[600:650] == pytest.approx(node_x_expected, abs=1e-4)
assert mesh2d.node_y[600:650] == pytest.approx(node_y_expected, abs=1e-4)

assert len(mesh2d.node_x) == 1676
assert len(mesh2d.edge_nodes) == 7176
assert len(mesh2d.node_x) == 1750
assert len(mesh2d.edge_nodes) == 7496


def test_mesh2d_get_face_polygons():
Expand Down Expand Up @@ -2404,7 +2404,7 @@ def test_mesh2d_get_filtered_face_polygons_full_and_empty():
orthogonality = mk.mesh2d_get_filtered_face_polygons(
Mesh2d.Property.ORTHOGONALITY, 0.0, 1.0
)
assert orthogonality.x_coordinates.shape[0] == 527
assert orthogonality.x_coordinates.shape[0] == 503
orthogonality = mk.mesh2d_get_filtered_face_polygons(
Mesh2d.Property.ORTHOGONALITY, 0.1, 10.0
)
Expand Down
Loading