Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Oct 30, 2023
1 parent 0358325 commit 35f6c52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions hydrolib/core/dflowfm/net/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ def create_triangular(self, geometry_list: mk.GeometryList) -> None:
# Process new mesh
self._process(self.get_mesh2d())

def _process(self, mesh2d_input) -> None:

def _process(self, mesh2d_input) -> None: #TODO: input arg is not used, so remove
# Add input
# self.meshkernel.mesh2d_set(mesh2d_input) #TODO: in this meshkernel function duplicates the amount of nodes. Seems not desireable, but more testbanks fail if commented.
# Get output
Expand Down
11 changes: 6 additions & 5 deletions tests/dflowfm/test_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,18 +608,19 @@ def test_create_triangular():
)

network.mesh2d_create_triangular_within_polygon(polygon)

mesh2d_output = network._mesh2d.get_mesh2d()

assert np.array_equiv(
network._mesh2d.mesh2d_node_x,
mesh2d_output.node_x,
np.array([6.0, 4.0, 2.0, 0.0]),
)
assert np.array_equiv(
network._mesh2d.mesh2d_node_y,
mesh2d_output.node_y,
np.array([2.0, 7.0, 6.0, 0.0]),
)
assert np.array_equiv(
network._mesh2d.mesh2d_edge_nodes,
np.array([[2, 3], [3, 0], [0, 2], [0, 1], [1, 2]]),
mesh2d_output.edge_nodes,
np.array([[2, 3], [3, 0], [0, 2], [0, 1], [1, 2]]).ravel(),
)


Expand Down

0 comments on commit 35f6c52

Please sign in to comment.