mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
LC: Update with functional window LC and Edit.
This commit is contained in:
1 parent
115d84d436
commit
f1d82b2f86
10 files changed
+183
-48
No files matched your search
@@ -38,7 +38,7 @@ class LateralContribution(object):
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def bctype(self):
|
||||
def lctype(self):
|
||||
return self._type
|
||||
|
||||
@property
|
||||
|
||||
@@ -30,6 +30,9 @@ class Graph(object):
|
||||
def edges(self):
|
||||
return self._edges
|
||||
|
||||
def edges_names(self):
|
||||
return list(map(lambda e: e.name, self._edges))
|
||||
|
||||
def nodes_counts(self):
|
||||
return len(self._nodes)
|
||||
|
||||
@@ -63,6 +66,19 @@ class Graph(object):
|
||||
|
||||
return node[0]
|
||||
|
||||
def edge(self, edge_name:str):
|
||||
edge = list(
|
||||
filter(
|
||||
lambda e: e.name == edge_name,
|
||||
self._edges
|
||||
)
|
||||
)
|
||||
|
||||
if len(edge) == 0:
|
||||
return None
|
||||
|
||||
return edge[0]
|
||||
|
||||
def _add_node(self, node):
|
||||
self._nodes.append(node)
|
||||
self._nodes_ids += 1
|
||||
|
||||
+7
-6
@@ -7,12 +7,8 @@ from Model.Network.Graph import Graph
|
||||
from Model.Geometry.Profile import Profile
|
||||
from Model.Geometry.Reach import Reach
|
||||
|
||||
from Model.BoundaryCondition.BoundaryCondition import (
|
||||
BoundaryCondition
|
||||
)
|
||||
from Model.BoundaryCondition.BoundaryConditionList import (
|
||||
BoundaryConditionList
|
||||
)
|
||||
from Model.BoundaryCondition.BoundaryConditionList import BoundaryConditionList
|
||||
from Model.LateralContribution.LateralContributionList import LateralContributionList
|
||||
|
||||
|
||||
class RiverNode(Node):
|
||||
@@ -60,11 +56,16 @@ class River(Graph):
|
||||
|
||||
self._current_reach = None
|
||||
self._boundary_condition = BoundaryConditionList()
|
||||
self._lateral_contribution = LateralContributionList()
|
||||
|
||||
@property
|
||||
def boundary_condition(self):
|
||||
return self._boundary_condition
|
||||
|
||||
@property
|
||||
def lateral_contribution(self):
|
||||
return self._lateral_contribution
|
||||
|
||||
def has_current_reach(self):
|
||||
return self._current_reach is not None
|
||||
|
||||
|
||||
Reference in new issue
Block a user