Commit 83c03c99 authored by Theophile Terraz's avatar Theophile Terraz
Browse files

debug auto BC without node

Showing with 4 additions and 0 deletions
+4 -0
...@@ -331,6 +331,8 @@ class EditBoundaryConditionWindow(PamhyrWindow): ...@@ -331,6 +331,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
def generate_uniform(self): def generate_uniform(self):
if self._data.has_node: if self._data.has_node:
node = self._data.node node = self._data.node
if node is None:
return
reach = self._data.reach(self._study.river)[0] reach = self._data.reach(self._study.river)[0]
profile = reach.profiles[-1] profile = reach.profiles[-1]
incline = abs(reach.get_incline_median_mean()) incline = abs(reach.get_incline_median_mean())
...@@ -360,6 +362,8 @@ class EditBoundaryConditionWindow(PamhyrWindow): ...@@ -360,6 +362,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
def generate_critical(self): def generate_critical(self):
if self._data.has_node: if self._data.has_node:
node = self._data.node node = self._data.node
if node is None:
return
reach = self._data.reach(self._study.river)[0] reach = self._data.reach(self._study.river)[0]
profile = reach.profiles[-1] profile = reach.profiles[-1]
z_min = profile.z_min() z_min = profile.z_min()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment