Skip to content

Commit

Permalink
refactor: remove dead code of _process_edges_for_branch
Browse files Browse the repository at this point in the history
(which contained a bug as well)
  • Loading branch information
arthurvd committed May 19, 2022
1 parent 24dc275 commit a5ece8b
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions hydrolib/core/io/net/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,24 +847,6 @@ def _add_branch(
self.mesh1d_node_branch_offset, offsets
)

# self._process_edges_for_branch()

def _process_edges_for_branch(self, branch_id: str) -> None:

branch = self.branches[branch_id]

edge_coords = (branch.node_xy[:-1] + branch.node_xy[1:]) / 2.0
edge_offsets = (branch.branch_offsets[:-1] + branch.branch_offsets[1:]) / 2

self.mesh1d_edge_branch_id = np.append(
self.mesh1d_edge_branch_id, np.full(len(edge_coords), i)
)
self.mesh1d_edge_branch_offset = np.append(
self.mesh1d_edge_branch_offset, edge_offsets
)
self.mesh1d_edge_x = np.append(self.mesh1d_edge_x, edge_coords[:, 0])
self.mesh1d_edge_y = np.append(self.mesh1d_edge_y, edge_coords[:, 1])

def get_node_mask(self, branchids: List[str] = None):
"""Get node mask, give a mask with True for each node that is in the given branchid list"""

Expand Down

0 comments on commit a5ece8b

Please sign in to comment.